Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ PRIVATE_KEY=

# Constructor arguments / deployment checks
OWNER_ADDRESS=
SOLVER_SIGNER_ADDRESS= # BungeeReceiver deploy only; defaults to deployer
SOLVER_SIGNER_ADDRESS= # BungeeReceiver / RFQVaultExecutor deploy; defaults to deployer

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix SOLVER_SIGNER_ADDRESS formatting to avoid dotenv parse/lint ambiguity.

This line should avoid trailing spaces/comment after =. Keep the comment on its own line.

Suggested fix
-SOLVER_SIGNER_ADDRESS=         # BungeeReceiver / RFQVaultExecutor deploy; defaults to deployer
+# BungeeReceiver / RFQVaultExecutor deploy; defaults to deployer
+SOLVER_SIGNER_ADDRESS=
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
SOLVER_SIGNER_ADDRESS= # BungeeReceiver / RFQVaultExecutor deploy; defaults to deployer
# BungeeReceiver / RFQVaultExecutor deploy; defaults to deployer
SOLVER_SIGNER_ADDRESS=
🧰 Tools
🪛 dotenv-linter (4.0.0)

[warning] 9-9: [SpaceCharacter] The line has spaces around equal sign

(SpaceCharacter)


[warning] 9-9: [ValueWithoutQuotes] This value needs to be surrounded in quotes

(ValueWithoutQuotes)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.env.example at line 9, The SOLVER_SIGNER_ADDRESS configuration line has a
comment appended after the equals sign on the same line, which can cause dotenv
parsing and linting issues. Separate the comment from the variable assignment by
moving the comment to a new line above the SOLVER_SIGNER_ADDRESS definition.
Remove any trailing spaces after the equals sign so the line ends with just the
equals sign, keeping the configuration format consistent with dotenv best
practices.

Source: Linters/SAST tools

OPENROUTER_ADDRESS= # optional override for check:openrouter
OPENROUTER_EVM_VERSION= # optional compile override: cancun or shanghai
ACROSS_MANIPULATOR_ADDRESS= # optional override for check:across-manipulator
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ node_modules
/cache-hh
/artifacts-tron
/cache_hardhat-tron

.DS_Store
12 changes: 12 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,17 @@
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "explicit"
},
"solidity.compileUsingRemoteVersion": "v0.8.34+commit.983a4840b335a15d1418326d7fa830a1252c0848",
"solidity.packageDefaultDependenciesContractsDirectory": "src",
"solidity.packageDefaultDependenciesDirectory": "lib",
"solidity.monoRepoSupport": false,
"solidity.remappings": [
"forge-std/=lib/forge-std/src/",
"solady/=lib/solady/"
],
"[solidity]": {
"editor.tabSize": 4,
"editor.defaultFormatter": "JuanBlanco.solidity"
}
}
17 changes: 17 additions & 0 deletions OPENROUTER_CONTEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,23 @@ Deployment helpers:
- `scripts/deploy/deployOpenRouterByBuildProfile.ts` batches router deploys by `(EVM version, AllowanceHolder address)`, compiles once per profile, then deploys matching networks in parallel with `--no-compile`.
- OpenRouter currently uses Cancun `mcopy` in `src/OpenRouter.sol` and `src/common/lib/BytesSpliceLib.sol`; the patched deploy wrapper refuses Shanghai/no-Cancun OpenRouter builds until those copies are made fork-compatible.

## CctpClaimExecutor (destination CCTP v2 claim)

Contract: [`src/executors/CctpClaimExecutor.sol`](src/executors/CctpClaimExecutor.sol)

- CREATE3 salt: `CctpClaimExecutorV2` (see [`scripts/deploy/create3.ts`](scripts/deploy/create3.ts))
- Expected address (canonical CreateX): `0x424a31A57F7C63918eCaA2Fac38016A8af5A6eC2` on all deployed chains
- Deploy: `scripts/deploy/deployCctpClaimExecutor.ts` (single chain) or `deployCctpClaimExecutorAllChains.ts`
- Required env: `DEPLOYER_PRIVATE_KEY`, `SOLVER_SIGNER_ADDRESS` (must match transmitter `SignerService` / `BungeeReceiver.SOLVER_SIGNER`)
- Source `depositForBurn` must set `mintRecipient` and `destinationCaller` to the claim executor
- Transmitter signs and calls `claim(message, attestation, recipient, feeTaker, quotedRelayFee, signature)`; relay fee is collected in USDC on destination
- Replay protection is on Circle `MessageTransmitter.usedNonces` (no local nonce map); fee split uses minted balance delta minus `quotedRelayFee`

Sync deployed address into:

- `bungee-backend/src/modules/router/routers/cctp-v2/cctp-v2.config.ts` → `CCTP_CLAIM_EXECUTOR_ADDRESSES`
- `new-bungee-transmitter/src/shared/cctp-v2/constants.ts` → `CCTP_CLAIM_EXECUTOR_ADDRESSES`

## Gotchas

- ERC-20 inputs must be submitted through 0x AllowanceHolder, not directly to the router, or `_msgSender() == user` fails.
Expand Down
5 changes: 5 additions & 0 deletions deployments/prod/addresses/arbitrum.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"RFQVaultExecutor": "0x97caCa78AC2a94c67643d07843F85AFAa44a3ea5",
"CelerExecutor": "0x61d2608694f786162d835e5773f019aeab64977d",
"CctpClaimExecutor": "0x424a31a57f7c63918ecaa2fac38016a8af5a6ec2"
}
3 changes: 3 additions & 0 deletions deployments/prod/addresses/arc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"RFQVaultExecutor": "0x97caCa78AC2a94c67643d07843F85AFAa44a3ea5"
}
5 changes: 5 additions & 0 deletions deployments/prod/addresses/avalanche.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"RFQVaultExecutor": "0x97caCa78AC2a94c67643d07843F85AFAa44a3ea5",
"CelerExecutor": "0x61d2608694f786162d835e5773f019aeab64977d",
"CctpClaimExecutor": "0x424a31a57f7c63918ecaa2fac38016a8af5a6ec2"
}
5 changes: 5 additions & 0 deletions deployments/prod/addresses/base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"RFQVaultExecutor": "0x97caCa78AC2a94c67643d07843F85AFAa44a3ea5",
"CelerExecutor": "0x61d2608694f786162d835e5773f019aeab64977d",
"CctpClaimExecutor": "0x424a31A57F7C63918eCaA2Fac38016A8af5A6eC2"
}
3 changes: 3 additions & 0 deletions deployments/prod/addresses/berachain.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"RFQVaultExecutor": "0x97caCa78AC2a94c67643d07843F85AFAa44a3ea5"
}
3 changes: 3 additions & 0 deletions deployments/prod/addresses/blast.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"RFQVaultExecutor": "0x97caCa78AC2a94c67643d07843F85AFAa44a3ea5"
}
4 changes: 4 additions & 0 deletions deployments/prod/addresses/bsc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"RFQVaultExecutor": "0x97caCa78AC2a94c67643d07843F85AFAa44a3ea5",
"CelerExecutor": "0x61d2608694f786162d835e5773f019aeab64977d"
}
5 changes: 5 additions & 0 deletions deployments/prod/addresses/ethereum.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"RFQVaultExecutor": "0x97caCa78AC2a94c67643d07843F85AFAa44a3ea5",
"CelerExecutor": "0x61d2608694f786162d835e5773f019aeab64977d",
"CctpClaimExecutor": "0x424a31a57f7c63918ecaa2fac38016a8af5a6ec2"
}
3 changes: 3 additions & 0 deletions deployments/prod/addresses/gnosis.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"RFQVaultExecutor": "0x97caCa78AC2a94c67643d07843F85AFAa44a3ea5"
}
4 changes: 4 additions & 0 deletions deployments/prod/addresses/hyperEvm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"RFQVaultExecutor": "0x97caCa78AC2a94c67643d07843F85AFAa44a3ea5",
"CctpClaimExecutor": "0x424a31a57f7c63918ecaa2fac38016a8af5a6ec2"
}
4 changes: 4 additions & 0 deletions deployments/prod/addresses/ink.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"RFQVaultExecutor": "0x97caCa78AC2a94c67643d07843F85AFAa44a3ea5",
"CctpClaimExecutor": "0x424a31a57f7c63918ecaa2fac38016a8af5a6ec2"
}
3 changes: 3 additions & 0 deletions deployments/prod/addresses/katana.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"RFQVaultExecutor": "0x97caCa78AC2a94c67643d07843F85AFAa44a3ea5"
}
5 changes: 5 additions & 0 deletions deployments/prod/addresses/linea.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"RFQVaultExecutor": "0x97caCa78AC2a94c67643d07843F85AFAa44a3ea5",
"CelerExecutor": "0x61d2608694f786162d835e5773f019aeab64977d",
"CctpClaimExecutor": "0x424a31a57f7c63918ecaa2fac38016a8af5a6ec2"
}
3 changes: 3 additions & 0 deletions deployments/prod/addresses/mantle.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"RFQVaultExecutor": "0x97caCa78AC2a94c67643d07843F85AFAa44a3ea5"
}
3 changes: 3 additions & 0 deletions deployments/prod/addresses/megaeth.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"RFQVaultExecutor": "0x97caCa78AC2a94c67643d07843F85AFAa44a3ea5"
}
3 changes: 3 additions & 0 deletions deployments/prod/addresses/mode.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"RFQVaultExecutor": "0x97caCa78AC2a94c67643d07843F85AFAa44a3ea5"
}
4 changes: 4 additions & 0 deletions deployments/prod/addresses/monad.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"RFQVaultExecutor": "0x97caCa78AC2a94c67643d07843F85AFAa44a3ea5",
"CctpClaimExecutor": "0x424a31a57f7c63918ecaa2fac38016a8af5a6ec2"
}
5 changes: 5 additions & 0 deletions deployments/prod/addresses/optimism.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"RFQVaultExecutor": "0x97caCa78AC2a94c67643d07843F85AFAa44a3ea5",
"CelerExecutor": "0x61d2608694f786162d835e5773f019aeab64977d",
"CctpClaimExecutor": "0x424a31a57f7c63918ecaa2fac38016a8af5a6ec2"
}
3 changes: 3 additions & 0 deletions deployments/prod/addresses/plasma.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"RFQVaultExecutor": "0x97caCa78AC2a94c67643d07843F85AFAa44a3ea5"
}
4 changes: 4 additions & 0 deletions deployments/prod/addresses/plume.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"RFQVaultExecutor": "0x97caCa78AC2a94c67643d07843F85AFAa44a3ea5",
"CctpClaimExecutor": "0x424a31a57f7c63918ecaa2fac38016a8af5a6ec2"
}
5 changes: 5 additions & 0 deletions deployments/prod/addresses/polygon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"RFQVaultExecutor": "0x97caCa78AC2a94c67643d07843F85AFAa44a3ea5",
"CelerExecutor": "0x61d2608694f786162d835e5773f019aeab64977d",
"CctpClaimExecutor": "0x424a31a57f7c63918ecaa2fac38016a8af5a6ec2"
}
3 changes: 3 additions & 0 deletions deployments/prod/addresses/scroll.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"RFQVaultExecutor": "0x97caCa78AC2a94c67643d07843F85AFAa44a3ea5"
}
4 changes: 4 additions & 0 deletions deployments/prod/addresses/sei.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"RFQVaultExecutor": "0x97caCa78AC2a94c67643d07843F85AFAa44a3ea5",
"CctpClaimExecutor": "0x424a31a57f7c63918ecaa2fac38016a8af5a6ec2"
}
3 changes: 3 additions & 0 deletions deployments/prod/addresses/soneium.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"RFQVaultExecutor": "0x97caCa78AC2a94c67643d07843F85AFAa44a3ea5"
}
4 changes: 4 additions & 0 deletions deployments/prod/addresses/sonic.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"RFQVaultExecutor": "0x97caCa78AC2a94c67643d07843F85AFAa44a3ea5",
"CctpClaimExecutor": "0x424a31a57f7c63918ecaa2fac38016a8af5a6ec2"
}
4 changes: 4 additions & 0 deletions deployments/prod/addresses/unichain.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"RFQVaultExecutor": "0x97caCa78AC2a94c67643d07843F85AFAa44a3ea5",
"CctpClaimExecutor": "0x424a31A57F7C63918eCaA2Fac38016A8af5A6eC2"
}
4 changes: 4 additions & 0 deletions deployments/prod/addresses/worldchain.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"RFQVaultExecutor": "0x97caCa78AC2a94c67643d07843F85AFAa44a3ea5",
"CctpClaimExecutor": "0x424a31a57f7c63918ecaa2fac38016a8af5a6ec2"
}
41 changes: 0 additions & 41 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@
"deploy:allowance-holder": "hardhat run scripts/deploy/deployAllowanceHolder.ts --network",
"deploy:receiver-executor": "hardhat run scripts/deploy/deployReceiverAllChains.ts",
"deploy:across-manipulator": "hardhat run scripts/deploy/deployAcrossERC20AmountManipulator.ts --network",
"deploy:cctp-claim-executor:all": "ts-node scripts/deploy/deployCctpClaimExecutorAllChains.ts",
"deploy:rfq-vault-executor:all": "ts-node scripts/deploy/deployRFQVaultExecutorAllChains.ts",
"deploy:rfq-vault-executor": "hardhat run scripts/deploy/deployRFQVaultExecutor.ts --network",
"check:openrouter": "hardhat run scripts/deploy/checkOpenRouterDeployment.ts",
"verify:openrouter": "ts-node scripts/deploy/verifyOpenRouterBatch.ts",
"check:allowance-holder": "hardhat run scripts/deploy/checkAllowanceHolderDeployment.ts",
"verify:allowance-holder": "ts-node scripts/deploy/verifyAllowanceHolderBatch.ts",
"verify:rfq-vault-executor": "ts-node scripts/deploy/verifyRFQVaultExecutorBatch.ts",
"verify:cctp-claim-executor": "ts-node scripts/deploy/verifyCctpClaimExecutorBatch.ts",
"check:receiver": "hardhat run scripts/deploy/checkReceiverAllChains.ts",
"check:deployer-balances": "hardhat run scripts/deploy/checkDeployerBalances.ts",
"check:across-manipulator": "hardhat run scripts/deploy/checkAcrossManipulatorDeployment.ts",
Expand Down
76 changes: 76 additions & 0 deletions scripts/deploy/cctpClaimExecutorAddresses.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import { mkdir, readFile, writeFile } from 'fs/promises';
import { dirname, resolve } from 'path';

export type CctpClaimExecutorDeployments = {
CctpClaimExecutor: string;
};

export function cctpClaimExecutorAddressesPath(
network: string,
stage = 'prod',
): string {
return resolve(
process.cwd(),
'deployments',
stage,
'addresses',
`${network}.json`,
);
}

export async function readCctpClaimExecutorAddress(
network: string,
stage = 'prod',
): Promise<string | undefined> {
const filePath = cctpClaimExecutorAddressesPath(network, stage);

try {
const raw = await readFile(filePath, 'utf8');
const deployments = JSON.parse(raw) as Partial<CctpClaimExecutorDeployments>;
const address = deployments.CctpClaimExecutor?.trim();

if (!address) {
return undefined;
}

return address;
} catch (err) {
if ((err as NodeJS.ErrnoException).code === 'ENOENT') {
return undefined;
}

throw err;
}
}

/**
* Persists CctpClaimExecutor address for a network.
*/
export async function writeCctpClaimExecutorAddress(
network: string,
address: string,
stage = 'prod',
): Promise<string> {
const filePath = cctpClaimExecutorAddressesPath(network, stage);
let deployments: Partial<CctpClaimExecutorDeployments> = {};

try {
const raw = await readFile(filePath, 'utf8');
deployments = JSON.parse(raw) as Partial<CctpClaimExecutorDeployments>;
} catch (err) {
if ((err as NodeJS.ErrnoException).code !== 'ENOENT') {
throw err;
}
}

deployments.CctpClaimExecutor = address;

await mkdir(dirname(filePath), { recursive: true });
await writeFile(
filePath,
`${JSON.stringify(deployments, null, 2)}\n`,
'utf8',
);

return filePath;
}
Loading