-
Notifications
You must be signed in to change notification settings - Fork 0
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
Bridge via Hinting #103
Bridge via Hinting #103
Conversation
34ac678
to
861e453
Compare
781dbd8
to
995e88f
Compare
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.
Simple but effective. Nice work
src/builder/actions/Actions.sol
Outdated
@@ -1,6 +1,8 @@ | |||
// SPDX-License-Identifier: BSD-3-Clause | |||
pragma solidity ^0.8.27; | |||
|
|||
import {console} from "../console.sol"; |
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.
nit: we've been preferring absolute paths over relative paths for imports
src/builder/actions/Actions.sol
Outdated
@@ -1,6 +1,8 @@ | |||
// SPDX-License-Identifier: BSD-3-Clause | |||
pragma solidity ^0.8.27; | |||
|
|||
import {console} from "../console.sol"; |
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.
Can't you just import it from Foundry directly? via import {console} from "forge-std/console.sol"
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.
Yes, I could, but then I get a stack too deep error. Go figure :(
@@ -424,6 +455,163 @@ contract QuarkBuilderTransferTest is Test, QuarkBuilderTest { | |||
assertNotEq(result.eip712Data.hashStruct, hex"", "non-empty hashStruct"); | |||
} | |||
|
|||
function testSimpleBridgeWithAcrossTransferSucceeds() public { |
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.
I think a better place to put this would be in BridgeLogic.t.sol
so we have a unified place to find the bridging tests.
This patch simply reverses the order s.t. we bridge via Across if possible, then CCTP otherwise. Technically this means we'll never bridge via CCTP, but we'll probably adjust our overall system to allow user-hinting, etc, to retain CCTP support. Also, we move first-class support for console logs. Note: (a) we'll need to implement console logs in Eth.swift, and (b) we should just update `forge-std` and then use `import {console} from "forge-std/console.sol";` but upgrading forge-std causes stack too deep issues.
c8e6569
to
713238f
Compare
This patch simply reverses the order s.t. we bridge via Across if possible, then CCTP otherwise based on a user hint (
preferAcross
).Also, we move first-class support for console logs. Note: (a) we'll need to implement console logs in Eth.swift, and (b) we should just update
forge-std
and then useimport {console} from "forge-std/console.sol";
but upgrading forge-std causes stack too deep issues.