How to interact with ethereum contract

In DApps, crypto wallets like Metamask typically create and send transactions using the wallet provider. However, when DApp is not created, it is not possible to send a transaction to a contract on the testnet to check its operation, so it is recommended to use the Remix function.

Remixを利用する方法

The major way to use Remix is to edit a Solidity file in the editor, compile and deploy it, and send a message to the contract, but you can also send a message by entering a deployed contract address in the testnet.

When the editor is opened normally, At Address is inactive, so the following operations are performed.

First, copy and paste the ABI into a new tab of the Remix Editor and create a file as <filename>.abi. The ABI is located in build/contracts/<contract name>.json under the root directory of the contract.

Next, go to the DEPLOY & RUN TRANSACTION page of Remix with the ABI file as the active tab. Now you can enter the At Address field. Enter the deployed contract address here, and you will be able to interact with the contract.

Reference: Deploy & Run — Remix - Ethereum IDE 1 documentation