Skip to main content

set action

Command

clio set action permission [OPTIONS] account code type requirement.

Where

  • [OPTIONS] = See Options in Command Usage section below.
  • account = The account to set/delete a permission authority for.
  • code = The account that owns the code for the action.
  • type = The name of the action, note permissions must be set per action.
  • requirement = To remove a permission use NULL, To set or update the permission use the name of the permission required for executing the given action.

Note: The arguments and options enclosed in square brackets are optional.

Description

Set parameters dealing with account permissions

Synopsis

clio set action permission
account <TEXT> # REQUIRED: The account to set/delete a permission authority
code <TEXT> # REQUIRED: The account that owns the code for the action
type <TEXT> # REQUIRED: The type of the action
requirement <TEXT> # REQUIRED: [delete] NULL, [set/update] The permission name required for executing the action
[-h, --help] # Print this help message and exit
[-x, --expiration <UINT>] # Set the expiration time in seconds before a transaction expires (default: 30s)
[-f, --force-unique] # Force the transaction to be unique (consumes extra bandwidth)
[-s, --skip-sign] # Skip signing the transaction with unlocked wallet keys
[-j, --json] # Print the result in JSON format
[--json-file <TEXT>] # Save result in JSON format to a file
[-d, --dont-broadcast] # Do not broadcast the transaction (print to stdout instead)
[--return-packed] # Used with --dont-broadcast to get the packed transaction
[-r, --ref-block <TEXT>] # Set the reference block number or block ID for TAPOS
[--use-old-rpc] # Use the old RPC push_transaction instead of the new RPC send_transaction
[-p, --permission <TEXT>] # Authorize with account@permission (default: 'account@active')
[--max-cpu-usage-ms <UINT>] # Set the upper limit on CPU usage in milliseconds (default: no limit)
[--max-net-usage <UINT>] # Set the upper limit on network usage in bytes (default: no limit)
[--delay-sec <UINT>] # Set delay in seconds (default: 0s)

Requirements

  • Install the currently supported version of clio.
note

| The clio tool is bundled with the Wire software. Installing Wire Sysio will install the clio and kiod command line tools.

  • You have access to an Wire blockchain.
  • You have a sysio account and access to the account's private key.

Examples

  1. Set permission on a hi action deployed to the scontract1 account so that the bob account's active permission and customp1 permission are authorized:
clio set action permission bob scontract1 hi customp1 -p bob@active

Where

  • bob = The name of the account to link the custom permission authority.
  • scontract1= The name of the account which owns the smart contract.
  • hi = The name of the action to link to a permission.
  • customp1 = The permission used to authorize the transaction.
  • -p bob@active = The permission used to authorize setting the permissions.

Example Output

executed transaction: 4eb4cf3aea232d46e0e949bc273c3f0575be5bdba7b61851ab51d927cf74a838  128 bytes  141 us
# sysio <= sysio::linkauth {"account":"bob","code":"scontract1","type":"hi","requirement":"customp1"}
  1. Set permissions on a bye action deployed to the scontract1 account so that the bob account's active permission and customp2 permission are authorized:
clio set action permission bob scontract1 bye customp2 -p bob@active

Where

  • bob = The name of the account to link the custom permission authority.
  • scontract1= The name of the account which owns the smart contract.
  • bye = The name of the action to link to a permission.
  • customp2 = The permission used to authorize the transaction.
  • -p bob@active = The permission used to authorize setting the permissions.

Example Output

executed transaction: 4eb4cf3aea232d46e0e949bc273c3f0575be5bdba7b61851ab51d927cf74a838  128 bytes  141 us
# sysio <= sysio::linkauth {"account":"bob","code":"scontract1","type":"bye","requirement":"customp2"}
  1. To remove the customp1 permission from the hi action:
clio set action permission bob scontract1 hi NULL -p bob@active

Where

  • bob = The name of the account to link the custom permission authority.
  • scontract1= The name of the account which owns the smart contract.
  • hi = The name of the action to link to a permission.
  • NULL = Remove the permission.
  • -p bob@active = The permission used to authorize the transaction.

Example Output

executed transaction: 50fe754760a1b8bd0e56f57570290a3f5daa509c090deb54c81a721ee7048201  120 bytes  242 us
# sysio <= sysio::unlinkauth {"account":"bob","code":"scontract1","type":"hi"}

See Also