feat: port token approve#40
Merged
ajaskolski merged 1 commit intomainfrom May 6, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a small reusable helper in the common/changeset package to perform an ERC20 approve transaction using the environment’s configured EVM chain (client + deployer key), along with a simulated-EVM test to validate the allowance change.
Changes:
- Added
ApproveTokenhelper to approve a spender/router to pull ERC20 tokens from the deployer on a selected EVM chain. - Added tests covering the happy-path approval on a simulated EVM chain and the “unknown chain selector” error path.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| common/changeset/token_approve.go | Introduces ApproveToken helper that binds an ERC20 at tokenAddress, calls Approve, and confirms the tx on the selected EVM chain. |
| common/changeset/token_approve_test.go | Adds simulated-chain coverage verifying allowance changes and verifies error behavior for an unknown chain selector. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ChrisAmora
approved these changes
May 6, 2026
jkongie
added a commit
that referenced
this pull request
May 6, 2026
🤖 I have created a release *beep* *boop* --- ## [0.1.0](cld-changesets-v0.0.1...cld-changesets-v0.1.0) (2026-05-06) ### Features * add "catalog create chain metadata" changeset ([#36](#36)) ([c12bb51](c12bb51)) * add catalog create contract metadata changeset ([#27](#27)) ([8ec1cbc](8ec1cbc)) * add CRE workflow deploy changeset and operation ([#1](#1)) ([960fde1](960fde1)) * add target name param to cre deploy changeset ([#3](#3)) ([8b25662](8b25662)) * fund mcms pdas ([#22](#22)) ([821e542](821e542)) * **jobspec:** port jobspec changesets from chainlink ([#21](#21)) ([0ce3f74](0ce3f74)) * link token ([#30](#30)) ([07345c1](07345c1)) * **pkg:** add contract constants and Solana MCMS state loading ([#5](#5)) ([6a2bbee](6a2bbee)) * port BuildProposalFromBatchesV2 ([#24](#24)) ([28d53d7](28d53d7)) * port run changeset from chainlink ([#32](#32)) ([693922f](693922f)) * port solana grant role ([#33](#33)) ([7eca5be](7eca5be)) * port token approve ([#40](#40)) ([04130de](04130de)) * **port:** firedrill mcms with operations api refactor ([#25](#25)) ([6d9010c](6d9010c)) * **solana:** add SOL funding helpers for deployer transfers ([#19](#19)) ([63bebf8](63bebf8)) * **solana:** port over mcms pda loader ([#11](#11)) ([7170ddc](7170ddc)) ### Bug Fixes * **aptos:** move state load ([#8](#8)) ([de58102](de58102)) * **evm:** port state load evm funcs ([#9](#9)) ([99279f1](99279f1)) * **state:** restore addressbook usage ([#17](#17)) ([017cd5e](017cd5e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: app-token-issuer-ops-platform[bot] <275822481+app-token-issuer-ops-platform[bot]@users.noreply.github.com> Co-authored-by: James Kong <61834+jkongie@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://smartcontract-it.atlassian.net/browse/CLD-2110