File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,12 +42,21 @@ def cli():
4242Once the simulation is complete, the decorator will collect all receipts it finds from the ` safe ` 's
4343history during that session, and collect them into a single SafeTx to propose to a public network.
4444
45- ``` {note }
45+ ``` {important }
4646The name of the decorated function in your queue script **must** be `cli` for it to work.
4747```
4848
49- ``` {note}
5049The decorated function may have ` safe ` or ` submitter ` args in it, in order to access their values.
50+
51+ ``` py
52+ @propose_from_simulation ()
53+ # NOTE : Can also just use `def cli(safe):` if you don't need `submitter`
54+ def cli (safe , submitter ):
55+ # You can use `safe` or `submitter` in your script to query values from the chain
56+ bal_before = token.balanceOf(submitter)
57+ amount = token.balanceOf(safe)
58+ token.transfer(submitter, amount)
59+ assert token.balanceOf(submitter) == bal_before + amount
5160```
5261
5362You can run the script directly using the following command, and it will dry-run the transaction:
You can’t perform that action at this time.
0 commit comments