Repository navigation
improve: add Tron variants for SpokePoolPeriphery and SwapProxy - #1502
Conversation
There was a problem hiding this comment.
💡 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)); |
There was a problem hiding this comment.
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 👍 / 👎.
…Token Transfers (#1505) * address audit finding with comment updates * refine comments
…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>
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>
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>
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>
No description provided.