caliper icon indicating copy to clipboard operation
caliper copied to clipboard

Adding option to specify constructor arguments for contract deployment on Ethereum Connector

Open rmarede opened this issue 1 year ago • 1 comments

Please share the technical limitation of Caliper that you encountered.

I am no expert here but from what I see it seams that there's no option to specify constructor arguments for the contracts to be deployed by the Ethereum Connector. I don't understand why this is not a thing.

Please detail your feature idea that could alleviate the limitation.

Allow specification of an 'arguments' key to the Contract Definition JSON file, and use it on contract deployment on the Ethereum Connector.

Please share some details about your use case if possible, and how the new feature would make Caliper a better performance benchmarking framework.

No response

Please share any suggestions about the new feature's code/configuration API (using formatted YAML segments or pseudo-code).

async deployContract(contractData) {
        const web3 = this.web3;
        const contractDeployerAddress = this.ethereumConfig.contractDeployerAddress;
        const contract = new web3.eth.Contract(contractData.abi);
        const contractDeploy = contract.deploy({
            data: contractData.bytecode,
            arguments: contractData.arguments
        });

        try {
            return contractDeploy.send({
                from: contractDeployerAddress,
                gas: contractData.gas
            });
        } catch (err) {
            throw(err);
        }
    }

rmarede avatar May 25 '24 12:05 rmarede

See #1586 which proposes the removal of the ability for caliper to install smart contracts.

davidkel avatar Jun 01 '24 07:06 davidkel

Closing as support for besu and ethereum have now been dropped

davidkel avatar Apr 24 '25 08:04 davidkel