Skip to content

VS Code extension to interact with Eth Smart Contracts using their ABI

License

Notifications You must be signed in to change notification settings

jlcs-es/eth-abi-interactive

Repository files navigation

Eth ABI Interactive

Interact with deployed Ethereum smart contracts using the ABI

Workflow

Gif

First, compile your smart contracts (e.g. with Truffle) or open a workspace with the ABI files.

truffle compile

Use your prefered method of deployment. For example, Truffle Migrations.

truffle migrate

Click on the sidebar Ethereum icon. Your compiled ABI files will be listed.

Click on any of them. You will be asked for the Smart Contract deployed address. You can find it from your migrations/deployment step.

Workspace

The Smart Contract ABI will be displayed. Here, you have one entry per function, and inside each one, one entry per argument.

Choose a function, edit its parameters and click the Call method icon next to it. This will send a transaction without mining it in the blockchain. This way, you can check if it will be successful.

Now, click the Send transaction icon to mine it.

All output will appear in the Eth ABI Interactive Output Channel, right next to your Terminal tab.

Call and Send Tx

Accounts management

By default, a random Ethereum account is used to sign transactions. Of course, this is not useful when trying to transact as a specific user.

The Accounts Tree shows a list of stored accounts for the user. You can add a new account clicking on the key icon. You will be asked for:

  • The private key
  • An alias (will default to the derived address)
  • An encryption password

New Account

When choosing an account from the list, you will be asked for its decryption password (same one as encryption). Then, the tab description will prompt that it is using the selected account.

Using root

! These accounts are encrypted using web3.eth.accounts, which has NOT been audited and might potentially be unsafe. This is to be used ONLY for development purposes.

Extension Settings

This extension contributes the following settings:

  • eth-abi-interactive.privateKeysFile: File to store private keys used to sign transactions. Keys are encrypted using a master password. They are encrypted via Web3JS.eth.accounts. Will default to $HOME/.eth-abi-interactive/keys.json.
  • eth-abi-interactive.contractsPath: Directory where the compiled smart contracts are stored. Relative to workspace root. Will default to Truffle's build/contracts.
  • eth-abi-interactive.nodeURI: Ethereum node to send transactions to. Defaults to http://localhost:8545.

About

VS Code extension to interact with Eth Smart Contracts using their ABI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published