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
23f732db
Commit
23f732db
authored
Aug 12, 2023
by
Noah Citron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test double erc721 creation reverts
parent
b337c55f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
OptimismMintableERC20Factory.t.sol
...contracts-bedrock/test/OptimismMintableERC20Factory.t.sol
+1
-1
OptimismMintableERC721Factory.t.sol
...ontracts-bedrock/test/OptimismMintableERC721Factory.t.sol
+12
-0
No files found.
packages/contracts-bedrock/test/OptimismMintableERC20Factory.t.sol
View file @
23f732db
...
@@ -42,7 +42,7 @@ contract OptimismMintableTokenFactory_Test is Bridge_Initializer {
...
@@ -42,7 +42,7 @@ contract OptimismMintableTokenFactory_Test is Bridge_Initializer {
L2TokenFactory.createStandardL2Token(remote, "Beep", "BOOP");
L2TokenFactory.createStandardL2Token(remote, "Beep", "BOOP");
}
}
function test_createStandardL2Token_remoteIsZero_
succeed
s() external {
function test_createStandardL2Token_remoteIsZero_
revert
s() external {
address remote = address(0);
address remote = address(0);
vm.expectRevert("OptimismMintableERC20Factory: must provide remote token address");
vm.expectRevert("OptimismMintableERC20Factory: must provide remote token address");
L2TokenFactory.createStandardL2Token(remote, "Beep", "BOOP");
L2TokenFactory.createStandardL2Token(remote, "Beep", "BOOP");
...
...
packages/contracts-bedrock/test/OptimismMintableERC721Factory.t.sol
View file @
23f732db
...
@@ -53,6 +53,18 @@ contract OptimismMintableERC721Factory_Test is ERC721Bridge_Initializer {
...
@@ -53,6 +53,18 @@ contract OptimismMintableERC721Factory_Test is ERC721Bridge_Initializer {
assertEq(created.REMOTE_CHAIN_ID(), 1);
assertEq(created.REMOTE_CHAIN_ID(), 1);
}
}
function test_createOptimismMintableERC721_sameTwice_reverts() external {
address remote = address(1234);
vm.prank(alice);
factory.createOptimismMintableERC721(remote, "L2Token", "L2T");
vm.expectRevert();
vm.prank(alice);
factory.createOptimismMintableERC721(remote, "L2Token", "L2T");
}
function test_createOptimismMintableERC721_zeroRemoteToken_reverts() external {
function test_createOptimismMintableERC721_zeroRemoteToken_reverts() external {
// Try to create a token with a zero remote token address.
// Try to create a token with a zero remote token address.
vm.expectRevert("OptimismMintableERC721Factory: L1 token address cannot be address(0)");
vm.expectRevert("OptimismMintableERC721Factory: L1 token address cannot be address(0)");
...
...
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