-
Notifications
You must be signed in to change notification settings - Fork 9
EVM Forwarder SC implementation #359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements an EVM smart contract to enable bridging of USDC tokens from EVM-compatible chains to Neutron via the CCTP (Cross-Chain Transfer Protocol). The contract acts as a temporary holder and forwarder of USDC tokens, with role-based access control and emergency pause functionality.
Key Changes
- New Solidity smart contract
CCTPUSDCForwarderwith operator/admin roles for bridging USDC via CCTP - Hardhat development environment setup with TypeScript configuration and OpenZeppelin dependencies
- Documentation explaining the contract's purpose, constructor parameters, and compilation instructions
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| contracts/inflow/evm/contracts/CCTPUSDCForwarder.sol | Core forwarder contract implementing CCTP bridge integration with pause mechanism and role-based access control |
| contracts/inflow/evm/package.json | Node.js project configuration with Hardhat and OpenZeppelin dependencies |
| contracts/inflow/evm/tsconfig.json | TypeScript configuration for Node 22 compatibility |
| contracts/inflow/evm/hardhat.config.ts | Hardhat configuration specifying Solidity 0.8.28 |
| contracts/inflow/evm/.gitignore | Git ignore patterns for node_modules, build artifacts, and cache directories |
| contracts/inflow/evm/README.md | Documentation describing the contract's purpose, parameters, and compilation process |
| .changelog/unreleased/features/359-evm-forwarder-contract.md | Changelog entry for the new forwarder contract feature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
|
The basic CCTP wrapper looks good to me. Did you try this on some networks already? How much gas is it to instantiate this? Would be interested to see for ETH and Base The next step would probably be to harden this: |
Tried it on Ethereum. Instantiated 2 contracts and the costs were: After SC is paused, an admin can call approve() to grant access to any address to spend tokens held by the contract. Then the specified address can call transferFrom() directly on ERC-20 contract to move the USDC to new owner. But if you want, we can introduce new function that will immediately move the funds to new owner? |
|
At time of writing, looks like it's about 10 cents to instantiate this. The approval sounds good enough, even if it's not so direct. But it feels like charging the fee through the approval is a bit weird, but maybe this is just the way to do it in Solidity? I would expect that when we bridge, a hardcoded portion of the amount (say, 0.1% with a minimum of 0.2 USDC) is taken from the funds and given to a feecollector |
Description
Implementation of EVM SC to bridge USDC tokens from EVM chains to Neutron in order to deploy them in Inflow USDC Vault.
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
.changelogmake compileand included content of the artifacts directory into the PRmake schemaand included generated files into the PR