Prerequisites
- Successful smart contract deployment.
- The ABI and contract address from the previous deployment are recorded. Generated after compilation and deployment.
- Funded wallet connected to the appropriate network (peaq/agung).
Instructions
Remix
1. Access the Deployed Contract
- In Remix, navigate to the Deployed Contracts section in the Deploy & Run Transactions sidebar.
- You’ll see your deployed contract listed, with an interactive UI displaying the contract’s functions.
2. Perform Write Operations
- In the Deployed Contracts interface, locate the set function.
- Enter an integer as an input field (e.g.
10) and click the set button. - A MetaMask popup will be triggered to confirm the transaction. Confirm the transaction and wait for it to be appended on-chain.
- After completion the new value will be stored on the blockchain.
3. Perform Read Operations
- Locate the get function in the Deployed Contracts drop down in the Deploy & Run Transactions tab.
- Click the get button to fetch the current value stored in the contract.
- The result will appear below the function, showing the updated value (e.g.,
10).
JavaScript
1. Create an Interaction Script
- Inside the
scripts/directory of your project, create a new file namedinteract.js - Add the following script to interact with your deployed contract:
JavaScript
2. Execute the Interaction Script
- From the root directory of your project, run the command below. It runs the script against the agung network defined in
hardhat.config.js.
Python
1. Install Dependencies
web3- Allows the interaction with EVM deployed contracts in Python.python-dotenv- Provides basic protection for secret variables.
2. Create Python File
- Inside the
scripts/directory of your project, create a new file namedinteract.py - Add the following script to interact with your deployed contract:
Python
3. Execute the Interaction Script
- To execute the code above you can use the following script:

