Skip to main content
You can limit the amount of ERC20 tokens transferable with the policy. To enable the policy:
const session: Session = {
  owners: {
    type: 'ecdsa',
    accounts: [sessionOwnerAccount],
  },
  actions: [
    {
      policies: [
        {
          type: 'spending-limits',
          limits: [
            {
              token: usdcAddress,
              amount: parseUnits('10', 6),
            },
            {
              token: wethAddress,
              amount: parseUnits('0.1', 18),
            },
          ],
        },
      ],
    },
  ],
}
This will cap all transfers within the session to 10 USDC and 0.1 WETH in total.