autonity / docs.autonity.org

Documentation for the Autonity Go Client (AGC)
https://docs.autonity.org
2 stars 5 forks source link

Guide Submit tx using `aut`: Clarify setting `--keyfile` in piped commands in `aut` #187

Open cmjc opened 5 months ago

cmjc commented 5 months ago

Description

aut allows you to chain commands using -| pipe delimiters.

For example, to create, sign, send a transaction:

aut tx make --to <RECIPIENT_ADDRESS> --value 1 | aut tx sign - | aut tx send -

This example assumes a keyfile set in .autrc.

It isn't immediately clear that in a scenario where you have a keyfile set in .autrc and specify a keyfile in one command you will need to consistently set that keyfile in the piped commands.

E.g. if Alice is set in .autrc and Bob is set in make, the sign will error as sign will error saying as the made from address is Bob and sign is using the Alice address.

Rationale

A note clarifying this will prevent user errors.

Implementation

Add a notebox clarifying this in Guide https://docs.autonity.org/account-holders/submit-trans-aut/