How to Interact With Smart Contracts via MEW

  • Quite often, once a smart contract is deployed, you will need to change some of its parameters.
  • The easiest way you can interact with a smart contract is via MyEtherWallet’s Interact with Contract interface.

Quite often, once a smart contract is deployed, you will need to change some of its parameters. For example, you might want to modify the pre-sale start and end dates of a fundraiser contract, or increase/decrease the conversion rate of the same.

Update: Since this guide has been posted, MyEtherWallet have updated their web application, which now requires users to first access their wallets before they can use MEW. For the purposes of this guide, we recommend using MetaMask as it is really easy to manage smart contracts with it.

The easiest way you can interact with a smart contract is via MyEtherWallet’s Interact with Contract interface:

The MyEtherWallet Interact with Contract form.

The form has just two fields:

  • Contract Address, which is self-explanatory.
  • ABI/JSON Interface – a skeletal representation of the smart contract i.e. the functions that you can call and all public parameters.

Once you provide those two just click the Continue button and you will be connected and ready to interact with the contract:

The MyEtherWallet Interact with Contract page where users can select the method of the contract they want to call.

Using the Select an Item dropdown, you can select functions and parameters and interact with the smart contract. Once you select a function, a form will load with the appropriate parameter fields:

The MyEtherWallet Interact with Contract form showing a selected method and a parameter field.

Clicking the Write button will generate a transaction that will call the contract function. Once signed and mined, the function is executed and the smart contract’s state is changed.

Using the same interface, you can also check the status of parameters of the contract, thus confirming that the method you called worked as expected.

Discussion
1 comments
Loading comments...
Related Coverage
Cardano’s Vasil Upgrade Deployed After Months of Delays
  • The long awaited Vasil upgrade had finally been activated, enabling increased network capacity, higher throughput, and lower transaction costs on Cardano.
  • The upgrade gas also made significant improvements to the Plutus smart contract language, though its full capabilities will be unlocked on 27 September.
September 23, 2022, 10:21 AM
cardano

Shutterstock

OpenSea Phishing Attack Affected 17 Users
  • The incident, which affected 17 users on OpenSea, is considered to be a phishing attack as all malicious orders had a valid signatures from the affected users.
  • The CTO of OpenSea also explained the attack had nothing to do with OpenSea’s smart contract upgrade, which began on Friday, as the orders were signed before the migration.
Gaming Startup Intends to Connect Bitcoin’s Lightning Network to Ethereum
  • Blockade Games managed to send a Bitcoin lightning transaction that triggered an Ethereum smart contract.
  • A move to the Ethereum mainnet is expected soon.