Skip to content

Commit 74725db

Browse files
TucksonDevmds1
andauthored
feat: update arbitrum one information (#61)
* feat:update arbitrum one information * chore: small typographic change --------- Co-authored-by: Matt Solomon <[email protected]>
1 parent 645b089 commit 74725db

File tree

4 files changed

+276
-283
lines changed

4 files changed

+276
-283
lines changed

Diff for: src/chains/arbitrum/deployedContracts.ts

+191-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,196 @@
11
import { deployedContracts as mainnetDeployedContracts } from '@/chains/mainnet/deployedContracts';
2+
import { DeployedContract, DeployedContractKind } from '@/types';
3+
4+
const ARBITRUM_SMART_CONTRACT_ADDRESSES =
5+
'[Arbitrum Smart Contract Addresses](https://docs.arbitrum.io/for-devs/useful-addresses)';
6+
7+
const arbitrumDeployedContracts: Record<string, DeployedContract> = {
8+
...mainnetDeployedContracts,
9+
L2GatewayRouter: {
10+
name: 'L2GatewayRouter',
11+
description:
12+
'Handles withdrawals from Ethereum into Arbitrum. Tokens are routed to their appropriate L2 gateway (Router itself also conforms to the Gateway interface).',
13+
kind: DeployedContractKind.Utility,
14+
address: '0x5288c571Fd7aD117beA99bF60FE0846C4E84F933',
15+
proxyAbi: [
16+
'constructor(address _logic, address admin_, bytes _data) payable',
17+
'event AdminChanged(address previousAdmin, address newAdmin)',
18+
'event Upgraded(address indexed implementation)',
19+
'fallback()',
20+
'function admin() returns (address admin_)',
21+
'function changeAdmin(address newAdmin)',
22+
'function implementation() returns (address implementation_)',
23+
'function upgradeTo(address newImplementation)',
24+
'function upgradeToAndCall(address newImplementation, bytes data) payable',
25+
'receive() external payable',
26+
],
27+
logicAbi: [
28+
'event DefaultGatewayUpdated(address newDefaultGateway)',
29+
'event GatewaySet(address indexed l1Token, address indexed gateway)',
30+
'event TransferRouted(address indexed token, address indexed _userFrom, address indexed _userTo, address gateway)',
31+
'event TxToL1(address indexed _from, address indexed _to, uint256 indexed _id, bytes _data)',
32+
'function calculateL2TokenAddress(address l1ERC20) view returns (address)',
33+
'function counterpartGateway() view returns (address)',
34+
'function defaultGateway() view returns (address)',
35+
'function finalizeInboundTransfer(address, address, address, uint256, bytes) payable',
36+
'function getGateway(address _token) view returns (address gateway)',
37+
'function getOutboundCalldata(address _token, address _from, address _to, uint256 _amount, bytes _data) view returns (bytes)',
38+
'function initialize(address _counterpartGateway, address _defaultGateway)',
39+
'function l1TokenToGateway(address) view returns (address)',
40+
'function outboundTransfer(address _l1Token, address _to, uint256 _amount, bytes _data) payable returns (bytes)',
41+
'function outboundTransfer(address _token, address _to, uint256 _amount, uint256 _maxGas, uint256 _gasPriceBid, bytes _data) payable returns (bytes)',
42+
'function postUpgradeInit()',
43+
'function router() view returns (address)',
44+
'function setDefaultGateway(address newL2DefaultGateway)',
45+
'function setGateway(address[] _l1Token, address[] _gateway)',
46+
],
47+
logicAddress: '0xe80eb0238029333e368e0bDDB7acDf1b9cb28278',
48+
references: [ARBITRUM_SMART_CONTRACT_ADDRESSES],
49+
},
50+
L2ERC20Gateway: {
51+
name: 'L2ERC20Gateway',
52+
description:
53+
"Initiates Arbitrum to Ethereum ERC20 transfers, which are forwarded to the token's L2 Gateway to communicate with its corresponding L1 Gateway.",
54+
kind: DeployedContractKind.Utility,
55+
address: '0x09e9222E96E7B4AE2a407B98d48e330053351EEe',
56+
proxyAbi: [
57+
'constructor(address _logic, address admin_, bytes _data) payable',
58+
'event AdminChanged(address previousAdmin, address newAdmin)',
59+
'event Upgraded(address indexed implementation)',
60+
'fallback()',
61+
'function admin() returns (address admin_)',
62+
'function changeAdmin(address newAdmin)',
63+
'function implementation() returns (address implementation_)',
64+
'function upgradeTo(address newImplementation)',
65+
'function upgradeToAndCall(address newImplementation, bytes data) payable',
66+
'receive() external payable',
67+
],
68+
logicAbi: [
69+
'event DepositFinalized(address indexed l1Token, address indexed _from, address indexed _to, uint256 _amount)',
70+
'event TxToL1(address indexed _from, address indexed _to, uint256 indexed _id, bytes _data)',
71+
'event WithdrawalInitiated(address l1Token, address indexed _from, address indexed _to, uint256 indexed _l2ToL1Id, uint256 _exitNum, uint256 _amount)',
72+
'function beaconProxyFactory() view returns (address)',
73+
'function calculateL2TokenAddress(address l1ERC20) view returns (address)',
74+
'function cloneableProxyHash() view returns (bytes32)',
75+
'function counterpartGateway() view returns (address)',
76+
'function exitNum() view returns (uint256)',
77+
'function finalizeInboundTransfer(address _token, address _from, address _to, uint256 _amount, bytes _data) payable',
78+
'function getOutboundCalldata(address _token, address _from, address _to, uint256 _amount, bytes _data) view returns (bytes outboundCalldata)',
79+
'function getUserSalt(address l1ERC20) pure returns (bytes32)',
80+
'function initialize(address _l1Counterpart, address _router, address _beaconProxyFactory)',
81+
'function outboundTransfer(address _l1Token, address _to, uint256 _amount, bytes _data) payable returns (bytes)',
82+
'function outboundTransfer(address _l1Token, address _to, uint256 _amount, uint256, uint256, bytes _data) payable returns (bytes res)',
83+
'function postUpgradeInit()',
84+
'function router() view returns (address)',
85+
],
86+
logicAddress: '0x1DCf7D03574fbC7C205F41f2e116eE094a652e93',
87+
references: [ARBITRUM_SMART_CONTRACT_ADDRESSES],
88+
},
89+
L2CustomGateway: {
90+
name: 'L2CustomGateway',
91+
description:
92+
'Allows to transfer of custom tokens from Arbitrum to Ethereum, which are forwarded to the L2 Gateway to communicate with its corresponding L1 Gateway.',
93+
kind: DeployedContractKind.Utility,
94+
address: '0x096760F208390250649E3e8763348E783AEF5562',
95+
proxyAbi: [
96+
'constructor(address _logic, address admin_, bytes _data) payable',
97+
'event AdminChanged(address previousAdmin, address newAdmin)',
98+
'event Upgraded(address indexed implementation)',
99+
'fallback()',
100+
'function admin() returns (address admin_)',
101+
'function changeAdmin(address newAdmin)',
102+
'function implementation() returns (address implementation_)',
103+
'function upgradeTo(address newImplementation)',
104+
'function upgradeToAndCall(address newImplementation, bytes data) payable',
105+
'receive() external payable',
106+
],
107+
logicAbi: [
108+
'event DepositFinalized(address indexed l1Token, address indexed _from, address indexed _to, uint256 _amount)',
109+
'event TokenSet(address indexed l1Address, address indexed l2Address)',
110+
'event TxToL1(address indexed _from, address indexed _to, uint256 indexed _id, bytes _data)',
111+
'event WithdrawalInitiated(address l1Token, address indexed _from, address indexed _to, uint256 indexed _l2ToL1Id, uint256 _exitNum, uint256 _amount)',
112+
'function calculateL2TokenAddress(address l1ERC20) view returns (address)',
113+
'function counterpartGateway() view returns (address)',
114+
'function exitNum() view returns (uint256)',
115+
'function finalizeInboundTransfer(address _token, address _from, address _to, uint256 _amount, bytes _data) payable',
116+
'function getOutboundCalldata(address _token, address _from, address _to, uint256 _amount, bytes _data) view returns (bytes outboundCalldata)',
117+
'function initialize(address _l1Counterpart, address _router)',
118+
'function l1ToL2Token(address) view returns (address)',
119+
'function outboundTransfer(address _l1Token, address _to, uint256 _amount, bytes _data) payable returns (bytes)',
120+
'function outboundTransfer(address _l1Token, address _to, uint256 _amount, uint256, uint256, bytes _data) payable returns (bytes res)',
121+
'function postUpgradeInit()',
122+
'function registerTokenFromL1(address[] l1Address, address[] l2Address)',
123+
'function router() view returns (address)',
124+
],
125+
logicAddress: '0x190274fEa8f30e3f48CE43aDCBd9a74110118284',
126+
references: [ARBITRUM_SMART_CONTRACT_ADDRESSES],
127+
},
128+
L2WethGateway: {
129+
name: 'L2WethGateway',
130+
description:
131+
"Handles Arbitrum to Ethereum transfers of WETH by unwrapping the Ether and re-wrapping it on Ethereum, ensuring that all WETH tokens are always fully collateralized on the layer it's transferred to.",
132+
kind: DeployedContractKind.Utility,
133+
address: '0x6c411aD3E74De3E7Bd422b94A27770f5B86C623B',
134+
proxyAbi: [
135+
'constructor(address _logic, address admin_, bytes _data) payable',
136+
'event AdminChanged(address previousAdmin, address newAdmin)',
137+
'event Upgraded(address indexed implementation)',
138+
'fallback()',
139+
'function admin() returns (address admin_)',
140+
'function changeAdmin(address newAdmin)',
141+
'function implementation() returns (address implementation_)',
142+
'function upgradeTo(address newImplementation)',
143+
'function upgradeToAndCall(address newImplementation, bytes data) payable',
144+
'receive() external payable',
145+
],
146+
logicAbi: [
147+
'event DepositFinalized(address indexed l1Token, address indexed _from, address indexed _to, uint256 _amount)',
148+
'event TxToL1(address indexed _from, address indexed _to, uint256 indexed _id, bytes _data)',
149+
'event WithdrawalInitiated(address l1Token, address indexed _from, address indexed _to, uint256 indexed _l2ToL1Id, uint256 _exitNum, uint256 _amount)',
150+
'function calculateL2TokenAddress(address l1ERC20) view returns (address)',
151+
'function counterpartGateway() view returns (address)',
152+
'function exitNum() view returns (uint256)',
153+
'function finalizeInboundTransfer(address _token, address _from, address _to, uint256 _amount, bytes _data) payable',
154+
'function getOutboundCalldata(address _token, address _from, address _to, uint256 _amount, bytes _data) view returns (bytes outboundCalldata)',
155+
'function initialize(address _l1Counterpart, address _router, address _l1Weth, address _l2Weth)',
156+
'function l1Weth() view returns (address)',
157+
'function l2Weth() view returns (address)',
158+
'function outboundTransfer(address _l1Token, address _to, uint256 _amount, bytes _data) payable returns (bytes)',
159+
'function outboundTransfer(address _l1Token, address _to, uint256 _amount, uint256, uint256, bytes _data) payable returns (bytes res)',
160+
'function postUpgradeInit()',
161+
'function router() view returns (address)',
162+
'receive() external payable',
163+
],
164+
logicAddress: '0x806421D09cDb253aa9d128a658e60c0B95eFFA01',
165+
references: [ARBITRUM_SMART_CONTRACT_ADDRESSES],
166+
},
167+
L2Multicall: {
168+
name: 'L2Multicall',
169+
description:
170+
'The L2Multicall contract enables batched read operations on Arbitrum, where block numbers are calculated via the ArbSys precompile.',
171+
kind: DeployedContractKind.Utility,
172+
address: '0x842eC2c7D803033Edf55E478F461FC547Bc54EB2',
173+
references: [ARBITRUM_SMART_CONTRACT_ADDRESSES],
174+
logicAbi: [
175+
'struct Call { address target; bytes callData; }',
176+
'struct Result { bool success; bytes returnData; }',
177+
'function aggregate(Call[] calldata calls) public returns (uint256 blockNumber, bytes[] memory returnData)',
178+
'function blockAndAggregate(Call[] calldata calls) public returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData)',
179+
'function getBlockHash(uint256 blockNumber) view returns (bytes32 blockHash)',
180+
'function getBlockNumber() view returns (uint256 blockNumber)',
181+
'function getCurrentBlockCoinbase() view returns (address coinbase)',
182+
'function getCurrentBlockDifficulty() view returns (uint256 difficulty)',
183+
'function getCurrentBlockGasLimit() view returns (uint256 gaslimit)',
184+
'function getCurrentBlockTimestamp() view returns (uint256 timestamp)',
185+
'function getEthBalance(address addr) view returns (uint256 balance)',
186+
'function getLastBlockHash() view returns (bytes32 blockHash)',
187+
'function getL1BlockNumber() public view returns (uint256 l1BlockNumber)',
188+
'function tryAggregate(bool requireSuccess, Call[] calldata calls) public returns (Result[] memory returnData)',
189+
'function tryBlockAndAggregate(bool requireSuccess, Call[] calldata calls) public returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData)',
190+
],
191+
},
192+
};
2193

3-
const arbitrumDeployedContracts = { ...mainnetDeployedContracts };
4194
arbitrumDeployedContracts['Wrapped Native Token'] = {
5195
...arbitrumDeployedContracts['Wrapped Native Token'],
6196
address: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1',

Diff for: src/chains/arbitrum/vm/opcodes/block/coinbase.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ const { supportedHardforks: _supportedHardforks, ...opcode } = baseOpcode;
55
export const coinbase: Omit<Opcode, 'supportedHardforks'> = {
66
...opcode,
77
description:
8-
'Returns `0xA4b000000000000000000073657175656e636572`, the address of the L1 Batch Poster.',
8+
"Returns the designated internal address `0xA4b000000000000000000073657175656e636572` if the message was posted by a sequencer. If it's a delayed message, it returns the address of the delayed message's poster.",
99
outputs: [
1010
{
1111
name: 'address',
12-
description: "The L1 Batch Poster's address",
12+
description:
13+
"The L1 Batch Poster's address if the message was posted by a sequencer, or the address of the delayed message's poster if it's a delayed message.",
1314
},
1415
],
1516
examples: [
@@ -18,6 +19,6 @@ export const coinbase: Omit<Opcode, 'supportedHardforks'> = {
1819
},
1920
],
2021
references: [
21-
'[Arbitrum Differences from Solidity on Ethereum](https://developer.arbitrum.io/solidity-support)',
22+
'[Arbitrum Differences from Solidity on Ethereum](https://docs.arbitrum.io/for-devs/concepts/differences-between-arbitrum-ethereum/solidity-support)',
2223
],
2324
};

0 commit comments

Comments
 (0)