TWAZI

Interact with Smart Contract

Call a contract function directly—read/write supported.

Inputs

  • ABI required: The contract's Application Binary Interface, describing available functions and their parameters.
  • Contract Address required: The blockchain address where the smart contract is deployed.
  • Function Name required: The name of the function you want to call on the contract.
  • Parameters: The arguments to pass to the contract function (if any), usually as a JSON array.
  • Private Key Credential: The private key or credential used to sign the transaction (required for write operations).
  • RPC URL: The endpoint URL of the blockchain node to connect to.

Example

{
  "ABI": "[{ \"inputs\": [{ \"internalType\": \"uint256\", \"name\": \"x\", \"type\": \"uint256\" }], \"name\": \"setValue\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }]",
  "Contract Address": "0x1234567890abcdef1234567890abcdef12345678",
  "Function Name": "setValue",
  "Parameters": [42],
  "Private Key Credential": "YOUR_PRIVATE_KEY",
  "RPC URL": "https://mainnet.infura.io/v3/YOUR_PROJECT_ID"
}

Outputs

  • Result: Return data or transaction hash.
Smart contract interaction example

On this page

Edit on GitHub