Get contract functions
Line 1: | Line 1: | ||
− | '''$ | + | '''$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. |
− | + | ||
− | This | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
== Parameters == | == Parameters == | ||
− | '''Chain:''' The blockchain where the smart contract is located. | + | '''Chain:''' The specific blockchain network where the smart contract is located. The options in the dropdown include Avalanche and Binance Smart Chain. |
− | '''Contract Address:''' | + | '''Contract Address:''' The address of the particular smart contract for which the list of functions will be retrieved. |
− | == Return Value == | + | == Return Value == |
− | This function returns a string | + | This function returns a string that represents a list of functions available on the specified smart contract. |
== Example == | == Example == | ||
<pre> | <pre> | ||
− | + | ui console view | |
− | ui | + | config defi wallet("your private key here") |
+ | log("List of Contract Functions: {$list contract functions("BinanceSmartChain","0xBCfCcbde45cE874adCB698cC183deBcF17952812")}") | ||
</pre> | </pre> | ||
− | + | 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: | ||
+ | |||
+ | <blockquote> | ||
+ | List of Contract Functions: getReserves,swapExactTokensForTokensSupportingFeeOnTransferTokens,swapExactETHForTokensSupportingFeeOnTransferTokens,swapExactTokensForETHSupportingFeeOnTransferTokens | ||
+ | </blockquote> |
Revision as of 18:57, 4 July 2023
$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