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
d19d1137
Commit
d19d1137
authored
Jun 23, 2023
by
Mark Tyneway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nits: cleanup
parent
7168db67
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
15 deletions
+17
-15
package.json
packages/contracts-bedrock/package.json
+0
-1
Deploy.s.sol
packages/contracts-bedrock/scripts/Deploy.s.sol
+3
-1
DeployConfig.s.sol
packages/contracts-bedrock/scripts/DeployConfig.s.sol
+14
-13
No files found.
packages/contracts-bedrock/package.json
View file @
d19d1137
...
...
@@ -26,7 +26,6 @@
"build:fuzz"
:
"(cd test-case-generator && go build ./cmd/fuzz.go)"
,
"autogen:artifacts"
:
"ts-node scripts/generate-artifacts.ts"
,
"autogen:invariant-docs"
:
"ts-node scripts/invariant-doc-gen.ts"
,
"deploy"
:
"hardhat deploy"
,
"test"
:
"yarn build:differential && yarn build:fuzz && forge test"
,
"coverage"
:
"yarn build:differential && yarn build:fuzz && forge coverage"
,
"coverage:lcov"
:
"yarn build:differential && yarn build:fuzz && forge coverage --report lcov"
,
...
...
packages/contracts-bedrock/scripts/Deploy.s.sol
View file @
d19d1137
...
...
@@ -191,7 +191,9 @@ contract Deploy is Deployer {
/// @notice Deploy the OptimismMintableERC20FactoryProxy
function deployOptimismMintableERC20FactoryProxy() broadcast() public returns (address) {
address proxyAdmin = mustGetAddress("ProxyAdmin");
Proxy proxy = new Proxy(proxyAdmin);
Proxy proxy = new Proxy({
_admin: proxyAdmin
});
address admin = address(uint160(uint256(vm.load(address(proxy), OWNER_KEY))));
require(admin == proxyAdmin);
...
...
packages/contracts-bedrock/scripts/DeployConfig.s.sol
View file @
d19d1137
...
...
@@ -88,21 +88,13 @@ contract DeployConfig is Script {
return tag;
} catch {
try vm.parseJsonString(_json, "$.l1StartingBlockTag") returns (string memory tag) {
string[] memory cmd = new string[](3);
cmd[0] = "/usr/bin/bash";
cmd[1] = "-c";
cmd[2] = string.concat("cast block ", tag, " --json | jq -r .hash");
bytes memory res = vm.ffi(cmd);
return abi.decode(res, (bytes32));
return _getBlockByTag(tag);
} catch {
try vm.parseJsonUint(_json, "$.l1StartingBlockTag") returns (uint256 tag) {
string[] memory cmd = new string[](3);
cmd[0] = "/usr/bin/bash";
cmd[1] = "-c";
cmd[2] = string.concat("cast block ", vm.toString(tag), " --json | jq -r .hash");
bytes memory res = vm.ffi(cmd);
return abi.decode(res, (bytes32));
} catch {}
return _getBlockByTag(vm.toString(tag));
} catch {
revert("cannot fetch l1StartingBlockTag");
}
}
}
revert("l1StartingBlockTag must be a bytes32, string or uint256");
...
...
@@ -120,4 +112,13 @@ contract DeployConfig is Script {
}
return uint256(_l2OutputOracleStartingTimestamp);
}
function _getBlockByTag(string memory _tag) internal returns (bytes32) {
string[] memory cmd = new string[](3);
cmd[0] = "/usr/bin/bash";
cmd[1] = "-c";
cmd[2] = string.concat("cast block ", _tag, " --json | jq -r .hash");
bytes memory res = vm.ffi(cmd);
return abi.decode(res, (bytes32));
}
}
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