Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app-developers/guides/bridging/messaging.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ contract MyContract {
```

Here, `MyContract.doTheThing` triggers a call to `MyOtherContract.doSomething`.
Under the hood, Solidity is triggering the code for `MyOtherContract` by sending an [ABI encoded](https://docs.soliditylang.org/en/v0.8.23/abi-spec.html) call for the `doSomething` function.
Under the hood, Solidity is triggering the code for `MyOtherContract` by sending an [ABI encoded](https://docs.soliditylang.org/en/v0.8.33/abi-spec.html) call for the `doSomething` function.
A lot of this complexity is abstracted away to simplify the developer experience.
Solidity also has manual encoding tools that allow us to demonstrate the same process in a more verbose way.

Expand All @@ -48,7 +48,7 @@ contract MyContract {
}
```

Here you're using the [low-level "call" function](https://docs.soliditylang.org/en/v0.8.23/units-and-global-variables.html#members-of-address-types) and one of the [ABI encoding functions built into Solidity](https://docs.soliditylang.org/en/v0.8.23/units-and-global-variables.html#abi-encoding-and-decoding-functions).
Here you're using the [low-level "call" function](https://docs.soliditylang.org/en/v0.8.33/units-and-global-variables.html#members-of-address-types) and one of the [ABI encoding functions built into Solidity](https://docs.soliditylang.org/en/v0.8.33/units-and-global-variables.html#abi-encoding-and-decoding-functions).
Although these two code snippets look a bit different, they're doing the exact same thing.
Because of limitations of Solidity, **the OP Stack's bridging interface is designed to look like the second code snippet**.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ This is just one example of the endless ways in which you could customize your L

```solidity
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
pragma solidity ^0.8.33;

// Import the standard ERC20 implementation from OpenZeppelin
import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
Expand Down Expand Up @@ -305,7 +305,7 @@ contract MyCustomL2Token is IOptimismMintableERC20, ILegacyMintableERC20, ERC20,
Save the file to automatically compile the contract.
If you've disabled auto-compile, you'll need to manually compile the contract by clicking the "Solidity Compiler" tab (this looks like the letter "S") and press the blue "Compile" button.

Make sure you're using Solidity compiler version 0.8.15 (the same version used in the official Optimism contracts).
Make sure you're using Solidity compiler version 0.8.33 (the same version used in the official Optimism contracts).

</Step>
<Step title="Deploy the contract">
Expand Down
6 changes: 3 additions & 3 deletions app-developers/tutorials/interoperability/message-passing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ The implementation consists of three main components:

```solidity
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma solidity ^0.8.33;

contract Greeter {
string greeting;
Expand Down Expand Up @@ -246,7 +246,7 @@ The implementation consists of three main components:

```solidity
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma solidity ^0.8.33;

import { Predeploys } from "@eth-optimism/contracts-bedrock/src/libraries/Predeploys.sol";
import { IL2ToL2CrossDomainMessenger } from "@eth-optimism/contracts-bedrock/src/L2/IL2ToL2CrossDomainMessenger.sol";
Expand Down Expand Up @@ -335,7 +335,7 @@ In this section we change `Greeter.sol` to emit a separate event in it receives

```solidity
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma solidity ^0.8.33;

import { Predeploys } from "@eth-optimism/contracts-bedrock/src/libraries/Predeploys.sol";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Here we will use the [SuperchainERC20 Starter Kit](/app-developers/quickstarts/s

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.25;
pragma solidity ^0.8.33;

import {SuperchainERC20} from "./SuperchainERC20.sol";
import {Ownable} from "@solady/auth/Ownable.sol";
Expand Down
2 changes: 1 addition & 1 deletion chain-operators/guides/management/best-practices.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Always consult release notes for additional details or upgrade instructions.
## Keep deployment artifacts

After deploying your contracts on Ethereum, you should keep a record of all the deployment artifacts.
This is will be all the [op-deployer](/chain-operators/tools/op-deployer/overview.mdx) artifacts, as well as the release tag and commit hash of `op-deployer` and `op-contracts`.
This will be all the [op-deployer](/chain-operators/tools/op-deployer/overview.mdx) artifacts, as well as the release tag and commit hash of `op-deployer` and `op-contracts`.
You will need these artifacts to add your chain to the [Superchain Registry](/superchain/superchain-information/superchain-registry.mdx).

## Incremental upgrade rollouts
Expand Down
2 changes: 1 addition & 1 deletion chain-operators/tutorials/adding-derivation-attributes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ You're going to use a smart contract on your Rollup to store the reports that th

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma solidity ^0.8.33;

/**
* @title L1Burn
Expand Down
4 changes: 2 additions & 2 deletions op-stack/bridging/deposit-flow.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Information is encapsulated in lower layer packets on the sending side and then
This function accepts three parameters:

* `_target`, target address on L2.
* `_message`, the L2 transaction's calldata, formatted as per the [ABI](https://docs.soliditylang.org/en/v0.8.19/abi-spec.html) of the target account.
* `_message`, the L2 transaction's calldata, formatted as per the [ABI](https://docs.soliditylang.org/en/v0.8.33/abi-spec.html) of the target account.
* `_minGasLimit`, the minimum gas limit allowed for the transaction on L2. Note that this is a *minimum* and the actual amount provided on L2 may be higher (but never lower) than the specified gas limit. The actual amount provided on L2 is often higher because the portal contract on L2 performs some processing before submitting the call to `_target`.

2. The L1 cross domain messenger calls [its own `_sendMessage` function](https://github.com/ethereum-optimism/optimism/blob/62c7f3b05a70027b30054d4c8974f44000606fb7/packages/contracts-bedrock/contracts/L1/L1CrossDomainMessenger.sol#L42-L52).
Expand All @@ -28,7 +28,7 @@ Information is encapsulated in lower layer packets on the sending side and then
* `_value`, the ETH that is sent with the message.
This amount is taken from the transaction value.
* `_data`, the calldata for the call on L2 that is needed to relay the message.
This is an [ABI encoded](https://docs.soliditylang.org/en/v0.8.19/abi-spec.html) call to [`relayMessage`](https://github.com/ethereum-optimism/optimism/blob/62c7f3b05a70027b30054d4c8974f44000606fb7/packages/contracts-bedrock/contracts/universal/CrossDomainMessenger.sol#L291-L413).
This is an [ABI encoded](https://docs.soliditylang.org/en/v0.8.33/abi-spec.html) call to [`relayMessage`](https://github.com/ethereum-optimism/optimism/blob/62c7f3b05a70027b30054d4c8974f44000606fb7/packages/contracts-bedrock/contracts/universal/CrossDomainMessenger.sol#L291-L413).

3. [`_sendMessage`](https://github.com/ethereum-optimism/optimism/blob/62c7f3b05a70027b30054d4c8974f44000606fb7/packages/contracts-bedrock/contracts/L1/L1CrossDomainMessenger.sol#L42-L52) calls the portal's [`depositTransaction` function](https://github.com/ethereum-optimism/optimism/blob/62c7f3b05a70027b30054d4c8974f44000606fb7/packages/contracts-bedrock/contracts/L1/OptimismPortal.sol#L422-L483).

Expand Down
2 changes: 1 addition & 1 deletion op-stack/bridging/withdrawal-flow.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Withdrawals require the user to submit three transactions:
This function accepts three parameters:

* `_target`, target address on L1.
* `_message`, the L1 transaction's calldata, formatted as per the [ABI](https://docs.soliditylang.org/en/v0.8.19/abi-spec.html) of the target address.
* `_message`, the L1 transaction's calldata, formatted as per the [ABI](https://docs.soliditylang.org/en/v0.8.33/abi-spec.html) of the target address.
* `_minGasLimit`, The minimum amount of gas that the withdrawal finalizing transaction can provide to the withdrawal transaction. This is enforced by the `SafeCall` library, and if the minimum amount of gas cannot be met at the time of the external call from the `OptimismPortal` -> `L1CrossDomainMessenger`, the finalization transaction will revert to allow for re-attempting with a higher gas limit. In order to account for the gas consumed in the `L1CrossDomainMessenger.relayMessage` function's execution, extra gas will be added on top of the `_minGasLimit` value by the `CrossDomainMessenger.baseGas` function when `sendMessage` is called on L2.

2. `sendMessage` is a generic function that is used in both cross domain messengers. It calls [`_sendMessage`](https://github.com/ethereum-optimism/optimism/blob/1a8fe18c4989bfd0852a8873f30422542ad4f44d/packages/contracts-bedrock/src/L2/L2CrossDomainMessenger.sol#L45), which is specific to [`L2CrossDomainMessenger`](https://github.com/ethereum-optimism/optimism/blob/1a8fe18c4989bfd0852a8873f30422542ad4f44d/packages/contracts-bedrock/src/L2/L2CrossDomainMessenger.sol#L21).
Expand Down
2 changes: 1 addition & 1 deletion public/tutorials/CustomBridge.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;
pragma solidity ^0.8.33;

// Libraries
import { PredeployAddresses } from "interop-lib/src/libraries/PredeployAddresses.sol";
Expand Down
2 changes: 1 addition & 1 deletion public/tutorials/CustomSuperchainToken.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.25;
pragma solidity ^0.8.33;

import {SuperchainERC20} from "./SuperchainERC20.sol";
import {Ownable} from "@solady/auth/Ownable.sol";
Expand Down
4 changes: 2 additions & 2 deletions public/tutorials/Greeter.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.33;

contract Greeter {
string greeting;
Expand Down
4 changes: 2 additions & 2 deletions public/tutorials/GreetingSender.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.33;

import { Predeploys } from "@eth-optimism/contracts-bedrock/src/libraries/Predeploys.sol";
import { IL2ToL2CrossDomainMessenger } from "@eth-optimism/contracts-bedrock/src/L2/IL2ToL2CrossDomainMessenger.sol";
Expand Down
2 changes: 1 addition & 1 deletion public/tutorials/InteropToken.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.8.28;
pragma solidity ^0.8.33;

import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
Expand Down
2 changes: 1 addition & 1 deletion public/tutorials/LockboxDeployer.s.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.25;
pragma solidity ^0.8.33;

import {Script, console} from "forge-std/Script.sol";
import {Vm} from "forge-std/Vm.sol";
Expand Down
2 changes: 1 addition & 1 deletion public/tutorials/LockboxSuperchainERC20.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.25;
pragma solidity ^0.8.33;

import {SuperchainERC20} from "./SuperchainERC20.sol";
import {IERC20} from "@openzeppelin/contracts/interfaces/IERC20.sol";
Expand Down
2 changes: 1 addition & 1 deletion public/tutorials/Verifier.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
pragma solidity ^0.8.33;

import {Attestation} from "@ethereum-attestation-service/eas-contracts/contracts/Common.sol";

Expand Down
2 changes: 1 addition & 1 deletion public/tutorials/cross-dom-solidity.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma solidity ^0.8.33;

interface ICrossDomainMessenger {
function xDomainMessageSender() external view returns (address);
Expand Down
2 changes: 1 addition & 1 deletion public/tutorials/first-contract.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma solidity ^0.8.33;

contract MyFirstContract {
string public message;
Expand Down
2 changes: 1 addition & 1 deletion public/tutorials/standard-bridge-custom-token.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
pragma solidity ^0.8.33;

// Import the standard ERC20 implementation from OpenZeppelin
import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
Expand Down