Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rmarede opened this issue May 25, 2024 · 1 comment
Labels
component/ethereum Related to the Ethereum adapter enhancement New feature or request help wanted Extra attention is needed

Comments

@rmarede
Copy link
Contributor

rmarede commented May 25, 2024

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 rmarede added the enhancement New feature or request label May 25, 2024
@davidkel davidkel added help wanted Extra attention is needed component/ethereum Related to the Ethereum adapter labels May 28, 2024
@davidkel
Copy link
Contributor

davidkel commented Jun 1, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/ethereum Related to the Ethereum adapter enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants