Is it possible to get a list of all variables that a smart contract needs to be sent just by knowing the contract's address?

What i want to do:

  1. make a call to the chain and get the required variables
  2. Generate fields out of those variables in a form
  3. Submit the form thus ensuring that all the needed fields exist

You would need to know the ABI for the contract. If the contract code is verified on Etherscan, then they provide an API method for that. From https://etherscan.io/apis#contracts:


  • This is the kind of stuff i was looking for (the api call). But unfortunately etherscan is closed source, i want to use this for a private blockchain. any other ideas? I will mark as the accepted answer nevertheless as it wouldsolve my question since i did not specify "a private blockchain" on the original post. – Onitlikesonic Apr 28 '18 at 14:53
  • 1
    All Etherscan is doing is compiling the source code for the contract. You can do the same yourself. You either need to know the ABI or the contract source (so you can produce the ABI yourself). – smarx Apr 28 '18 at 14:55

Your Answer

