Skip to main content
This guide commits a rule for an ERC-20 wallet on Polygon Amoy. The rule sends 5 EURe to a friend on the 1st of each month.
1

Install the SDK

2

Create a client

3

Write the rule

A rule is a short YAML document. The SDK has builders for common rules, and you can also write the document by hand.
4

Stage and commit

Staging checks the document and returns warnings that you can show to the user. Committing asks the wallet to sign.
The wallet shows one approval for each token the rule spends, then one transaction for the commit.
5

Watch it run

To stop every rule at once, call setErc20AllowBlocked({ blocked: true }), or revoke the token approval from any wallet app.