Skip to content

Generate smart contract functions with ability to specify the block number directly #125

@aivinog1

Description

@aivinog1

Currently, I need to specify the default block number and recreate the smart contract object (via the load function) every time to execute the function on the specific block.
Can we generate the smart contract with overloaded methods to specify the block directly in the function call? Now I have to do this:

final var smartContract = SmartContract.load();
smartContract.setDefaultBlockParameter(DefaultBlockParameter.valueOf(bigInteger(blockNumber)));
final var result = execute(smartContract.someSmartContractFunction("abc"));

But I want something like:

final var smartContract = SmartContract.load();
final var result = execute(smartContract.someSmartContractFunction("abc"), BlockNumber.of(bigInteger(blockNumber)));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions