tx

Tx module allows you to sign or broadcast transactions

Available Commands

NameDescription

sign

Sign transactions generated offline

broadcast

Broadcast a signed transaction to the network

multi-sign

Generate multisig signatures for transactions generated offline

tx

Query for a transaction by hash in a committed block

txs

Search for transactions that match the exact given events where results are paginated

uptickd tx sign

Sign transactions in generated offline file. The file created with the --generate-only flag.

uptickd tx sign [file] [flags]

Flags

Name, shorthandTypeRequiredDefaultDescription

--append

bool

TRUE

TRUE

Attach a signature to an existing signature.

--from

string

TRUE

Key name for signature

--offline

bool

TRUE

Offline mode.

--signature-only

bool

TRUE

Print only the generated signature, then exit

--multisig

string

TRUE

Address of the multisig account on behalf of which the transaction shall be signed

Generate an offline tx

TIP

You can generate any type of txs offline by appending the flag --generate-only

We use a transfer tx in the following examples:

uptickd tx bank send [from_key_or_address] [to_address] [amount] [flags]

Sign tx offline

uptickd tx sign unsigned.json --name=<key-name> > signed.tx

uptickd tx broadcast

This command is used to broadcast an offline signed transaction to the network.Broadcast offline signed transaction

uptickd tx broadcast signed.json --chain-id=...

uptickd tx multisign

Sign a transaction by multiple accounts. The tx could be broadcasted only when the number of signatures meets the multisig-threshold.

uptickd tx multisign <file> <key-name> <[signature]...> [flags]

Sign the multisig txQuery the multisig address

uptickd keys show <multisig-keyname>

Sign the unsigned.jsonAssume the multisig-threshold is 2, here we sign the unsigned.json by 2 of the signersSign the tx by signer-1:

uptickd tx sign unsigned.json --from=<signer-keyname-1> --chain-id=<chain-id> --multisig=<multisig-address> --signature-only > signed-1.json

Sign the tx by signer-2:

uptickd tx sign unsigned.json --from=<signer-keyname-2> --chain-id=<chain-id> --multisig=<multisig-address> --signature-only > signed-2.json

Merge the signaturesMerge all the signatures into signed.json

uptickd tx multisign --chain-id=<chain-id> unsigned.json <multisig-keyname> signed-1.json signed-2.json > signed.json

Now you can broadcast the signed tx.

uptickd query tx

uptickd query tx [hash] [flags]

uptickd query txs

iris query txs --events 'message.sender=<uptick...>&message.action=xxxx' --page 1 --limit 30

Last updated