Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ jobs:
strategy:
matrix:
config:
- name: Nitro contracts v3.1 - Custom gas token with 18 decimals
nitro-contracts-branch: v3.1.1
- name: Nitro contracts v3.2 - Custom gas token with 18 decimals
nitro-contracts-branch: v3.2.0
args: --tokenbridge --l3node --l3-token-bridge --l3-fee-token
decimals: 18

- name: Nitro contracts v3.1 - Custom gas token with 6 decimals
nitro-contracts-branch: v3.1.1
- name: Nitro contracts v3.2 - Custom gas token with 6 decimals
nitro-contracts-branch: v3.2.0
args: --tokenbridge --l3node --l3-token-bridge --l3-fee-token --l3-fee-token-decimals 6
decimals: 6

Expand Down
23 changes: 18 additions & 5 deletions patches/@wagmi+cli+1.5.2.patch
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,38 @@ index 04a78d1..0eb6430 100644
97: string;
128: string;
diff --git a/node_modules/@wagmi/cli/dist/plugins/index.js b/node_modules/@wagmi/cli/dist/plugins/index.js
index 8e23da2..02b7c49 100644
index 8e23da2..615b384 100644
--- a/node_modules/@wagmi/cli/dist/plugins/index.js
+++ b/node_modules/@wagmi/cli/dist/plugins/index.js
@@ -386,12 +386,12 @@ function blockExplorer({
@@ -12,6 +12,10 @@ import {
} from "../chunk-3XEDX7DR.js";
import "../chunk-UICA3PK6.js";

+function sleep(ms) {
+ return new Promise((resolve) => setTimeout(resolve, ms));
+}
+
// src/plugins/actions.ts
import { pascalCase } from "change-case";
import dedent from "dedent";
@@ -386,12 +390,14 @@ function blockExplorer({
throw new Error(parsed.data.result);
return parsed.data.result;
},
- request({ address }) {
+ request({ address, implementation }) {
+ async request({ address, implementation }) {
if (!address)
throw new Error("address is required");
+ // etherscan was rate-limiting us, had to add this
+ await sleep(1000);
return {
url: `${baseUrl}?module=contract&action=getabi&address=${getAddress({
- address
+ address, implementation
})}${apiKey ? `&apikey=${apiKey}` : ""}`
};
}
@@ -1386,7 +1386,9 @@ var apiUrls = {
@@ -1386,7 +1392,9 @@ var apiUrls = {
[137]: "https://api.polygonscan.com/api",
[80001]: "https://api-testnet.polygonscan.com/api",
[42161]: "https://api.arbiscan.io/api",
Expand All @@ -41,7 +54,7 @@ index 8e23da2..02b7c49 100644
[56]: "https://api.bscscan.com/api",
[97]: "https://api-testnet.bscscan.com/api",
[128]: "https://api.hecoinfo.com/api",
@@ -1409,16 +1411,16 @@ function etherscan({
@@ -1409,16 +1417,16 @@ function etherscan({
address: typeof x.address === "string" ? { [chainId]: x.address } : x.address
}));
return blockExplorer({
Expand Down
70 changes: 70 additions & 0 deletions src/__snapshots__/createRollupPrepareTransaction.unit.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,73 @@ exports[`successfully parses input calldata for a chain created with RollupCreat
},
]
`;

exports[`successfully parses input calldata for a chain created with RollupCreator v3.2 1`] = `
[
{
"batchPosterManager": "0x784FB06549C5Ebc20A82FFE251FF3B45C963D8df",
"batchPosters": [
"0x784FB06549C5Ebc20A82FFE251FF3B45C963D8df",
],
"config": {
"anyTrustFastConfirmer": "0x0000000000000000000000000000000000000000",
"baseStake": 2500000000000000n,
"bufferConfig": {
"max": 14400n,
"replenishRateInBasis": 833n,
"threshold": 600n,
},
"chainConfig": "{\\"chainId\\":2026011651,\\"homesteadBlock\\":0,\\"daoForkBlock\\":null,\\"daoForkSupport\\":true,\\"eip150Block\\":0,\\"eip150Hash\\":\\"0x0000000000000000000000000000000000000000000000000000000000000000\\",\\"eip155Block\\":0,\\"eip158Block\\":0,\\"byzantiumBlock\\":0,\\"constantinopleBlock\\":0,\\"petersburgBlock\\":0,\\"istanbulBlock\\":0,\\"muirGlacierBlock\\":0,\\"berlinBlock\\":0,\\"londonBlock\\":0,\\"clique\\":{\\"period\\":0,\\"epoch\\":0},\\"arbitrum\\":{\\"EnableArbOS\\":true,\\"AllowDebugPrecompiles\\":false,\\"DataAvailabilityCommittee\\":false,\\"InitialArbOSVersion\\":51,\\"InitialChainOwner\\":\\"0x93a3B783Bd697b384Bfc6C01a2d2831E42536975\\",\\"GenesisBlockNum\\":0}}",
"chainId": 2026011651n,
"challengeGracePeriodBlocks": 10n,
"confirmPeriodBlocks": 128n,
"dataCostEstimate": 0n,
"genesisAssertionState": {
"endHistoryRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"globalState": {
"bytes32Vals": [
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000000000000000000000000000000000000000000000",
],
"u64Vals": [
0n,
0n,
],
},
"machineStatus": 1,
},
"genesisInboxCount": 0n,
"layerZeroBigStepEdgeHeight": 524288n,
"layerZeroBlockEdgeHeight": 67108864n,
"layerZeroSmallStepEdgeHeight": 8388608n,
"loserStakeEscrow": "0x93a3B783Bd697b384Bfc6C01a2d2831E42536975",
"miniStakeValues": [
0n,
500000000000000n,
250000000000000n,
],
"minimumAssertionPeriod": 75n,
"numBigStepLevel": 1,
"owner": "0x93a3B783Bd697b384Bfc6C01a2d2831E42536975",
"sequencerInboxMaxTimeVariation": {
"delayBlocks": 7200n,
"delaySeconds": 86400n,
"futureBlocks": 12n,
"futureSeconds": 3600n,
},
"stakeToken": "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9",
"validatorAfkBlocks": 201600n,
"wasmModuleRoot": "0x8a7513bf7bb3e3db04b0d982d0e973bcf57bf8b88aef7c6d03dba3a81a56a499",
},
"customOsp": "0x0000000000000000000000000000000000000000",
"deployFactoriesToL2": true,
"feeTokenPricer": "0x0000000000000000000000000000000000000000",
"maxDataSize": 117964n,
"maxFeePerGasForRetryables": 1000000000n,
"nativeToken": "0x0000000000000000000000000000000000000000",
"validators": [
"0xe6AB2c18Ce552fE5fcf43667133776d6337359Df",
],
},
]
`;
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,20 @@ exports[`successfully parses core contracts from a tx receipt on RollupCreator v
"validatorWalletCreator": "0x1cB01EA4b15884DEf0e64201C342681B897Db38F",
}
`;

exports[`successfully parses core contracts from a tx receipt on RollupCreator v3.2 1`] = `
{
"adminProxy": "0xAEFa6C60E66678C91fc4A15723827964a34F0E03",
"bridge": "0xc7990794EA47F0332748EFd638C0B631E1f64Bd3",
"challengeManager": "0x55910b7a9c0D07A13a0a8A276069300E3Aa9f34f",
"deployedAtBlockNumber": 10058902,
"inbox": "0xbBAcfDA0025d482A038bD52F4A38e23FA705ff83",
"nativeToken": "0x0000000000000000000000000000000000000000",
"outbox": "0x54085e0511401c41560B9f442214E8066173B4cF",
"rollup": "0x4b189f98B181eAB46337Cae2941223700F73AB7c",
"rollupEventInbox": "0x0E2b2a053476fFDDd64EA66fE00Bb0Fcab902552",
"sequencerInbox": "0xA801fc784147C698ccB733de6fD927483Aa28580",
"upgradeExecutor": "0x7CFfb250Ce68450a3eE4fbbd9f54EfDF03378338",
"validatorWalletCreator": "0xB7FE37712e46F28C8f22Ec4bAA33A09fb8B52BD0",
}
`;
2 changes: 1 addition & 1 deletion src/contracts/RollupCreator/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// export the latest version
export * from './v3.1';
export * from './v3.2';
Loading
Loading