Get contract functions

From UBot Studio
Revision as of 19:06, 4 July 2023 by LillyT (Talk | contribs)

Jump to: navigation, search

$contract functions is a function that returns a list of functions on a specific smart contract.

This command retrieves all function signatures from the smart contract of a specific chain.

Parameters

Chain: The specific blockchain chain where the smart contract resides. It can be either "Avalanche" or "BinanceSmartChain".

Contract Address: The address of the smart contract from which function details are to be fetched.

Return Value

This function returns a list of function names available in the smart contract as a string.

Example

log("Functions in Smart Contract: {$contract functions("BinanceSmartChain","0x000...")}")

The output will be a list of strings where each string represents a function present in the smart contract.

Please remember to replace "0x000..." with the actual address of the smart contract you are interacting with.

Example Output:

Functions in Smart Contract: ["balanceOf", "transfer", "approve", "allowance", "transferFrom", "safeTransferFrom", "mint", "burn"]

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox