From d4aa4de44ff5b555eff5e05f29927abf7e5b69ee Mon Sep 17 00:00:00 2001 From: Ori Pomerantz Date: Wed, 12 Jul 2023 11:58:47 -0500 Subject: [PATCH 1/4] feat(js-client): Add OP Chain support Closing: DEVRL-1051 --- src/docs/sdk/js-client.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/docs/sdk/js-client.md b/src/docs/sdk/js-client.md index 0ec1ae73d..a70619ed9 100644 --- a/src/docs/sdk/js-client.md +++ b/src/docs/sdk/js-client.md @@ -5,16 +5,22 @@ lang: en-US There are a few areas in which the SDK can help you navigate [the differences between OP Mainnet and Ethereum](../developers/build/differences/): - - [Gas costs](../developers/build/transaction-fees.md) - [Interlayer communication](../developers/bridge/basics.md) ## JavaScript SDK +The JavaScript SDK directly multiple OP Chains: OP (Mainnet and Goerli), Base Goerli, etc. +To see whether a specific OP Chain is supported directly, look in the `CONTRACT_ADDRESSES` constant in [`chain-constants.ts`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/sdk/src/utils/chain-constants.ts#L124-L129). + +"Unsupported chains" just take an extra step to use. +Get the L1 contract addresses, and [provide them to the SDK](https://stack.optimism.io/docs/build/sdk/#contract-addresses). +Once you do that, you can use the SDK normally. + [Reference](https://sdk.optimism.io/) Tutorials: - [Viewing transactions between layers](https://github.com/ethereum-optimism/optimism-tutorial/tree/main/sdk-view-tx) - [Bridging ETH](https://github.com/ethereum-optimism/optimism-tutorial/tree/main/cross-dom-bridge-eth) - [Bridging ERC-20](https://github.com/ethereum-optimism/optimism-tutorial/tree/main/cross-dom-bridge-erc20) -- [Estimate the costs of an Optimistic (L2) transaction](https://github.com/ethereum-optimism/optimism-tutorial/tree/main/sdk-estimate-gas) \ No newline at end of file +- [Estimate the costs of an Optimistic (L2) transaction](https://github.com/ethereum-optimism/optimism-tutorial/tree/main/sdk-estimate-gas) From 24fa033001654e701315c0e41f8bc882e264fccc Mon Sep 17 00:00:00 2001 From: Ori Pomerantz Date: Wed, 12 Jul 2023 14:05:11 -0500 Subject: [PATCH 2/4] fix(js-client): Improve discoverability --- src/docs/sdk/js-client.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/docs/sdk/js-client.md b/src/docs/sdk/js-client.md index a70619ed9..c5c901b8a 100644 --- a/src/docs/sdk/js-client.md +++ b/src/docs/sdk/js-client.md @@ -1,5 +1,5 @@ --- -title: The OP Mainnet Client SDK +title: The OP Stack Client SDK lang: en-US --- @@ -8,18 +8,15 @@ There are a few areas in which the SDK can help you navigate [the differences be - [Gas costs](../developers/build/transaction-fees.md) - [Interlayer communication](../developers/bridge/basics.md) -## JavaScript SDK - -The JavaScript SDK directly multiple OP Chains: OP (Mainnet and Goerli), Base Goerli, etc. -To see whether a specific OP Chain is supported directly, look in the `CONTRACT_ADDRESSES` constant in [`chain-constants.ts`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/sdk/src/utils/chain-constants.ts#L124-L129). - -"Unsupported chains" just take an extra step to use. +The SDK supports multiple OP Chains: OP, Base, Zora, etc. +To see whether a specific OP Chain is supported directly, [see the documentation](https://sdk.optimism.io/enums/l2chainid). +Chains that aren't officially supported just take a few extra steps. Get the L1 contract addresses, and [provide them to the SDK](https://stack.optimism.io/docs/build/sdk/#contract-addresses). Once you do that, you can use the SDK normally. [Reference](https://sdk.optimism.io/) -Tutorials: +## Tutorials: - [Viewing transactions between layers](https://github.com/ethereum-optimism/optimism-tutorial/tree/main/sdk-view-tx) - [Bridging ETH](https://github.com/ethereum-optimism/optimism-tutorial/tree/main/cross-dom-bridge-eth) - [Bridging ERC-20](https://github.com/ethereum-optimism/optimism-tutorial/tree/main/cross-dom-bridge-erc20) From 9b171bacb2ab8c9716dd8626a15d255fe5564170 Mon Sep 17 00:00:00 2001 From: Ori Pomerantz Date: Thu, 13 Jul 2023 21:31:55 -0500 Subject: [PATCH 3/4] Update js-client.md --- src/docs/sdk/js-client.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/sdk/js-client.md b/src/docs/sdk/js-client.md index c5c901b8a..116196f6e 100644 --- a/src/docs/sdk/js-client.md +++ b/src/docs/sdk/js-client.md @@ -20,4 +20,4 @@ Once you do that, you can use the SDK normally. - [Viewing transactions between layers](https://github.com/ethereum-optimism/optimism-tutorial/tree/main/sdk-view-tx) - [Bridging ETH](https://github.com/ethereum-optimism/optimism-tutorial/tree/main/cross-dom-bridge-eth) - [Bridging ERC-20](https://github.com/ethereum-optimism/optimism-tutorial/tree/main/cross-dom-bridge-erc20) -- [Estimate the costs of an Optimistic (L2) transaction](https://github.com/ethereum-optimism/optimism-tutorial/tree/main/sdk-estimate-gas) +- [Estimate the costs of an OP (L2) transaction](https://github.com/ethereum-optimism/optimism-tutorial/tree/main/sdk-estimate-gas) From cd5d38d6f7a8eb9e30989140abee1628048694f7 Mon Sep 17 00:00:00 2001 From: Ori Pomerantz Date: Thu, 20 Jul 2023 08:54:26 -0500 Subject: [PATCH 4/4] Remove Zora reference (because it's not in the SDK yet) --- src/docs/sdk/js-client.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/sdk/js-client.md b/src/docs/sdk/js-client.md index 116196f6e..b9e7b6a61 100644 --- a/src/docs/sdk/js-client.md +++ b/src/docs/sdk/js-client.md @@ -8,7 +8,7 @@ There are a few areas in which the SDK can help you navigate [the differences be - [Gas costs](../developers/build/transaction-fees.md) - [Interlayer communication](../developers/bridge/basics.md) -The SDK supports multiple OP Chains: OP, Base, Zora, etc. +The SDK supports multiple OP Chains: OP, Base, etc. To see whether a specific OP Chain is supported directly, [see the documentation](https://sdk.optimism.io/enums/l2chainid). Chains that aren't officially supported just take a few extra steps. Get the L1 contract addresses, and [provide them to the SDK](https://stack.optimism.io/docs/build/sdk/#contract-addresses).