Skip to content

improve: add Tron variants for SpokePoolPeriphery and SwapProxy - #1502

Merged
tbwebb22 merged 3 commits into
masterfrom
taylor/tron-spokepool-periphery
Aug 13, 2026
Merged

tbwebb22 merged 3 commits into
masterfrom
taylor/tron-spokepool-periphery

Conversation

@tbwebb22

Copy link
Copy Markdown
Contributor

No description provided.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b5ba27e5b2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


// Deploy the swap proxy with reference to the permit2 address
swapProxy = new SwapProxy(address(_permit2));
swapProxy = _deploySwapProxy(address(_permit2));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Instantiate the Tron proxy outside the base constructor

When Tron_SpokePoolPeriphery is constructed, this call occurs inside the SpokePoolPeriphery constructor, where Solidity resolves virtual calls to the implementation defined by the contract currently being constructed rather than the derived override. Consequently _deploySwapProxy creates a regular SwapProxy, so swaps where Tron USDT is transferred from the proxy to the exchange or back to the periphery still revert on its false return value, defeating the purpose of the Tron variant.

Useful? React with 👍 / 👎.

fusmanii
fusmanii previously approved these changes Jul 25, 2026
@tbwebb22 tbwebb22 changed the title add Tron variants for SpokePoolPeriphery and SwapProxy improve: add Tron variants for SpokePoolPeriphery and SwapProxy Jul 25, 2026
…Token Transfers (#1505)

* address audit finding with comment updates

* refine comments
@tbwebb22
tbwebb22 merged commit 5026336 into master Aug 13, 2026
8 of 9 checks passed
@tbwebb22
tbwebb22 deleted the taylor/tron-spokepool-periphery branch August 13, 2026 21:37
pxrl pushed a commit that referenced this pull request Aug 14, 2026
…1525)

#1481 added a fourth `_gateway` constructor parameter to
Ethereum_SpokePool. #1502 was branched from master before that landed and
was never rebased, so the Tron_SpokePoolPeriphery test it introduced still
constructs Ethereum_SpokePool with three arguments. Its own CI was green
against the stale base, and master has failed to compile since the merge:

    Error (6160): Wrong argument count for function call: 3 arguments
    given but expected 4.
      --> test/evm/foundry/local/Tron_SpokePoolPeriphery.t.sol:59:35

Pass `address(0)` for the gateway, matching the three other
`new Ethereum_SpokePool(...)` call sites in the test suite.

Signed-off-by: droplet-rl <284132418+droplet-rl@users.noreply.github.com>
Co-authored-by: droplet-rl <284132418+droplet-rl@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
droplet-rl added a commit that referenced this pull request Sep 16, 2026
Deployed at 0xE791A2669bef779Ff7A4A9CF789F8Ee2CA20a32c in block 21152202,
tx 0xafd59e25211536dba5b5099e1dcb3f62ffab07441e1053f0993e0d7059db5a68.

This does not land on 0x97CCDBea4632140639aD5eA9b944aa034eb15fD4, the
address used by the other EVM chains. The salt (0x1236), the CREATE2
factory and the constructor args are all unchanged; the initcode differs
because the compiled SpokePoolPeriphery grew 741 bytes after those chains
were deployed, via #1502 (Tron variants, which also changed the SwapProxy
whose initcode is embedded here by the constructor) and #1529 (relative
timestamps). Consumers resolve the address per chain through
getDeployedAddress, as they already do for Arc's MulticallHandler.

Note that #1529 changed the signed-payload hash, so an Arc signing flow
must use the post-#1529 shape rather than the one the other chains expect.

Unverified on the explorer: foundry.toml has no etherscan entry for Arc.

Co-Authored-By: Claude <noreply@anthropic.com>
droplet-rl added a commit that referenced this pull request Sep 16, 2026
Deployed at 0xE791A2669bef779Ff7A4A9CF789F8Ee2CA20a32c in block 21152202,
tx 0xafd59e25211536dba5b5099e1dcb3f62ffab07441e1053f0993e0d7059db5a68.

This does not land on 0x97CCDBea4632140639aD5eA9b944aa034eb15fD4, the
address used by the other EVM chains. The salt (0x1236), the CREATE2
factory and the constructor args are all unchanged; the initcode differs
because the compiled SpokePoolPeriphery grew 741 bytes after those chains
were deployed, via #1502 (Tron variants, which also changed the SwapProxy
whose initcode is embedded here by the constructor) and #1529 (relative
timestamps). Consumers resolve the address per chain through
getDeployedAddress, as they already do for Arc's MulticallHandler.

Note that #1529 changed the signed-payload hash, so an Arc signing flow
must use the post-#1529 shape rather than the one the other chains expect.

Unverified on the explorer: foundry.toml has no etherscan entry for Arc.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: droplet-rl <284132418+droplet-rl@users.noreply.github.com>
droplet-rl added a commit that referenced this pull request Sep 16, 2026
Deployed at 0xE791A2669bef779Ff7A4A9CF789F8Ee2CA20a32c in block 21152202,
tx 0xafd59e25211536dba5b5099e1dcb3f62ffab07441e1053f0993e0d7059db5a68.

This does not land on 0x97CCDBea4632140639aD5eA9b944aa034eb15fD4, the
address used by the other EVM chains. The salt (0x1236), the CREATE2
factory and the constructor args are all unchanged; the initcode differs
because the compiled SpokePoolPeriphery grew 741 bytes after those chains
were deployed, via #1502 (Tron variants, which also changed the SwapProxy
whose initcode is embedded here by the constructor) and #1529 (relative
timestamps). Consumers resolve the address per chain through
getDeployedAddress, as they already do for Arc's MulticallHandler.

Note that #1529 changed the signed-payload hash, so an Arc signing flow
must use the post-#1529 shape rather than the one the other chains expect.

Unverified on the explorer: foundry.toml has no etherscan entry for Arc.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: droplet-rl <284132418+droplet-rl@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants