Skip to main content

sb solana function create

USAGE
$ sb solana function create QUEUEKEY --container <value> [-h] [-v] [-s] [--mainnetBeta | --cluster
devnet|mainnet-beta|mainnet|localnet] [-u <value>] [--programId <value>] [--attestationProgramId <value>]
[--commitment confirmed|finalized|processed] [-k <value>] [--ledgerPath <value> --ledger] [--json] [-n <value>]
[--metadata <value>] [-a <value>] [--fundAmount <value>] [--containerRegistry dockerhub|ipfs] [--version <value>]
[--mrEnclave <value>] [--requestsDisabled] [--requestsFee <value>] [--requestsRequireAuthorization]
[--routinesDisabled] [--routinesFee <value>] [--routinesRequireAuthorization]

ARGUMENTS
QUEUEKEY public key of the attestation queue account

FLAGS
-a, --authority=<value> keypair or public key to delegate authority to for managing the function account
-h, --help Show CLI help.
-k, --keypair=<value> keypair that will pay for onchain transactions. defaults to new account authority if
no alternate authority provided
-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
--attestationProgramId=<value> alternative Switchboard Attestation program ID to interact with
--cluster=<option> the solana cluster to connect to
<options: devnet|mainnet-beta|mainnet|localnet>
--commitment=<option> [default: confirmed] transaction commitment level to use
<options: confirmed|finalized|processed>
--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>
--fundAmount=<value> [default: 0.0] token amount to load into the function's escrow wallet.
--ledger enable ledger support
--ledgerPath=<value> HID path to the ledger
--mainnetBeta WARNING: use mainnet-beta solana cluster
--metadata=<value> metadata of the function for easier identification
--mrEnclave=<value> the MrEnclave value to set for the function - if not provided, will be set
automatically after its first run
--programId=<value> alternative Switchboard program ID to interact with
--requestsDisabled whether custom requests can be created for this function
--requestsFee=<value> [default: 0.0] the costs each request must pay the function authority for each
sub-request (Ex. 0.00002)
--requestsRequireAuthorization whether custom requests require the function authority to authorize
--routinesDisabled whether custom routines can be created for this function
--routinesFee=<value> [default: 0.0] the costs each routine must pay the function authority for each
sub-request (Ex. 0.00002)
--routinesRequireAuthorization whether custom routines require the function authority to authorize
--version=<value> [default: latest] the version of the container to pull from the registry (Ex. 'latest'
or 'mainnet')

GLOBAL FLAGS
--json Format output as json.

DESCRIPTION
create a new function account for a given queue

EXAMPLES
$ sb solana function create CkvizjVnm2zA5Wuwan34NhVT3zFc7vqUyGnA6tuEF5aE --name function-1 --fundAmount 1.25 --container switchboardlabs/basic-oracle-function --version solana