Commit 9272253e authored by Mark Tyneway's avatar Mark Tyneway

contracts-bedrock: make a library call internal

So we don't have to handle library linking
in the state surgery
parent 3fc87053
---
'@eth-optimism/contracts-bedrock': patch
---
Make a library call internal
......@@ -128,8 +128,8 @@ OptimismMintableERC20_Test:test_mint() (gas: 65763)
OptimismMintableERC20_Test:test_mintRevertsFromNotBridge() (gas: 13252)
OptimismMintableERC20_Test:test_remoteToken() (gas: 9740)
OptimismMintableTokenFactory_Test:test_bridge() (gas: 7663)
OptimismMintableTokenFactory_Test:test_createStandardL2Token() (gas: 1112929)
OptimismMintableTokenFactory_Test:test_createStandardL2TokenSameTwice() (gas: 2208763)
OptimismMintableTokenFactory_Test:test_createStandardL2Token() (gas: 1109735)
OptimismMintableTokenFactory_Test:test_createStandardL2TokenSameTwice() (gas: 2205567)
OptimismMintableTokenFactory_Test:test_createStandardL2TokenShouldRevertIfRemoteIsZero() (gas: 9398)
OptimismPortalUpgradeable_Test:test_cannotInitImpl() (gas: 10813)
OptimismPortalUpgradeable_Test:test_cannotInitProxy() (gas: 15789)
......
......@@ -10,7 +10,7 @@ import { Bytes32AddressLib } from "@rari-capital/solmate/src/utils/Bytes32Addres
library LibRLP {
using Bytes32AddressLib for bytes32;
function computeAddress(address deployer, uint256 nonce) public pure returns (address) {
function computeAddress(address deployer, uint256 nonce) internal pure returns (address) {
// The integer zero is treated as an empty byte string, and as a result it only has a length prefix, 0x80, computed via 0x80 + 0.
// A one byte integer uses its own value as its length prefix, there is no additional "0x80 + length" prefix that comes before it.
if (nonce == 0x00) return keccak256(abi.encodePacked(bytes1(0xd6), bytes1(0x94), deployer, bytes1(0x80))).fromLast20Bytes();
......
......@@ -57,6 +57,10 @@ type Log struct {
}
// Artifact represents a hardhat compilation artifact
// The Bytecode and DeployedBytecode are not guranteed
// to be hexutil.Bytes when there are link references.
// In the future, custom json marshalling can be used
// to place the link reference values in the correct location.
type Artifact struct {
Format string `json:"_format"`
ContractName string `json:"contractName"`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment