Open pymachado opened 2 months ago
Contract Application Binary Interface (ABI) is the standard way to interact with contracts in the Ethereum ecosystem, both from outside the blockchain and for contract-to-contract interaction. The ABI specifies that the signature of a function declared in a smart contract is defined as the canonical expression of the basic prototype without a data location specifier. You should be able to extract from a random natural short message the function signature following the ERC20 standard of the function "transfer(address _to, uint256 _value) public returns (bool success)". i.e., given the message "send to Eliza one million USDT," the output should follow the format "tuple["function_signature, beneficiary, amount, token"]". In this case, the returned tuple should be equal to "tuple["transfer(address,uint256)", "eliza_address", "1_000_000", "USDT"]". If the context of the message does not match the scope of the transfer function, return an error message that says, "Message out of scope.
Request | Response | Temperature | Rejected |
---|---|---|---|
Send $100 USDT to my mom, please. | tuple["transfer(address,uint256)", "mom_address", "100", "USDT"] | 1 | false |
Transfer $100 USDT to my mom's account. | 1 | true | |
Could you help me send $100 USDT to my mom? | tuple["transfer(address,uint256)", "mom_address", "100", "USDT"] | 1 | false |
I need to send $100 USDT to my mom; can you assist with that? | tuple["transfer(address,uint256)", "mom_address", "100", "USDT"] | 1 | false |
Please arrange a $100 USDT transfer to my mom. | 1 | true |
Develop algorithms to extract the function signature following the ERC20 standard from a message. In the given example, it involves parsing the message to identify the action (send) and the token (USDT), and then mapping it to the appropriate ERC20 transfer function signature.