Skip to main content

sb evm function create

$ sb evm function create QUEUEKEY --account <value> --container <value> [-h] [-v] [-s] [--chain
coredao|arbitrum|optimism|base|aurora | --coredao | --arbitrum | --optimism | --base | --aurora] [--network
mainnet|testnet | --mainnet | --testnet] [-u <value>] [--programId <value>] [--json] [-n <value>] [-a <value>]
[--fundAmount <value>] [--containerRegistry dockerhub|ipfs] [--version <value>] [--mrEnclave <value>]

QUEUEKEY address of the attestation queue account

-a, --authority=<value> keypair or address to delegate authority to for managing the function account
-h, --help Show CLI help.
-n, --name=<value> name of the function for easier identification
-s, --silent suppress cli prompts
-u, --rpcUrl=<value> alternate RPC url
-v, --verbose log everything
--account=<value> (required) Path to file containing the private key for the payer account
--arbitrum use the arbitrum chain
--aurora use the aurora chain
--base use the base chain
--chain=<option> the evm chain to interact with
<options: coredao|arbitrum|optimism|base|aurora>
--container=<value> (required) the location of the container (Ex. switchboardlabs/basic-oracle-function)
--containerRegistry=<option> [default: dockerhub] the registry to pull the container from (Ex. Docker or IPFS)
<options: dockerhub|ipfs>
--coredao use the coredao chain
--fundAmount=<value> [default: 0.0] token amount to load into the function's escrow wallet.
--mainnet use the mainnet network
--mrEnclave=<value> the MrEnclave value to set for the function - if not provided, will be set automatically
after its first run
--network=<option> the EVM network to connect to
<options: mainnet|testnet>
--optimism use the optimism chain
--programId=<value> alternative Switchboard program ID to interact with
--testnet use the testnet network
--version=<value> [default: latest] the version of the container to pull from the registry (Ex. 'latest'
or 'mainnet')

--json Format output as json.

create a new function account for a given queue

$ sb evm function create F8ce7MsckeZAbAGmxjJNetxYXQa9mKr9nnrC3qKubyYy --name function-1 --fundAmount 0.25 --container switchboardlabs/basic-oracle-function --version latest