Skip to content

Commit 872a566

Browse files
committed
update custom gas token docs w PR feedback
1 parent b828112 commit 872a566

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

pages/builders/app-developers/tutorials/standard-bridge-custom-token.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Callout, Steps } from 'nextra/components'
99
# Bridging Your Custom ERC-20 Token Using the Standard Bridge
1010

1111
<Callout type="info">
12-
**This tutorial is for developers who want to bridge a new ERC-20 token to an OP Stack chain.**
12+
**This tutorial is for developers who want to bridge a new ERC-20 token to an OP Stack chain. This is not related to the "Custom Gas Token" feature for new OP Stack chains**
1313
If you want to bridge existing tokens, you can skip to the tutorial on [Bridging ERC-20 tokens with the Optimism SDK](./cross-dom-bridge-erc20).
1414
</Callout>
1515

pages/builders/chain-operators/management/custom-gas-token.mdx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ An OP Stack chain that uses the custom gas token feature enables an end user to
4141
* must be transferrable only via a call to the token address itself
4242
* must only be able to set allowance via a call to the token address itself
4343
* must not have a callback on transfer, and more generally a user must not be able to make a transfer to themselves revert
44+
* a user must not be able to make a transfer have unexpected side effects
4445

4546
<Callout type="warning">
4647
You will NOT be able to change the address of the custom gas token after it is set during deployment.
@@ -100,6 +101,26 @@ An OP Stack chain that uses the custom gas token feature enables an end user to
100101

101102
Ensure that the end to end system is running.
102103

104+
### Validating your deployment
105+
106+
This calls the `WETH` predeploy which should be considered wrapped native asset in the context of custom gas token. It should return the name of the token prefixed by `"Wrapped "`
107+
108+
```bash
109+
cast call --rpc-url $L2_ETH_RPC_URL 0x4200000000000000000000000000000000000006 'name()(string)'
110+
```
111+
112+
This calls the `L1Block` predeploy should return `true`.
113+
114+
```bash
115+
cast call --rpc-url $L2_ETH_RPC_URL 0x4200000000000000000000000000000000000015 'isCustomGasToken()(bool)
116+
```
117+
118+
This calls the L1 `SystemConfig` contract and should return `true`.
119+
120+
```bash
121+
cast call --rpc-url $L1_ETH_RPC_URL <SYSTEM_CONFIG_ADDRESS> 'isCustomGasToken()(bool)
122+
```
123+
103124
### Depositing Custom Gas Token into the Chain
104125

105126
* To deposit the custom gas token into the chain, users must use the **`OptimismPortalProxy.depositERC20Transaction`** method

pages/stack/protocol/features/custom-gas-token.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,13 @@ The custom token being used must adhere to the following constraints to be able
6262
* must be transferrable only via a call to the token address itself
6363
* must only be able to set allowance via a call to the token address itself
6464
* must not have a callback on transfer, and more generally a user must not be able to make a transfer to themselves revert
65+
* a user must not be able to make a transfer have unexpected side effects
66+
6567

6668

6769
## Next Steps
6870

6971
* Ready to get started? Read our guide on how to [deploy your custom gas token chain](/builders/chain-operators/management/custom-gas-token).
70-
* For bridges or developers building on a custom gas token chain, read our tutorial on [depositing custom gas tokens into a chain](/builders/app-developers/tutorials/standard-bridge-custom-token).
7172
* For more info about how the custom gas token feature works under the hood, [check out the specs](https://specs.optimism.io/protocol/granite/custom-gas-token.html).
7273

7374
## FAQs

0 commit comments

Comments
 (0)