Smart Contract Support

📘

Etherglade is currently in Beta!

We would love it if you gave us any feedback - if the docs are unclear, you run into a bug, or something isn't working like you expect it to please e-mail [email protected] and we'll do our best to fix it ASAP :)

🚧

Smart contract support is in Alpha!

You can give it a try but you may encounter bugs. We advise testing your integration extensively on the Ropsten (Test) Network before using the Main Network. If you find any bugs, let us know and we'll fix it for you as soon as we can.

If your app is a smart contract, you're in the right place! When creating an app in your dashboard, you need to supply your contract's ABI:

1256

If you don't have your contract's ABI, you should go to the Remix IDE, paste your contract's source there, and then follow these instructions to get the ABI.

Once you've done that, you can set Etherglade to send ether to any payable function of your smart contract by passing in the func parameter:

var ponzicoin = new etherglade("PONZICOIN_APP_ID", "main_ponzicoin_api_key");
ponzicoin.initiateComponent('#buy_into_a_pyramid_scheme', {
  value: 100000000000000000,
  // Call the `fund` function on the PonziCoin contract
  func: 'fund',
});

You can also pass arguments to your smart contract function. Just pass the argument names and values in:

var cryptokitties = new etherglade("CRYPTOKITTIES_APP_ID", "main_ck_api_key");
cryptokitties.initiateComponent('#give_a_kitty_to_a_friend', {
  value: 0,
  // Call the `transfer` function on the CryptoKitties Ownership contract
  func: 'transfer',
  // `transfer` takes two arguments: `_to` and `_tokenId`
  _to: '0x506A24fBCb8eDa2EC7d757c943723cFB32a0682E',
  _tokenId: 423282,
});