Giter Site home page Giter Site logo

No Contract Code after deployment about ion HOT 5 OPEN

Singh48 avatar Singh48 commented on June 26, 2024
No Contract Code after deployment

from ion.

Comments (5)

maxrobot avatar maxrobot commented on June 26, 2024

@Singh48

"no code after deployment".

I think this might be caused by the deployment exceeding the block gas limit or running out of gas.

Consider,

  1. using ganache with very high block gas limit
  2. increasing the amount of gas you send with the transaction

from ion.

Singh48 avatar Singh48 commented on June 26, 2024

@maxrobot thanks for the quick response. Following your advice, I modified my genesis.js file, increasing the gas limit to 1012 and supplying 107 amount of gas while deploying the EthereumStorage.sol from the ion-cli and was successful in doing so.

Next, Help needed:
Can you please let me know a way to call the functions of the validation contract (Clique.sol) from the ion-cli itself. The functions being the next steps (Step 3,4) in setting up the receiving end of the interoperating blockchains, namely:

function register() public returns (bool) {
        ion.registerValidationModule();
        return true;
    }

and

function RegisterChain(bytes32 _chainId, address[] memory _validators, bytes32 _genesisBlockHash, address _storeAddr) public {
        require( _chainId != ion.chainId(), "Cannot add this chain id to chain register" );

        if (chains[_chainId]) {
            require( !m_blockhashes[_chainId][_genesisBlockHash], "Chain already exists with identical genesis" );
        } else {
            chains[_chainId] = true;
            ion.addChain(_storeAddr, _chainId);
        }

        setGenesisBlock(_chainId, _validators, _genesisBlockHash);
    }

from ion.

Shirikatsu avatar Shirikatsu commented on June 26, 2024

https://github.com/clearmatics/ion-cli

Take a look at the docs here.

What you're looking for is the addContractInstance command that allows you to compile an instance of a contract which then allows you to call functions.

from ion.

Singh48 avatar Singh48 commented on June 26, 2024

@Shirikatsu, thanks for the reply.
I have added the contract instances of the contracts following the steps provided in ion-cli's repo, which I have mentioned in my issue statement.
I wanted to know whether calling functions from the ion-cli itself is possible or not after the required contract has been added and deployed.
If yes how?
Thanks in advance.

from ion.

Shirikatsu avatar Shirikatsu commented on June 26, 2024

Use the transactionMessage command in the ion-cli to do this.

from ion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.