Run smart contract function

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

Jump to: navigation, search

$defi contract run is a function that runs a specified function on a smart contract.

Designed for enterprise users, this function is particularly useful for interacting with DeFi protocols on Avalanche and Binance Smart Chain.

Contents

User Level

This function is exclusively available for enterprise users.

Parameters

Chain: The blockchain where the smart contract is located. The options are "Avalanche" or "BinanceSmartChain".

Contract Address: The address of the smart contract.

Function Name: The specific function that you want to run on the smart contract.

Parameters: Additional parameters to be included when running the function on the smart contract.

Return Value

This function returns a string value that represents the output of the function that's run on the smart contract.

Example

define areacode
ui text msg("Function Output: {$defi contract run("BinanceSmartChain", "0x...", "swapExactETHForTokens", "['500', '0x...', '0x...', '1600396754']")}")

In this example, the function "swapExactETHForTokens" is run on a smart contract located on the Binance Smart Chain. The smart contract address, function name, and parameters have been anonymized for security reasons. Replace these with your actual details.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox