Get contract functions
$list contract functions is a function that returns a list of functions available on a specified smart contract. This is specifically designed for enterprise users managing a series of interactions on the blockchain.
Parameters
Chain: The specific blockchain network where the smart contract is located. The options in the dropdown include Avalanche and Binance Smart Chain.
Contract Address: The address of the particular smart contract for which the list of functions will be retrieved.
Return Value
This function returns a string that represents a list of functions available on the specified smart contract.
Example
ui console view config defi wallet("your private key here") log("List of Contract Functions: {$list contract functions("BinanceSmartChain","0xBCfCcbde45cE874adCB698cC183deBcF17952812")}")
Please replace "your private key here" with your actual private key. Because private keys are extremely sensitive, exercise caution in handling them.
The output of this script will display a list of functions available on the specified smart contract (at address "0xBCfCcbde45cE874adCB698cC183deBcF17952812" on the "BinanceSmartChain"). An example of the output could look something like:
List of Contract Functions: getReserves,swapExactTokensForTokensSupportingFeeOnTransferTokens,swapExactETHForTokensSupportingFeeOnTransferTokens,swapExactTokensForETHSupportingFeeOnTransferTokens