Skip to content

Commit

Permalink
Bump semver
Browse files Browse the repository at this point in the history
_more bindings

Strengthen invariant test
  • Loading branch information
clabby committed Apr 19, 2023
1 parent 5b8ab37 commit cfb60fb
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion op-bindings/bindings/l1crossdomainmessenger.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion op-bindings/bindings/l1crossdomainmessenger_more.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion op-bindings/bindings/l2crossdomainmessenger.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion op-bindings/bindings/l2crossdomainmessenger_more.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion op-bindings/bindings/optimismportal.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion op-bindings/bindings/optimismportal_more.go

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ contract L1CrossDomainMessenger is CrossDomainMessenger, Semver {
OptimismPortal public immutable PORTAL;

/**
* @custom:semver 1.1.0
* @custom:semver 1.2.0
*
* @param _portal Address of the OptimismPortal contract on this network.
*/
constructor(OptimismPortal _portal)
Semver(1, 1, 0)
Semver(1, 2, 0)
CrossDomainMessenger(Predeploys.L2_CROSS_DOMAIN_MESSENGER)
{
PORTAL = _portal;
Expand Down
4 changes: 2 additions & 2 deletions packages/contracts-bedrock/contracts/L1/OptimismPortal.sol
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ contract OptimismPortal is Initializable, ResourceMetering, Semver {
}

/**
* @custom:semver 1.3.1
* @custom:semver 1.4.1
*
* @param _l2Oracle Address of the L2OutputOracle contract.
* @param _guardian Address that can pause deposits and withdrawals.
Expand All @@ -152,7 +152,7 @@ contract OptimismPortal is Initializable, ResourceMetering, Semver {
address _guardian,
bool _paused,
SystemConfig _config
) Semver(1, 3, 1) {
) Semver(1, 4, 1) {
L2_ORACLE = _l2Oracle;
GUARDIAN = _guardian;
SYSTEM_CONFIG = _config;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ import { L2ToL1MessagePasser } from "./L2ToL1MessagePasser.sol";
*/
contract L2CrossDomainMessenger is CrossDomainMessenger, Semver {
/**
* @custom:semver 1.1.0
* @custom:semver 1.2.0
*
* @param _l1CrossDomainMessenger Address of the L1CrossDomainMessenger contract.
*/
constructor(address _l1CrossDomainMessenger)
Semver(1, 1, 0)
Semver(1, 2, 0)
CrossDomainMessenger(_l1CrossDomainMessenger)
{
initialize();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ contract RelayActor is StdUtils {
// the outer min gas limit.
vm.startPrank(address(op));
vm.expectCall(target, _message);
uint256 gas = doRevert ? 80_000 : xdm.baseGas(_message, _minGasLimit);
uint256 gas = doRevert
? bound(_minGasLimit, 80_000, 120_000)
: xdm.baseGas(_message, _minGasLimit);
try
xdm.relayMessage{ gas: gas }(
Encoding.encodeVersionedNonce(0, _version),
Expand Down Expand Up @@ -133,7 +135,7 @@ contract XDM_MinGasLimits_Succeeds is XDM_MinGasLimits {
* - The inner min gas limit is for the call from the `L1CrossDomainMessenger` to the target
* contract.
*/
function invariant_minGasLimits() public {
function invariant_minGasLimits() external {
uint256 length = actor.numHashes();
for (uint256 i = 0; i < length; ++i) {
bytes32 hash = actor.hashes(i);
Expand Down Expand Up @@ -164,7 +166,7 @@ contract XDM_MinGasLimits_Reverts is XDM_MinGasLimits {
* - The inner min gas limit is for the call from the `L1CrossDomainMessenger` to the target
* contract.
*/
function invariant_minGasLimits() public {
function invariant_minGasLimits() external {
uint256 length = actor.numHashes();
for (uint256 i = 0; i < length; ++i) {
bytes32 hash = actor.hashes(i);
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts-bedrock/tasks/check-l2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ const check = {
await assertSemver(
L2CrossDomainMessenger,
'L2CrossDomainMessenger',
'1.1.0'
'1.2.0'
)

const xDomainMessageSenderSlot = await signer.provider.getStorageAt(
Expand Down

0 comments on commit cfb60fb

Please sign in to comment.