Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
c4b11ccd
Commit
c4b11ccd
authored
Jun 26, 2023
by
clabby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade foundry version in CI
parent
15660862
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
30 deletions
+29
-30
Dockerfile
ops/docker/ci-builder/Dockerfile
+1
-1
README.md
packages/contracts-bedrock/README.md
+1
-1
L1StandardBridge.t.sol
...s/contracts-bedrock/contracts/test/L1StandardBridge.t.sol
+27
-28
No files found.
ops/docker/ci-builder/Dockerfile
View file @
c4b11ccd
...
@@ -16,7 +16,7 @@ WORKDIR /opt/foundry
...
@@ -16,7 +16,7 @@ WORKDIR /opt/foundry
# Only diff from upstream docker image is this clone instead
# Only diff from upstream docker image is this clone instead
# of COPY. We select a specific commit to use.
# of COPY. We select a specific commit to use.
RUN
git clone https://github.com/foundry-rs/foundry.git
.
\
RUN
git clone https://github.com/foundry-rs/foundry.git
.
\
&&
git checkout da2392e58bb8a7fefeba46b40c4df1afad8ccd22
&&
git checkout 3b1129b5bc43ba22a9bcf4e4323c5a9df0023140
RUN
source
$HOME
/.profile
&&
\
RUN
source
$HOME
/.profile
&&
\
cargo build
--release
&&
\
cargo build
--release
&&
\
...
...
packages/contracts-bedrock/README.md
View file @
c4b11ccd
...
@@ -59,7 +59,7 @@ We work on this repository with a combination of [Hardhat](https://hardhat.org)
...
@@ -59,7 +59,7 @@ We work on this repository with a combination of [Hardhat](https://hardhat.org)
1.
Install Foundry by following
[
the instructions located here
](
https://getfoundry.sh/
)
.
1.
Install Foundry by following
[
the instructions located here
](
https://getfoundry.sh/
)
.
A specific version must be used.
A specific version must be used.
```
shell
```
shell
foundryup
-C
da2392e58bb8a7fefeba46b40c4df1afad8ccd22
foundryup
-C
3b1129b5bc43ba22a9bcf4e4323c5a9df0023140
```
```
2.
Install node modules with yarn (v1) and Node.js (16+):
2.
Install node modules with yarn (v1) and Node.js (16+):
...
...
packages/contracts-bedrock/contracts/test/L1StandardBridge.t.sol
View file @
c4b11ccd
...
@@ -474,17 +474,6 @@ contract L1StandardBridge_DepositERC20To_Test is Bridge_Initializer {
...
@@ -474,17 +474,6 @@ contract L1StandardBridge_DepositERC20To_Test is Bridge_Initializer {
hex""
hex""
);
);
// the L1 bridge should call L1CrossDomainMessenger.sendMessage
vm.expectCall(
address(L1Messenger),
abi.encodeWithSelector(
CrossDomainMessenger.sendMessage.selector,
address(L2Bridge),
message,
10000
)
);
bytes memory innerMessage = abi.encodeWithSelector(
bytes memory innerMessage = abi.encodeWithSelector(
CrossDomainMessenger.relayMessage.selector,
CrossDomainMessenger.relayMessage.selector,
nonce,
nonce,
...
@@ -496,18 +485,6 @@ contract L1StandardBridge_DepositERC20To_Test is Bridge_Initializer {
...
@@ -496,18 +485,6 @@ contract L1StandardBridge_DepositERC20To_Test is Bridge_Initializer {
);
);
uint64 baseGas = L1Messenger.baseGas(message, 10000);
uint64 baseGas = L1Messenger.baseGas(message, 10000);
vm.expectCall(
address(op),
abi.encodeWithSelector(
OptimismPortal.depositTransaction.selector,
address(L2Messenger),
0,
baseGas,
false,
innerMessage
)
);
bytes memory opaqueData = abi.encodePacked(
bytes memory opaqueData = abi.encodePacked(
uint256(0),
uint256(0),
uint256(0),
uint256(0),
...
@@ -516,6 +493,11 @@ contract L1StandardBridge_DepositERC20To_Test is Bridge_Initializer {
...
@@ -516,6 +493,11 @@ contract L1StandardBridge_DepositERC20To_Test is Bridge_Initializer {
innerMessage
innerMessage
);
);
deal(address(L1Token), alice, 100000, true);
vm.prank(alice);
L1Token.approve(address(L1Bridge), type(uint256).max);
// Should emit both the bedrock and legacy events
// Should emit both the bedrock and legacy events
vm.expectEmit(true, true, true, true, address(L1Bridge));
vm.expectEmit(true, true, true, true, address(L1Bridge));
emit ERC20DepositInitiated(address(L1Token), address(L2Token), alice, bob, 1000, hex"");
emit ERC20DepositInitiated(address(L1Token), address(L2Token), alice, bob, 1000, hex"");
...
@@ -535,11 +517,28 @@ contract L1StandardBridge_DepositERC20To_Test is Bridge_Initializer {
...
@@ -535,11 +517,28 @@ contract L1StandardBridge_DepositERC20To_Test is Bridge_Initializer {
vm.expectEmit(true, true, true, true, address(L1Messenger));
vm.expectEmit(true, true, true, true, address(L1Messenger));
emit SentMessageExtension1(address(L1Bridge), 0);
emit SentMessageExtension1(address(L1Bridge), 0);
deal(address(L1Token), alice, 100000, true);
// the L1 bridge should call L1CrossDomainMessenger.sendMessage
vm.expectCall(
vm.prank(alice);
address(L1Messenger),
L1Token.approve(address(L1Bridge), type(uint256).max);
abi.encodeWithSelector(
CrossDomainMessenger.sendMessage.selector,
address(L2Bridge),
message,
10000
)
);
// The L1 XDM should call OptimismPortal.depositTransaction
vm.expectCall(
address(op),
abi.encodeWithSelector(
OptimismPortal.depositTransaction.selector,
address(L2Messenger),
0,
baseGas,
false,
innerMessage
)
);
vm.expectCall(
vm.expectCall(
address(L1Token),
address(L1Token),
abi.encodeWithSelector(ERC20.transferFrom.selector, alice, address(L1Bridge), 1000)
abi.encodeWithSelector(ERC20.transferFrom.selector, alice, address(L1Bridge), 1000)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment