Skip to content

Commit

Permalink
interop: more precise breakdown of second argument of setConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
0xfuturistic committed May 10, 2024
1 parent 01a118d commit 6b382fc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions specs/interop/predeploys.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,9 @@ enum ConfigType {
}
```

The second argument of `setConfig` is the encoded value being set:
For `GAS_PAYING_TOKEN`, let `token` be the gas paying token's address (type `address`), `decimals` be the token's decimals (type `uint8`), `name` be the token's name (type `bytes32`), and `symbol` be the token's symbol (type `bytes32`). The value passed to `setConfig` as the second argument would then be `abi.encode(token, decimals, name, symbol)`.

- For `GAS_PAYING_TOKEN`, this value contains the address of the gas paying token, its decimals, name, and symbol.

- For `ADD_DEPENDENCY` and `REMOVE_DEPENDENCY`, this value contains the chain id being added or removed.
On the other hand, for `ADD_DEPENDENCY` and `REMOVE_DEPENDENCY`, let `chainId` be the chain id intended to be added or removed from the dependency set. The value passed to `setConfig` as the second argument would be `abi.encode(chainId)`.

Calls to `setConfig` MUST originate from `SystemConfig` and are forwarded to `L1Block` by `OptimismPortal`.

Expand Down

0 comments on commit 6b382fc

Please sign in to comment.