1. 25 Aug, 2022 2 commits
    • Mark Tyneway's avatar
      contracts-bedrock: bump oz to latest release (#3308) · cdf2163e
      Mark Tyneway authored
      This bumps the open zeppelin contracts used in bedrock to the
      latest release. This bump is happening because `Ownable` becomes
      more flexible, allowing you to overwrite the logic for `onlyOwner`.
      This would enable writing a `CrossDomainOwnable` contract like so:
      
      ```solidity
      // SPDX-License-Identifier: MIT
      pragma solidity 0.8.15;
      
      import { AddressAliasHelper } from "../vendor/AddressAliasHelper.sol";
      import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
      
      abstract contract CrossDomainOwnable is Ownable {
          /**
           * @dev Throws if the sender is not the owner.
           */
          function _checkOwner() internal view {
              address sender = AddressAliasHelper.undoL1ToL2Alias(msg.sender);
              require(owner() == sender, "Ownable: caller is not the owner");
          }
      }
      ```
      
      The main diff to the `Ownable` contract is that is now looks like this:
      
      ```solidity
          /**
           * @dev Throws if called by any account other than the owner.
           */
          modifier onlyOwner() {
              _checkOwner();
              _;
          }
      
          /**
           * @dev Returns the address of the current owner.
           */
          function owner() public view virtual returns (address) {
              return _owner;
          }
      
          /**
           * @dev Throws if the sender is not the owner.
           */
          function _checkOwner() internal view virtual {
              require(owner() == _msgSender(), "Ownable: caller is not the owner");
          }
      ```
      
      The older version of the contracts doesn't have the `virtual`
      `_checkOwner` function. This does add some additional gas overhead
      as seen in the `.gas-snapshot`.
      cdf2163e
    • Javed Khan's avatar
      indexer: upgrade bridge contracts to bedrock (#3286) · 32d44348
      Javed Khan authored
      * indexer: upgrade bridge contracts to bedrock
      
      * indexer: go mod tidy
      
      * indexer: rm bindings; use pkg op-bindings
      Co-authored-by: default avatarmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
      32d44348
  2. 24 Aug, 2022 12 commits
  3. 23 Aug, 2022 14 commits
  4. 22 Aug, 2022 8 commits
  5. 21 Aug, 2022 3 commits
    • Matthew Slipper's avatar
      chore: Release Bedrock v0.5.0 (#3278) · bd4dc5fc
      Matthew Slipper authored
      This PR upgrades Bedrock dependencies v0.5.0. Hive needs this in order to perform withdrawals properly since v0.4.0 does not include the change to index withdrawals by block number.
      
      It also adds a Makefile command to generate future Bedrock version tags and push them.
      
      Note the GOPRIVATE change in `mod-tidy` - I needed to add this to circumvent the Go version proxy since it's slow to index new versions.
      bd4dc5fc
    • Diederik Loerakker's avatar
      507f566f
    • Joshua Gutow's avatar
      op-node: Cleanup channel definition (#3229) · 5f9b8919
      Joshua Gutow authored
      * op-node: Cleanup channel definition
      
      This moves some files around and then expands upon the Channel struct.
      It is better built for adding frames + then reading data when it is
      ready.
      
      Some tests are still failing and I don't know why.
      
      * ReadBatch in channel.go
      
      * op-node: Fix channel.go + start of new interface
      
      * fix lint
      
      * op-node: Use simple channel decoding
      
      * revert switch to reader
      
      This was due to the difficulty in making the mocks work with the reader.
      
      * fix lint
      
      * fix bug around trying to use an empty chanel
      Co-authored-by: default avatarmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
      5f9b8919
  6. 20 Aug, 2022 1 commit