Contract Operations
5.1 Get contract ABI
contract_address (str): The address of the smart contract."Get contract ABI of <example-contract-address>"
str: A formatted string containing the ABI of the smart contract.The ABI for the contract at address <example-contract-address> is as follows: ```json <example-abi> ``` This ABI includes the contract's constructor, events, and functions, providing the necessary information to interact with the contract on the blockchain.
from crypto_com_agent_client import Agent
agent = Agent.init(
llm_config={
"provider": "OpenAI",
"model": "gpt-4",
"provider-api-key": "sk-proj-example-key",
"temperature": "float-controlling-output-randomness",
},
blockchain_config={
"api-key": "your-crypto.com-developer-platform-api-key",
"private-key": "your-private-key",
"sso-wallet-url": "your-sso-wallet-url",
"timeout": "timeout-in-seconds-for-API-calls-default-20s")
},
)
response = agent.interact("Get contract ABI of <example-contract-address>")
print(response)Last updated
Was this helpful?