Nifty Wallet Now Supports Interactions with Smart Contracts!

This article was moved from Medium to the Forum

The article was moved from
to the forum on 2019-02-04T05:00:00Z

Starting with Nifty Wallet 4.10 , interaction with Ethereum smart contracts is supported directly by the Nifty Wallet browser extension External resources like MyEtherWallet or MyCrypto are no longer required to interact with smart contracts — executions can be signed right in the wallet. ! Additionally, the save functionality eliminates the need to import a smart contract each time the wallet is accessed. These new smart contract support features make the latest version of Nifty Wallet easier and more convenient than ever!

How does it work from a UI perspective?

A new account type called Contract is included in the Import Account menu. Select the Contract type from the dropdown and paste the contract’s address into the input field. If the smart contract has been previously verified in BlockScout, Nifty Wallet will autofill the Application Binary Interface (ABI) for the contract. Otherwise, it can be added manually.

Once you’ve imported a smart contract, it will remain in your wallet until you decide to remove it from the list of accounts.

It’s easy to interact with the newly imported smart contract. When you click the Send button, you will see the list of methods available for interaction. There are two types of methods: (a) a method that calls the data from a smart contract and (b) a method that changes the state of a blockchain. Both method types are compatible with Nifty Wallet and the browser extension recognizes and differentiates between the two.

Below is a visual example of each case:

If data is retrieved from the smart contract, the result will appear in the output field.

If executing a transaction, the account responsible for execution must be specified. Nifty wallet provides a list of unlocked accounts (including accounts from the current keyring, imported accounts, and hardware wallets) to choose from. Once an account is selected, you will see a familiar transaction confirmation popup window… and that’s it, you’re done!

To support these new features and increase adoption, we are exploring additional functionality for future releases. These items include:

  • The ability to copy ABI encoded method data and easily input it into another transaction
  • Automatic account selection for contract transaction methods
  • Expanding the number of output fields that support calling data from smart-contracts
  • A web version of the Nifty Wallet extension with an enhanced UI and the ability to copy/paste in multiple inputs.