Close menu
Explore Plans
Mobile menu Close menu
1Shot API

Execute a Contract Method as a Delegator

This action will execute one of the Contract Methods you have defined in your 1Shot API account and create a Transaction, using a delegation on file.

Developer info

API endpoint slug
1shotapi.execute_as_delegator
Filter code method
_1shotapi.executeAsDelegator.skip(string?: reason)
Runtime method
runAction("1shotapi.execute_as_delegator", {})

Action fields

Contract method Dropdown list

Label
Choose the Contract Method you want to execute
Slug
contract_method_id
Required
true
Can have default value
false

Delegator address Text input > Other

Label
Choose the Delegator address
Helper text
Select the address that you want to execute the contract method as.
Slug
delegator_address
Required
true
Can have default value
true

Params Text input > Other

Label
Enter the parameters for the Contract Method
Helper text
This must be in JSON format. For example, a "mint" method's params may look like this: {"amount":"10000","to":"0x3e6a2f0CBA03d293B54c9fCF354948903007a798"}. This must be at least an object, {}
Slug
params
Required
true
Can have default value
true

Memo Text input > Other

Label
Enter any text you want included with the Transaction as a memo
Helper text
This may be anything you want, including technical information you want to save. Many people use JSON here.
Slug
memo
Required
false
Can have default value
true
Filter code method
_1shotapi.executeAsDelegator.setMemo(string: memo)

Value Text input > Other

Label
How much native token should be sent with the Transaction?
Helper text
Enter a value only for "payable" contract methods that need to send native token to the smart contract.
Slug
value
Required
false
Can have default value
true
Filter code method
_1shotapi.executeAsDelegator.setValue(string: value)

Gas limit Text input > Other

Label
What is the maximum amount of gas to use?
Helper text
1Shot API calculates this for you in most circumstances, but some complex transactions may need more gas.
Slug
gas_limit
Required
false
Can have default value
true
Filter code method
_1shotapi.executeAsDelegator.setGas Limit(string: gas_limit)