Skip to content

Instantly share code, notes, and snippets.

@AyushBherwani1998
Last active November 3, 2025 04:01
Show Gist options
  • Select an option

  • Save AyushBherwani1998/dd97846406f61bd6001ef2aaa062d7fd to your computer and use it in GitHub Desktop.

Select an option

Save AyushBherwani1998/dd97846406f61bd6001ef2aaa062d7fd to your computer and use it in GitHub Desktop.
const grantedPermissions = await walletClient.requestExecutionPermissions([{
// ...
permission: {
type: "erc20-token-periodic",
data: {
tokenAddress,
// 1 USDC in WEI format. Since USDC has 6 decimals, 10 * 10^6
periodAmount: parseUnits("10", 6),
// 1 day in seconds
periodDuration: 86400,
justification?: "Permission to transfer 1 USDC every day",
},
},
// ...
}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment