From f48e2e5d47e6bf1057341172dc9e8467135bfb84 Mon Sep 17 00:00:00 2001 From: Bradley Camacho <42678939+bradleycamacho@users.noreply.github.com> Date: Tue, 18 Feb 2025 08:14:31 -0800 Subject: [PATCH 1/8] Missing lints & interop ideas --- pages/app-developers/tools/build/faucets.mdx | 26 ++++++------- .../transactions/parameters.mdx | 32 ++++++++-------- pages/stack/interop.mdx | 2 + pages/stack/interop/_meta.json | 1 + pages/stack/interop/ideas.mdx | 0 .../interop/tutorials/message-passing.mdx | 37 +++++++++---------- 6 files changed, 49 insertions(+), 49 deletions(-) create mode 100644 pages/stack/interop/ideas.mdx diff --git a/pages/app-developers/tools/build/faucets.mdx b/pages/app-developers/tools/build/faucets.mdx index 4ec689135..9e3cc9389 100644 --- a/pages/app-developers/tools/build/faucets.mdx +++ b/pages/app-developers/tools/build/faucets.mdx @@ -29,19 +29,19 @@ The Superchain Faucet is a great place to start if you're looking for testnet ET ## Additional faucets -| Faucet Name | Supported Networks | -|--------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------| -| [Alchemy Faucet](https://sepoliafaucet.com) | Sepolia | -| [Infura Faucet](https://www.infura.io/faucet/sepolia) | Sepolia | -| [QuickNode Faucet](https://faucet.quicknode.com/optimism/) | Sepolia, OP Sepolia | -| [Farcaster Frame Faucet by LearnWeb3](https://warpcast.com/haardikkk/0x28f4237d) | Sepolia, OP Sepolia | -| [LearnWeb3 Web App Faucet](https://learnweb3.io/faucets) | Sepolia, OP Sepolia | -| [Native USDC Faucet](https://faucet.circle.com/) | Sepolia, OP Sepolia | -| [ETHGlobal Testnet Faucet](https://ethglobal.com/faucet) | Sepolia, OP Sepolia, Base Sepolia, Zora Sepolia, Holesky | -| [Ethereum Ecosystem Faucets](https://www.ethereum-ecosystem.com/faucets) | Sepolia, OP Sepolia, Base Sepolia | -| [thirdweb Sepolia Faucet](https://thirdweb.com/sepolia?utm_source=opdocs\&utm_medium=docs) | Sepolia | -| [thirdweb OP Sepolia Faucet](https://thirdweb.com/op-sepolia-testnet?utm_source=opdocs\&utm_medium=docs) | OP Sepolia | -| [Tenderly Unlimited Faucet](https://docs.tenderly.co/virtual-testnets/unlimited-faucet?mtm_campaign=ext-docs&mtm_kwd=optimism) | OP Sepolia, OP Mainnet, and [85+ other networks](https://docs.tenderly.co/supported-networks?mtm_campaign=ext-docs&mtm_kwd=optimism) | +| Faucet Name | Supported Networks | +| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| [Alchemy Faucet](https://sepoliafaucet.com) | Sepolia | +| [Infura Faucet](https://www.infura.io/faucet/sepolia) | Sepolia | +| [QuickNode Faucet](https://faucet.quicknode.com/optimism/) | Sepolia, OP Sepolia | +| [Farcaster Frame Faucet by LearnWeb3](https://warpcast.com/haardikkk/0x28f4237d) | Sepolia, OP Sepolia | +| [LearnWeb3 Web App Faucet](https://learnweb3.io/faucets) | Sepolia, OP Sepolia | +| [Native USDC Faucet](https://faucet.circle.com/) | Sepolia, OP Sepolia | +| [ETHGlobal Testnet Faucet](https://ethglobal.com/faucet) | Sepolia, OP Sepolia, Base Sepolia, Zora Sepolia, Holesky | +| [Ethereum Ecosystem Faucets](https://www.ethereum-ecosystem.com/faucets) | Sepolia, OP Sepolia, Base Sepolia | +| [thirdweb Sepolia Faucet](https://thirdweb.com/sepolia?utm_source=opdocs\&utm_medium=docs) | Sepolia | +| [thirdweb OP Sepolia Faucet](https://thirdweb.com/op-sepolia-testnet?utm_source=opdocs\&utm_medium=docs) | OP Sepolia | +| [Tenderly Unlimited Faucet](https://docs.tenderly.co/virtual-testnets/unlimited-faucet?mtm_campaign=ext-docs\&mtm_kwd=optimism) | OP Sepolia, OP Mainnet, and [85+ other networks](https://docs.tenderly.co/supported-networks?mtm_campaign=ext-docs\&mtm_kwd=optimism) | ## Bridge from Sepolia diff --git a/pages/app-developers/transactions/parameters.mdx b/pages/app-developers/transactions/parameters.mdx index 5723dafe1..1cb53861a 100644 --- a/pages/app-developers/transactions/parameters.mdx +++ b/pages/app-developers/transactions/parameters.mdx @@ -28,29 +28,27 @@ Note that, like Ethereum, the base fee is not explicitly defined within a transa Instead, the maximum base fee is determined as the difference between the `maxFeePerGas` and the `maxPriorityFeePerGas` fields of any given transaction. + {

Retrieve the latest block

} -{

Retrieve the latest block

} + Using the JSON-RPC API or your favorite Ethereum library, retrieve the latest block on OP Mainnet. -Using the JSON-RPC API or your favorite Ethereum library, retrieve the latest block on OP Mainnet. + {

Retrieve the base fee and gas used

} -{

Retrieve the base fee and gas used

} + From the block, retrieve the `baseFeePerGas` and `gasUsed` fields. -From the block, retrieve the `baseFeePerGas` and `gasUsed` fields. + {

Predict the next base fee

} -{

Predict the next base fee

} + OP Mainnet adjusts the base fee based on the amount of gas used in the previous block. + If the previous block used more than 5m gas (of the 30m gas limit), then the base fee will increase by up to 10%. + If the previous block used less than 5m gas, then the base fee will decrease by up to 10%. + Refer to the [OP Mainnet EIP-1559 Parameters](/stack/differences#eip-1559-parameters) section for more details. -OP Mainnet adjusts the base fee based on the amount of gas used in the previous block. -If the previous block used more than 5m gas (of the 30m gas limit), then the base fee will increase by up to 10%. -If the previous block used less than 5m gas, then the base fee will decrease by up to 10%. -Refer to the [OP Mainnet EIP-1559 Parameters](/stack/differences#eip-1559-parameters) section for more details. - -{

Select a base fee per gas

} - -Using the current base fee per gas and the amount of gas used in the previous block, you can predict the next base fee per gas. -If you are highly sensitive to the base fee, you may want to select a base fee per gas that is either 10% higher or 10% lower than the previous base fee. -However, you may run the risk that your transaction will not be included in a block quickly. -If you are less sensitive to the base fee, you may wish to simply use a large multiple of the previous base fee (e.g. 2x). + {

Select a base fee per gas

} + Using the current base fee per gas and the amount of gas used in the previous block, you can predict the next base fee per gas. + If you are highly sensitive to the base fee, you may want to select a base fee per gas that is either 10% higher or 10% lower than the previous base fee. + However, you may run the risk that your transaction will not be included in a block quickly. + If you are less sensitive to the base fee, you may wish to simply use a large multiple of the previous base fee (e.g. 2x).
## Selecting the priority fee @@ -63,4 +61,4 @@ Many Ethereum libraries will provide a function to call this JSON-RPC method. You can also use the [`eth_feeHistory`](https://docs.alchemy.com/reference/eth-feehistory) JSON-RPC method to retrieve historical priority fee data. You can then use this data to predict a reasonable priority fee for your transaction. -Alternatively, you can rely on Tenderly's [`tenderly_gasPrice`](https://docs.tenderly.co/node/rpc-reference/optimism-mainnet/tenderly_gasPrice?mtm_campaign=ext-docs&mtm_kwd=optimism) to get real-time gas predictions with 3 levels of likelihood for transaction inclusion. \ No newline at end of file +Alternatively, you can rely on Tenderly's [`tenderly_gasPrice`](https://docs.tenderly.co/node/rpc-reference/optimism-mainnet/tenderly_gasPrice?mtm_campaign=ext-docs\&mtm_kwd=optimism) to get real-time gas predictions with 3 levels of likelihood for transaction inclusion. diff --git a/pages/stack/interop.mdx b/pages/stack/interop.mdx index 4b5c0abee..3a1896969 100644 --- a/pages/stack/interop.mdx +++ b/pages/stack/interop.mdx @@ -36,4 +36,6 @@ Documentation covering Cross Chain Message, Explainer, Message Passing, Op Super } /> + + diff --git a/pages/stack/interop/_meta.json b/pages/stack/interop/_meta.json index cfeda8718..02f77ce2d 100644 --- a/pages/stack/interop/_meta.json +++ b/pages/stack/interop/_meta.json @@ -7,6 +7,7 @@ "superchain-erc20": "SuperchainERC20", "reorg": "Interop reorg awareness", "interop-security": "Safe interoperability", + "ideas": "Interop ideas", "tools": "Tools", "tutorials": "Tutorials" } diff --git a/pages/stack/interop/ideas.mdx b/pages/stack/interop/ideas.mdx new file mode 100644 index 000000000..e69de29bb diff --git a/pages/stack/interop/tutorials/message-passing.mdx b/pages/stack/interop/tutorials/message-passing.mdx index a50f6ef8e..0e43a5b24 100644 --- a/pages/stack/interop/tutorials/message-passing.mdx +++ b/pages/stack/interop/tutorials/message-passing.mdx @@ -231,7 +231,7 @@ For development purposes, we'll first use autorelay mode to handle message execu This function encodes a call to `setGreeting` and sends it to a contract on another chain. `abi.encodeCall(Greeter.setGreeting, (greeting))` constructs the [calldata](https://docs.soliditylang.org/en/latest/internals/layout_in_calldata.html) by encoding the function selector and parameters. The encoded message is then passed to `messenger.sendMessage`, which forwards it to the destination contract (`greeterAddress`) on the specified chain (`greeterChainId`). - + This ensures that `setGreeting` is executed remotely with the provided `greeting` value (as long as there is an executing message to relay it). @@ -500,33 +500,32 @@ In production we will not have this, we need to create our own executing message
Explanation - ```typescript file=/public/tutorials/app_v2.mts#L11-L15 hash=721ed87241535b606be281539baa8770 - ``` - - Import from the [`@eth-optimism/viem`](https://www.npmjs.com/package/@eth-optimism/viem) package. + ```typescript file=/public/tutorials/app_v2.mts#L11-L15 hash=721ed87241535b606be281539baa8770 + ``` - ```typescript file=/public/tutorials/app_v2.mts#L22-L28 hash=ffa76edb1191121e15eb4286e16ad041 - ``` + Import from the [`@eth-optimism/viem`](https://www.npmjs.com/package/@eth-optimism/viem) package. - In addition to extending the wallets with [Viem public actions](https://viem.sh/docs/accounts/local#5-optional-extend-with-public-actions), extend with the OP-Stack actions, both the public ones and the ones that require an account. + ```typescript file=/public/tutorials/app_v2.mts#L22-L28 hash=ffa76edb1191121e15eb4286e16ad041 + ``` - ```typescript file=/public/tutorials/app_v2.mts#L59 hash=23aa6f24baeb5757130361f30c1b0e9c - ``` + In addition to extending the wallets with [Viem public actions](https://viem.sh/docs/accounts/local#5-optional-extend-with-public-actions), extend with the OP-Stack actions, both the public ones and the ones that require an account. - To relay a message we need the information in the receipt. - Also, we need to wait until the transaction with the relayed message is actually part of a block. + ```typescript file=/public/tutorials/app_v2.mts#L59 hash=23aa6f24baeb5757130361f30c1b0e9c + ``` - ```typescript file=/public/tutorials/app_v2.mts#L61-L63 hash=da4b8733c578a393eb36f154a4e816e1 - ``` + To relay a message we need the information in the receipt. + Also, we need to wait until the transaction with the relayed message is actually part of a block. - A single transaction can send multiple messages. - But here we know we sent just one, so we look for the first one in the list. + ```typescript file=/public/tutorials/app_v2.mts#L61-L63 hash=da4b8733c578a393eb36f154a4e816e1 + ``` - ```typescript file=/public/tutorials/app_v2.mts#L64-L70 hash=6bfcd99f2e79df79897d230f36d4a682 - ``` + A single transaction can send multiple messages. + But here we know we sent just one, so we look for the first one in the list. - Here we first send the relay message on chain B, and then wait for the receipt for it. + ```typescript file=/public/tutorials/app_v2.mts#L64-L70 hash=6bfcd99f2e79df79897d230f36d4a682 + ``` + Here we first send the relay message on chain B, and then wait for the receipt for it.
2. Rerun the JavaScript program, and see that the message is relayed. From feddfb08a76bdddcfacc978793934b92be10039b Mon Sep 17 00:00:00 2001 From: Bradley Camacho <42678939+bradleycamacho@users.noreply.github.com> Date: Tue, 18 Feb 2025 09:07:00 -0800 Subject: [PATCH 2/8] Fix linting --- pages/stack/interop/message-passing.mdx | 7 +- .../interop/tutorials/message-passing.mdx | 82 +++++++++---------- 2 files changed, 45 insertions(+), 44 deletions(-) diff --git a/pages/stack/interop/message-passing.mdx b/pages/stack/interop/message-passing.mdx index 1ea684fd6..be3c4787a 100644 --- a/pages/stack/interop/message-passing.mdx +++ b/pages/stack/interop/message-passing.mdx @@ -49,7 +49,8 @@ sequenceDiagram * `_destination`: The chain ID of the destination blockchain. * `_target`: The address of the contract on that blockchain. * `_message`: The actual message. - This message is provided to `_target` as calldata, which means it includes a function selector and the parameters for that function call. + + This message is provided to `_target` as calldata, which means it includes a function selector and the parameters for that function call. 3. `L2ToL2CrossDomainMessenger` on the source chain verifies the message is legitimate: * The destination chain is one to which this chain can send messages. @@ -97,8 +98,8 @@ sequenceDiagram * The origin (of the log entry) is `L2ToL2CrossDomainMessenger` on the other side. * The destination chain ID is correct. * The target is neither `CrossL2Inbox` nor `L2ToL2CrossDomainMessenger`. - * This message has not been relayed before. - This is the reason we need the nonce value, to enable us to send multiple messages that would be otherwise identical. + * This message has not been relayed before. This is the reason we need the nonce value, to enable us to send multiple messages that would be otherwise identical. + 5. If everything checks out, `L2ToL2CrossDomainMessenger` calls the destination contract with the calldata provided in the message. diff --git a/pages/stack/interop/tutorials/message-passing.mdx b/pages/stack/interop/tutorials/message-passing.mdx index 0e43a5b24..7049002c4 100644 --- a/pages/stack/interop/tutorials/message-passing.mdx +++ b/pages/stack/interop/tutorials/message-passing.mdx @@ -155,49 +155,49 @@ For development purposes, we'll first use autorelay mode to handle message execu GREETER_B_ADDR=`forge create --rpc-url $RPC_B --private-key $PRIV_KEY Greeter --broadcast | awk '/Deployed to:/ {print $3}'` ``` -
- Explanation +
+ Explanation - The command that deploys the contract is: + The command that deploys the contract is: - ```sh - forge create --rpc-url $RPC_B --private-key $PRIV_KEY Greeter --broadcast - ``` + ```sh + forge create --rpc-url $RPC_B --private-key $PRIV_KEY Greeter --broadcast + ``` - The command output gives us the deployer address, the address of the new contract, and the transaction hash: + The command output gives us the deployer address, the address of the new contract, and the transaction hash: - ``` - Deployer: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 - Deployed to: 0x5FC8d32690cc91D4c39d9d3abcBD16989F875707 - Transaction hash: 0xf155d360ec70ee10fe0e02d99c16fa5d6dc2a0e79b005fec6cbf7925ff547dbf - ``` + ``` + Deployer: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 + Deployed to: 0x5FC8d32690cc91D4c39d9d3abcBD16989F875707 + Transaction hash: 0xf155d360ec70ee10fe0e02d99c16fa5d6dc2a0e79b005fec6cbf7925ff547dbf + ``` - The [`awk`](https://www.tutorialspoint.com/awk/index.htm) command looks for the line that has `Deployed to:` and writes the third word in that line, which is the address. + The [`awk`](https://www.tutorialspoint.com/awk/index.htm) command looks for the line that has `Deployed to:` and writes the third word in that line, which is the address. - ```sh - awk '/Deployed to:/ {print $3}' - ``` + ```sh + awk '/Deployed to:/ {print $3}' + ``` - Finally, in UNIX (including Linux and macOS) the when the command line includes backticks (\`\`\`), the shell executes the code between the backticks and puts the output, in this case the contract address, in the command. - So we get. + Finally, in UNIX (including Linux and macOS) the when the command line includes backticks (\`\`\`), the shell executes the code between the backticks and puts the output, in this case the contract address, in the command. + So we get. - ```sh - GREETER_B_ADDR= - ``` -
+ ```sh + GREETER_B_ADDR= + ``` +
-
- Sanity check +
+ Sanity check - Run these commands to verify the contract works. - The first and third commands retrieve the current greeting, while the second command updates it. + Run these commands to verify the contract works. + The first and third commands retrieve the current greeting, while the second command updates it. - ```sh - cast call --rpc-url $RPC_B $GREETER_B_ADDR "greet()" | cast --to-ascii - cast send --private-key $PRIV_KEY --rpc-url $RPC_B $GREETER_B_ADDR "setGreeting(string)" Hello - cast call --rpc-url $RPC_B $GREETER_B_ADDR "greet()" | cast --to-ascii - ``` -
+ ```sh + cast call --rpc-url $RPC_B $GREETER_B_ADDR "greet()" | cast --to-ascii + cast send --private-key $PRIV_KEY --rpc-url $RPC_B $GREETER_B_ADDR "setGreeting(string)" Hello + cast call --rpc-url $RPC_B $GREETER_B_ADDR "greet()" | cast --to-ascii + ``` +
4. Install the Optimism Solidity libraries into the project. @@ -222,18 +222,18 @@ For development purposes, we'll first use autorelay mode to handle message execu ```solidity file=/public/tutorials/GreetingSender.sol#L1-L28 hash=75d197d1e1da112421785c2160f6a55a ``` -
- Explanation +
+ Explanation - ```solidity file=/public/tutorials/GreetingSender.sol#L21-L27 hash=6c27ebcf4916e5aa2325d30f99c65436 - ``` + ```solidity file=/public/tutorials/GreetingSender.sol#L21-L27 hash=6c27ebcf4916e5aa2325d30f99c65436 + ``` - This function encodes a call to `setGreeting` and sends it to a contract on another chain. - `abi.encodeCall(Greeter.setGreeting, (greeting))` constructs the [calldata](https://docs.soliditylang.org/en/latest/internals/layout_in_calldata.html) by encoding the function selector and parameters. - The encoded message is then passed to `messenger.sendMessage`, which forwards it to the destination contract (`greeterAddress`) on the specified chain (`greeterChainId`). + This function encodes a call to `setGreeting` and sends it to a contract on another chain. + `abi.encodeCall(Greeter.setGreeting, (greeting))` constructs the [calldata](https://docs.soliditylang.org/en/latest/internals/layout_in_calldata.html) by encoding the function selector and parameters. + The encoded message is then passed to `messenger.sendMessage`, which forwards it to the destination contract (`greeterAddress`) on the specified chain (`greeterChainId`). - This ensures that `setGreeting` is executed remotely with the provided `greeting` value (as long as there is an executing message to relay it). -
+ This ensures that `setGreeting` is executed remotely with the provided `greeting` value (as long as there is an executing message to relay it). +
7. Deploy `GreetingSender` to chain A. From cf7dd566d7b889a1c461c144ea6617d86b1caf95 Mon Sep 17 00:00:00 2001 From: Bradley Camacho <42678939+bradleycamacho@users.noreply.github.com> Date: Tue, 18 Feb 2025 09:09:33 -0800 Subject: [PATCH 3/8] Fix indents --- .../interop/tutorials/message-passing.mdx | 82 +++++++++---------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/pages/stack/interop/tutorials/message-passing.mdx b/pages/stack/interop/tutorials/message-passing.mdx index 7049002c4..0e43a5b24 100644 --- a/pages/stack/interop/tutorials/message-passing.mdx +++ b/pages/stack/interop/tutorials/message-passing.mdx @@ -155,49 +155,49 @@ For development purposes, we'll first use autorelay mode to handle message execu GREETER_B_ADDR=`forge create --rpc-url $RPC_B --private-key $PRIV_KEY Greeter --broadcast | awk '/Deployed to:/ {print $3}'` ``` -
- Explanation +
+ Explanation - The command that deploys the contract is: + The command that deploys the contract is: - ```sh - forge create --rpc-url $RPC_B --private-key $PRIV_KEY Greeter --broadcast - ``` + ```sh + forge create --rpc-url $RPC_B --private-key $PRIV_KEY Greeter --broadcast + ``` - The command output gives us the deployer address, the address of the new contract, and the transaction hash: + The command output gives us the deployer address, the address of the new contract, and the transaction hash: - ``` - Deployer: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 - Deployed to: 0x5FC8d32690cc91D4c39d9d3abcBD16989F875707 - Transaction hash: 0xf155d360ec70ee10fe0e02d99c16fa5d6dc2a0e79b005fec6cbf7925ff547dbf - ``` + ``` + Deployer: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 + Deployed to: 0x5FC8d32690cc91D4c39d9d3abcBD16989F875707 + Transaction hash: 0xf155d360ec70ee10fe0e02d99c16fa5d6dc2a0e79b005fec6cbf7925ff547dbf + ``` - The [`awk`](https://www.tutorialspoint.com/awk/index.htm) command looks for the line that has `Deployed to:` and writes the third word in that line, which is the address. + The [`awk`](https://www.tutorialspoint.com/awk/index.htm) command looks for the line that has `Deployed to:` and writes the third word in that line, which is the address. - ```sh - awk '/Deployed to:/ {print $3}' - ``` + ```sh + awk '/Deployed to:/ {print $3}' + ``` - Finally, in UNIX (including Linux and macOS) the when the command line includes backticks (\`\`\`), the shell executes the code between the backticks and puts the output, in this case the contract address, in the command. - So we get. + Finally, in UNIX (including Linux and macOS) the when the command line includes backticks (\`\`\`), the shell executes the code between the backticks and puts the output, in this case the contract address, in the command. + So we get. - ```sh - GREETER_B_ADDR= - ``` -
+ ```sh + GREETER_B_ADDR= + ``` +
-
- Sanity check +
+ Sanity check - Run these commands to verify the contract works. - The first and third commands retrieve the current greeting, while the second command updates it. + Run these commands to verify the contract works. + The first and third commands retrieve the current greeting, while the second command updates it. - ```sh - cast call --rpc-url $RPC_B $GREETER_B_ADDR "greet()" | cast --to-ascii - cast send --private-key $PRIV_KEY --rpc-url $RPC_B $GREETER_B_ADDR "setGreeting(string)" Hello - cast call --rpc-url $RPC_B $GREETER_B_ADDR "greet()" | cast --to-ascii - ``` -
+ ```sh + cast call --rpc-url $RPC_B $GREETER_B_ADDR "greet()" | cast --to-ascii + cast send --private-key $PRIV_KEY --rpc-url $RPC_B $GREETER_B_ADDR "setGreeting(string)" Hello + cast call --rpc-url $RPC_B $GREETER_B_ADDR "greet()" | cast --to-ascii + ``` +
4. Install the Optimism Solidity libraries into the project. @@ -222,18 +222,18 @@ For development purposes, we'll first use autorelay mode to handle message execu ```solidity file=/public/tutorials/GreetingSender.sol#L1-L28 hash=75d197d1e1da112421785c2160f6a55a ``` -
- Explanation +
+ Explanation - ```solidity file=/public/tutorials/GreetingSender.sol#L21-L27 hash=6c27ebcf4916e5aa2325d30f99c65436 - ``` + ```solidity file=/public/tutorials/GreetingSender.sol#L21-L27 hash=6c27ebcf4916e5aa2325d30f99c65436 + ``` - This function encodes a call to `setGreeting` and sends it to a contract on another chain. - `abi.encodeCall(Greeter.setGreeting, (greeting))` constructs the [calldata](https://docs.soliditylang.org/en/latest/internals/layout_in_calldata.html) by encoding the function selector and parameters. - The encoded message is then passed to `messenger.sendMessage`, which forwards it to the destination contract (`greeterAddress`) on the specified chain (`greeterChainId`). + This function encodes a call to `setGreeting` and sends it to a contract on another chain. + `abi.encodeCall(Greeter.setGreeting, (greeting))` constructs the [calldata](https://docs.soliditylang.org/en/latest/internals/layout_in_calldata.html) by encoding the function selector and parameters. + The encoded message is then passed to `messenger.sendMessage`, which forwards it to the destination contract (`greeterAddress`) on the specified chain (`greeterChainId`). - This ensures that `setGreeting` is executed remotely with the provided `greeting` value (as long as there is an executing message to relay it). -
+ This ensures that `setGreeting` is executed remotely with the provided `greeting` value (as long as there is an executing message to relay it). +
7. Deploy `GreetingSender` to chain A. From 63dc1c00fbd61f09da03df28ff29791b212b85d5 Mon Sep 17 00:00:00 2001 From: Bradley Camacho <42678939+bradleycamacho@users.noreply.github.com> Date: Tue, 18 Feb 2025 09:11:08 -0800 Subject: [PATCH 4/8] Fix ideas page --- pages/stack/interop/ideas.mdx | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/pages/stack/interop/ideas.mdx b/pages/stack/interop/ideas.mdx index e69de29bb..14e948ef1 100644 --- a/pages/stack/interop/ideas.mdx +++ b/pages/stack/interop/ideas.mdx @@ -0,0 +1,44 @@ +--- +title: Superchain interoperability ideas +lang: en-US +description: Crypto used to be full of wild ideas—where are they now? Creativity and composability has been limited up until now +--- + +Crypto used to be full of wild ideas—where are they now? Creativity and composability has been limited up until now. We’ve mastered wallets, DeFi, L2s, and stables. It’s time to bring back the bold. Discover net-new use cases that are uniquely enabled by Superchain Interop, and not just bridge abstraction. + +It’s time to reimagine the onchain future together, reimagine your application with Superchain Interop and hack on Superchain Interop devnets. + +## Cutting edge Superchain ideas + +Hack on the various cutting edge applications that are uniquely enabled by Superchain Interop. We've compiled a list of Superchain interop ideas that you can use to help grow the Superchain + +If you’ve experimented with an application, or library to support Superchain Interop, [please let us know and fill out this form](https://www.surveymonkey.com/r/398MYD9). We would love to reach out directly to provide technical and potential marketing support. You can also tag @Optimism on Twitter. + +### Helpful Tools: +[Interop docs](https://docs.optimism.io/stack/interop/explainer) +[Devnet chain configs](https://docs.optimism.io/stack/interop/devnet) +[Interop demo apps](https://console.optimism.io/templates) +[Clone the Supersim repo to simulate Superchain Interop](https://github.com/ethereum-optimism/supersim) + +### Interop ideas + +| Use Case | Idea | Priority | Description | | +|-----------|-----------------------------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---| +| DeFi | Superloans | P1 | Use collateral on ChainA and ChainB to execute an arbitrage opportunity on ChainA | | +| | Superlend | P1 | Deposit ETH from ChainA or ChainB into a lend/borrow protocol for the best yield on ChainA or ChainB.Automatically rebalances to ChainA or ChainB based on best yield | | +| | SuperCDP | P1 | Collateralized crosschain debt protocol that holds assets and issues a SuperchainERC20 on users preferred chain | | +| | SuperPerp | P3 | Allow someone to deposit ETH from any chain in the Superchain to keep their perp position open | | +| | Swap | P1 | Swap ETH for SuperchainERC20 across Chain A and/or ChainB for best price execution | | +| | SuperArbitrage | P1 | Build a trading bot that uses Superchain interop to arbitrage DEX pools on ChainA and ChainB | | +| | Predict | P1 | Prediction market that uses Superchain interop to determine whether a set of actions happens on a set of chainsEg Will Uniswap USDC-ETH on the Superchain see more volume than Velodrome USDC-ETH today? | | +| Identity | Attestations | P1 | Use an attestation on chainA to interact with a smart contract on chainB Superchain attestations | | +| | SuperGotchi | P3 | A Tamagotchi-like game where the pets llive as NFTs onchain, and transform based on activity on ChainA and ChainB | | +| Wallets | SuperchainERC20 payment app | P2 | Build a wallet demo that uses chain specfic addr and superchain interop to send eth between chainA and chainB | | +| | Superchain Wallet | P1 | Use Superchain interop to build a wallet that priortizes UX and abstracts the concepts of individual chains from the user | | +| | Crosschain Account Abstract | P2 | Develop AA wallet experience that manages owners, sessions, balances, etc. across multiple chains | | +| Onramping | 7683 + Superchain interop | P2 | Build an intent-based system for swapping or bridging that uses Superchain interop to verify intent fulfillment | | +| | Bridge abstraction widget | P2 | Enable apps to use ETH balances from any chain in the Superchain to interact with target app | | +| | CEX widget | P2 | Enable apps to leverage CEX integrations from a chain in the Superchain to to deposit/withdraw to any chain in the Superchain | | +| Agents | Incentivizer Agent | P2 | A multi-chain agent that drips rewards to users via attestations (or tokens) to power users of the Superchain. | | +| | | | | | + From 6e716bdc1c8ec043e414bb0cd0c71995ec8ae89a Mon Sep 17 00:00:00 2001 From: Bradley Camacho <42678939+bradleycamacho@users.noreply.github.com> Date: Fri, 21 Feb 2025 15:46:47 -0800 Subject: [PATCH 5/8] Add missing header name --- pages/stack/interop/ideas.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pages/stack/interop/ideas.mdx b/pages/stack/interop/ideas.mdx index 14e948ef1..4bf6b58d7 100644 --- a/pages/stack/interop/ideas.mdx +++ b/pages/stack/interop/ideas.mdx @@ -4,6 +4,8 @@ lang: en-US description: Crypto used to be full of wild ideas—where are they now? Creativity and composability has been limited up until now --- +# Superchain interoperability ideas + Crypto used to be full of wild ideas—where are they now? Creativity and composability has been limited up until now. We’ve mastered wallets, DeFi, L2s, and stables. It’s time to bring back the bold. Discover net-new use cases that are uniquely enabled by Superchain Interop, and not just bridge abstraction. It’s time to reimagine the onchain future together, reimagine your application with Superchain Interop and hack on Superchain Interop devnets. From 63fc12a1a739a594a9410c4f43f94243d94c4ea7 Mon Sep 17 00:00:00 2001 From: Bradley Camacho <42678939+bradleycamacho@users.noreply.github.com> Date: Fri, 21 Feb 2025 15:48:21 -0800 Subject: [PATCH 6/8] Fix lint --- pages/stack/interop/ideas.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pages/stack/interop/ideas.mdx b/pages/stack/interop/ideas.mdx index 4bf6b58d7..5ccd73c26 100644 --- a/pages/stack/interop/ideas.mdx +++ b/pages/stack/interop/ideas.mdx @@ -6,21 +6,21 @@ description: Crypto used to be full of wild ideas—where are they now? Creativi # Superchain interoperability ideas -Crypto used to be full of wild ideas—where are they now? Creativity and composability has been limited up until now. We’ve mastered wallets, DeFi, L2s, and stables. It’s time to bring back the bold. Discover net-new use cases that are uniquely enabled by Superchain Interop, and not just bridge abstraction. +Crypto used to be full of wild ideas—where are they now? Creativity and composability has been limited up until now. We've mastered wallets, DeFi, L2s, and stables. It's time to bring back the bold. Discover net-new use cases that are uniquely enabled by Superchain Interop, and not just bridge abstraction. -It’s time to reimagine the onchain future together, reimagine your application with Superchain Interop and hack on Superchain Interop devnets. +It's time to reimagine the onchain future together, reimagine your application with Superchain Interop and hack on Superchain Interop devnets. ## Cutting edge Superchain ideas Hack on the various cutting edge applications that are uniquely enabled by Superchain Interop. We've compiled a list of Superchain interop ideas that you can use to help grow the Superchain -If you’ve experimented with an application, or library to support Superchain Interop, [please let us know and fill out this form](https://www.surveymonkey.com/r/398MYD9). We would love to reach out directly to provide technical and potential marketing support. You can also tag @Optimism on Twitter. +If you've experimented with an application, or library to support Superchain Interop, [please let us know and fill out this form](https://www.surveymonkey.com/r/398MYD9). We would love to reach out directly to provide technical and potential marketing support. You can also tag @Optimism on Twitter. ### Helpful Tools: -[Interop docs](https://docs.optimism.io/stack/interop/explainer) -[Devnet chain configs](https://docs.optimism.io/stack/interop/devnet) -[Interop demo apps](https://console.optimism.io/templates) -[Clone the Supersim repo to simulate Superchain Interop](https://github.com/ethereum-optimism/supersim) +* [Interop docs](https://docs.optimism.io/stack/interop/explainer) +* [Devnet chain configs](https://docs.optimism.io/stack/interop/devnet) +* [Interop demo apps](https://console.optimism.io/templates) +* [Clone the Supersim repo to simulate Superchain Interop](https://github.com/ethereum-optimism/supersim) ### Interop ideas From 5c83186a27fd96ec4904c7d7d6967cca0199bce8 Mon Sep 17 00:00:00 2001 From: Bradley Camacho <42678939+bradleycamacho@users.noreply.github.com> Date: Fri, 21 Feb 2025 15:49:35 -0800 Subject: [PATCH 7/8] Lint fixes 2 --- pages/stack/interop/ideas.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/stack/interop/ideas.mdx b/pages/stack/interop/ideas.mdx index 5ccd73c26..865a17e22 100644 --- a/pages/stack/interop/ideas.mdx +++ b/pages/stack/interop/ideas.mdx @@ -34,9 +34,9 @@ If you've experimented with an application, or library to support Superchain Int | | SuperArbitrage | P1 | Build a trading bot that uses Superchain interop to arbitrage DEX pools on ChainA and ChainB | | | | Predict | P1 | Prediction market that uses Superchain interop to determine whether a set of actions happens on a set of chainsEg Will Uniswap USDC-ETH on the Superchain see more volume than Velodrome USDC-ETH today? | | | Identity | Attestations | P1 | Use an attestation on chainA to interact with a smart contract on chainB Superchain attestations | | -| | SuperGotchi | P3 | A Tamagotchi-like game where the pets llive as NFTs onchain, and transform based on activity on ChainA and ChainB | | -| Wallets | SuperchainERC20 payment app | P2 | Build a wallet demo that uses chain specfic addr and superchain interop to send eth between chainA and chainB | | -| | Superchain Wallet | P1 | Use Superchain interop to build a wallet that priortizes UX and abstracts the concepts of individual chains from the user | | +| | SuperGotchi | P3 | A Tamagotchi-like game where the pets live as NFTs onchain, and transform based on activity on ChainA and ChainB | | +| Wallets | SuperchainERC20 payment app | P2 | Build a wallet demo that uses chain specific address and superchain interop to send eth between chainA and chainB | | +| | Superchain Wallet | P1 | Use Superchain interop to build a wallet that prioritizes UX and abstracts the concepts of individual chains from the user | | | | Crosschain Account Abstract | P2 | Develop AA wallet experience that manages owners, sessions, balances, etc. across multiple chains | | | Onramping | 7683 + Superchain interop | P2 | Build an intent-based system for swapping or bridging that uses Superchain interop to verify intent fulfillment | | | | Bridge abstraction widget | P2 | Enable apps to use ETH balances from any chain in the Superchain to interact with target app | | From a80976e4a8f070942ad81c219df1669ee269113f Mon Sep 17 00:00:00 2001 From: Bradley Camacho <42678939+bradleycamacho@users.noreply.github.com> Date: Fri, 21 Feb 2025 15:50:29 -0800 Subject: [PATCH 8/8] MORE LINT --- pages/stack/interop/ideas.mdx | 19 +++++++++---------- words.txt | 7 ++++++- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/pages/stack/interop/ideas.mdx b/pages/stack/interop/ideas.mdx index 865a17e22..591cae376 100644 --- a/pages/stack/interop/ideas.mdx +++ b/pages/stack/interop/ideas.mdx @@ -8,15 +8,16 @@ description: Crypto used to be full of wild ideas—where are they now? Creativi Crypto used to be full of wild ideas—where are they now? Creativity and composability has been limited up until now. We've mastered wallets, DeFi, L2s, and stables. It's time to bring back the bold. Discover net-new use cases that are uniquely enabled by Superchain Interop, and not just bridge abstraction. -It's time to reimagine the onchain future together, reimagine your application with Superchain Interop and hack on Superchain Interop devnets. +It's time to reimagine the onchain future together, reimagine your application with Superchain Interop and hack on Superchain Interop devnets. ## Cutting edge Superchain ideas Hack on the various cutting edge applications that are uniquely enabled by Superchain Interop. We've compiled a list of Superchain interop ideas that you can use to help grow the Superchain -If you've experimented with an application, or library to support Superchain Interop, [please let us know and fill out this form](https://www.surveymonkey.com/r/398MYD9). We would love to reach out directly to provide technical and potential marketing support. You can also tag @Optimism on Twitter. +If you've experimented with an application, or library to support Superchain Interop, [please let us know and fill out this form](https://www.surveymonkey.com/r/398MYD9). We would love to reach out directly to provide technical and potential marketing support. You can also tag @Optimism on Twitter. + +### Helpful Tools: -### Helpful Tools: * [Interop docs](https://docs.optimism.io/stack/interop/explainer) * [Devnet chain configs](https://docs.optimism.io/stack/interop/devnet) * [Interop demo apps](https://console.optimism.io/templates) @@ -25,7 +26,7 @@ If you've experimented with an application, or library to support Superchain Int ### Interop ideas | Use Case | Idea | Priority | Description | | -|-----------|-----------------------------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---| +| --------- | --------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - | | DeFi | Superloans | P1 | Use collateral on ChainA and ChainB to execute an arbitrage opportunity on ChainA | | | | Superlend | P1 | Deposit ETH from ChainA or ChainB into a lend/borrow protocol for the best yield on ChainA or ChainB.Automatically rebalances to ChainA or ChainB based on best yield | | | | SuperCDP | P1 | Collateralized crosschain debt protocol that holds assets and issues a SuperchainERC20 on users preferred chain | | @@ -34,13 +35,11 @@ If you've experimented with an application, or library to support Superchain Int | | SuperArbitrage | P1 | Build a trading bot that uses Superchain interop to arbitrage DEX pools on ChainA and ChainB | | | | Predict | P1 | Prediction market that uses Superchain interop to determine whether a set of actions happens on a set of chainsEg Will Uniswap USDC-ETH on the Superchain see more volume than Velodrome USDC-ETH today? | | | Identity | Attestations | P1 | Use an attestation on chainA to interact with a smart contract on chainB Superchain attestations | | -| | SuperGotchi | P3 | A Tamagotchi-like game where the pets live as NFTs onchain, and transform based on activity on ChainA and ChainB | | -| Wallets | SuperchainERC20 payment app | P2 | Build a wallet demo that uses chain specific address and superchain interop to send eth between chainA and chainB | | -| | Superchain Wallet | P1 | Use Superchain interop to build a wallet that prioritizes UX and abstracts the concepts of individual chains from the user | | +| | SuperGotchi | P3 | A Tamagotchi-like game where the pets live as NFTs onchain, and transform based on activity on ChainA and ChainB | | +| Wallets | SuperchainERC20 payment app | P2 | Build a wallet demo that uses chain specific address and superchain interop to send eth between chainA and chainB | | +| | Superchain Wallet | P1 | Use Superchain interop to build a wallet that prioritizes UX and abstracts the concepts of individual chains from the user | | | | Crosschain Account Abstract | P2 | Develop AA wallet experience that manages owners, sessions, balances, etc. across multiple chains | | | Onramping | 7683 + Superchain interop | P2 | Build an intent-based system for swapping or bridging that uses Superchain interop to verify intent fulfillment | | | | Bridge abstraction widget | P2 | Enable apps to use ETH balances from any chain in the Superchain to interact with target app | | | | CEX widget | P2 | Enable apps to leverage CEX integrations from a chain in the Superchain to to deposit/withdraw to any chain in the Superchain | | -| Agents | Incentivizer Agent | P2 | A multi-chain agent that drips rewards to users via attestations (or tokens) to power users of the Superchain. | | -| | | | | | - +| Agents | Incentivizer Agent | P2 | A multi-chain agent that drips rewards to users via attestations (or tokens) to power users of the Superchain. | | | | diff --git a/words.txt b/words.txt index 0c5879e4e..f5b78fb71 100644 --- a/words.txt +++ b/words.txt @@ -151,6 +151,7 @@ globalqueue GLOBALSLOTS globalslots gokzg +Gotchi growthepie hardfork hardforks @@ -171,6 +172,7 @@ Immunefi implicity Inator inator +Incentivizer INFLUXDBV influxdbv initcode @@ -264,6 +266,7 @@ nosyncserve Numba Offchain offchain +Onramping OPCM opcm Openfort @@ -324,10 +327,12 @@ QRNG Quicknode quicknode quickstarts +rebalances rebalancing Regenesis regenesis Reimagine +reimagine REJOURNAL rejournal REMOTEDB @@ -360,7 +365,6 @@ seqnr SEQUENCERHTTP sequencerhttp serv -settions signup SLLV SLTI @@ -399,6 +403,7 @@ syncmode SYNCTARGET synctarget syscalls +Tamagotchi thirdweb threadcreate tility