From 566a89d2e2026f681a046bce2d79b42e3c09c79c Mon Sep 17 00:00:00 2001 From: hopeyen Date: Tue, 20 Aug 2024 18:13:50 -0500 Subject: [PATCH] refactor: update package namespace --- README.md | 4 +- .../create-rollup-custom-fee-token/index.ts | 4 +- .../low_level.ts | 4 +- examples/create-rollup-eth/index.ts | 4 +- examples/create-rollup-eth/low_level.ts | 4 +- .../index.ts | 4 +- examples/create-token-bridge-eth/index.ts | 4 +- examples/prepare-node-config/index.ts | 4 +- examples/set-new-validators/index.ts | 4 +- examples/set-valid-keyset/index.ts | 4 +- examples/setup-aep-fee-router/index.ts | 4 +- examples/setup-fast-withdrawal/index.ts | 6 +- .../setup-fee-distributor-contract/index.ts | 4 +- .../upgrade-executor-add-account/index.ts | 4 +- src/contracts/SequencerInbox.ts | 1419 ++++++++++++++--- src/package.json | 8 +- 16 files changed, 1207 insertions(+), 278 deletions(-) diff --git a/README.md b/README.md index 45d750f..2b8e151 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,12 @@ TypeScript SDK for building [Arbitrum Orbit](https://arbitrum.io/orbit) chains. Make sure you are using Node.js v18 or greater. ```bash -yarn add @arbitrum/orbit-sdk viem@^1.20.0 +yarn add @eigenda/orbit-sdk viem@^1.20.0 ``` ## Run integration tests -Clone the branch `main` of [nitro-testnode](https://github.com/OffchainLabs/nitro-testnode), and run the testnode using the following arguments: +Clone the branch `main` of [nitro-testnode](https://github.com/Layr-Labs/nitro-testnode), and run the testnode using the following arguments: ```bash ./test-node.bash --init --tokenbridge --l3node --l3-fee-token --l3-token-bridge diff --git a/examples/create-rollup-custom-fee-token/index.ts b/examples/create-rollup-custom-fee-token/index.ts index ac31a62..33844e7 100644 --- a/examples/create-rollup-custom-fee-token/index.ts +++ b/examples/create-rollup-custom-fee-token/index.ts @@ -5,8 +5,8 @@ import { prepareChainConfig, createRollupPrepareDeploymentParamsConfig, createRollup, -} from '@arbitrum/orbit-sdk'; -import { sanitizePrivateKey, generateChainId } from '@arbitrum/orbit-sdk/utils'; +} from '@eigenda/orbit-sdk'; +import { sanitizePrivateKey, generateChainId } from '@eigenda/orbit-sdk/utils'; import { config } from 'dotenv'; config(); diff --git a/examples/create-rollup-custom-fee-token/low_level.ts b/examples/create-rollup-custom-fee-token/low_level.ts index 5782ab5..2cd7b8b 100644 --- a/examples/create-rollup-custom-fee-token/low_level.ts +++ b/examples/create-rollup-custom-fee-token/low_level.ts @@ -8,8 +8,8 @@ import { createRollupPrepareCustomFeeTokenApprovalTransactionRequest, createRollupPrepareTransactionRequest, createRollupPrepareTransactionReceipt, -} from '@arbitrum/orbit-sdk'; -import { sanitizePrivateKey, generateChainId } from '@arbitrum/orbit-sdk/utils'; +} from '@eigenda/orbit-sdk'; +import { sanitizePrivateKey, generateChainId } from '@eigenda/orbit-sdk/utils'; import { config } from 'dotenv'; config(); diff --git a/examples/create-rollup-eth/index.ts b/examples/create-rollup-eth/index.ts index b04bbbb..502297a 100644 --- a/examples/create-rollup-eth/index.ts +++ b/examples/create-rollup-eth/index.ts @@ -5,8 +5,8 @@ import { prepareChainConfig, createRollupPrepareDeploymentParamsConfig, createRollup, -} from '@arbitrum/orbit-sdk'; -import { sanitizePrivateKey, generateChainId } from '@arbitrum/orbit-sdk/utils'; +} from '@eigenda/orbit-sdk'; +import { sanitizePrivateKey, generateChainId } from '@eigenda/orbit-sdk/utils'; import { config } from 'dotenv'; config(); diff --git a/examples/create-rollup-eth/low_level.ts b/examples/create-rollup-eth/low_level.ts index a4a6445..5b0cedc 100644 --- a/examples/create-rollup-eth/low_level.ts +++ b/examples/create-rollup-eth/low_level.ts @@ -6,8 +6,8 @@ import { prepareChainConfig, createRollupPrepareTransactionRequest, createRollupPrepareTransactionReceipt, -} from '@arbitrum/orbit-sdk'; -import { sanitizePrivateKey, generateChainId } from '@arbitrum/orbit-sdk/utils'; +} from '@eigenda/orbit-sdk'; +import { sanitizePrivateKey, generateChainId } from '@eigenda/orbit-sdk/utils'; import { config } from 'dotenv'; config(); diff --git a/examples/create-token-bridge-custom-fee-token/index.ts b/examples/create-token-bridge-custom-fee-token/index.ts index 4f741b8..74ce4f7 100644 --- a/examples/create-token-bridge-custom-fee-token/index.ts +++ b/examples/create-token-bridge-custom-fee-token/index.ts @@ -6,8 +6,8 @@ import { createTokenBridgePrepareCustomFeeTokenApprovalTransactionRequest, createTokenBridgePrepareTransactionRequest, createTokenBridgePrepareTransactionReceipt, -} from '@arbitrum/orbit-sdk'; -import { sanitizePrivateKey } from '@arbitrum/orbit-sdk/utils'; +} from '@eigenda/orbit-sdk'; +import { sanitizePrivateKey } from '@eigenda/orbit-sdk/utils'; import { config } from 'dotenv'; config(); diff --git a/examples/create-token-bridge-eth/index.ts b/examples/create-token-bridge-eth/index.ts index 3ca3ff5..20afc56 100644 --- a/examples/create-token-bridge-eth/index.ts +++ b/examples/create-token-bridge-eth/index.ts @@ -6,8 +6,8 @@ import { createTokenBridgePrepareSetWethGatewayTransactionRequest, createTokenBridgePrepareTransactionReceipt, createTokenBridgePrepareTransactionRequest, -} from '@arbitrum/orbit-sdk'; -import { sanitizePrivateKey } from '@arbitrum/orbit-sdk/utils'; +} from '@eigenda/orbit-sdk'; +import { sanitizePrivateKey } from '@eigenda/orbit-sdk/utils'; import { config } from 'dotenv'; config(); diff --git a/examples/prepare-node-config/index.ts b/examples/prepare-node-config/index.ts index abbb6bc..c3f80c5 100644 --- a/examples/prepare-node-config/index.ts +++ b/examples/prepare-node-config/index.ts @@ -7,8 +7,8 @@ import { createRollupPrepareTransaction, createRollupPrepareTransactionReceipt, prepareNodeConfig, -} from '@arbitrum/orbit-sdk'; -import { getParentChainLayer } from '@arbitrum/orbit-sdk/utils'; +} from '@eigenda/orbit-sdk'; +import { getParentChainLayer } from '@eigenda/orbit-sdk/utils'; import { config } from 'dotenv'; config(); diff --git a/examples/set-new-validators/index.ts b/examples/set-new-validators/index.ts index d8858e7..211e36b 100644 --- a/examples/set-new-validators/index.ts +++ b/examples/set-new-validators/index.ts @@ -5,8 +5,8 @@ import { createRollupFetchTransactionHash, createRollupPrepareTransactionReceipt, rollupAdminLogicPublicActions, -} from '@arbitrum/orbit-sdk'; -import { sanitizePrivateKey } from '@arbitrum/orbit-sdk/utils'; +} from '@eigenda/orbit-sdk'; +import { sanitizePrivateKey } from '@eigenda/orbit-sdk/utils'; import { config } from 'dotenv'; config(); diff --git a/examples/set-valid-keyset/index.ts b/examples/set-valid-keyset/index.ts index 816b37e..84fa07c 100644 --- a/examples/set-valid-keyset/index.ts +++ b/examples/set-valid-keyset/index.ts @@ -1,8 +1,8 @@ import { Chain, createPublicClient, http } from 'viem'; import { privateKeyToAccount } from 'viem/accounts'; import { arbitrumSepolia } from 'viem/chains'; -import { setValidKeysetPrepareTransactionRequest } from '@arbitrum/orbit-sdk'; -import { sanitizePrivateKey } from '@arbitrum/orbit-sdk/utils'; +import { setValidKeysetPrepareTransactionRequest } from '@eigenda/orbit-sdk'; +import { sanitizePrivateKey } from '@eigenda/orbit-sdk/utils'; function getBlockExplorerUrl(chain: Chain) { return chain.blockExplorers?.default.url; diff --git a/examples/setup-aep-fee-router/index.ts b/examples/setup-aep-fee-router/index.ts index 6d126b7..d5c5c17 100644 --- a/examples/setup-aep-fee-router/index.ts +++ b/examples/setup-aep-fee-router/index.ts @@ -15,8 +15,8 @@ import { arbOwnerPublicActions, arbGasInfoPublicActions, parentChainIsArbitrum, -} from '@arbitrum/orbit-sdk'; -import { sanitizePrivateKey, getParentChainFromId } from '@arbitrum/orbit-sdk/utils'; +} from '@eigenda/orbit-sdk'; +import { sanitizePrivateKey, getParentChainFromId } from '@eigenda/orbit-sdk/utils'; import { config } from 'dotenv'; config(); diff --git a/examples/setup-fast-withdrawal/index.ts b/examples/setup-fast-withdrawal/index.ts index 6ad4f0d..9b24e49 100644 --- a/examples/setup-fast-withdrawal/index.ts +++ b/examples/setup-fast-withdrawal/index.ts @@ -7,9 +7,9 @@ import { createSafePrepareTransactionRequest, rollupAdminLogicPublicActions, setAnyTrustFastConfirmerPrepareTransactionRequest, -} from '@arbitrum/orbit-sdk'; -import { sanitizePrivateKey, getParentChainFromId } from '@arbitrum/orbit-sdk/utils'; -import { base, baseSepolia } from '@arbitrum/orbit-sdk/chains'; +} from '@eigenda/orbit-sdk'; +import { sanitizePrivateKey, getParentChainFromId } from '@eigenda/orbit-sdk/utils'; +import { base, baseSepolia } from '@eigenda/orbit-sdk/chains'; import { config } from 'dotenv'; config(); diff --git a/examples/setup-fee-distributor-contract/index.ts b/examples/setup-fee-distributor-contract/index.ts index 38069a3..528e3ba 100644 --- a/examples/setup-fee-distributor-contract/index.ts +++ b/examples/setup-fee-distributor-contract/index.ts @@ -12,8 +12,8 @@ import { createRollupFetchCoreContracts, createTokenBridgeFetchTokenBridgeContracts, arbOwnerPublicActions, -} from '@arbitrum/orbit-sdk'; -import { getParentChainFromId, sanitizePrivateKey } from '@arbitrum/orbit-sdk/utils'; +} from '@eigenda/orbit-sdk'; +import { getParentChainFromId, sanitizePrivateKey } from '@eigenda/orbit-sdk/utils'; import { config } from 'dotenv'; config(); diff --git a/examples/upgrade-executor-add-account/index.ts b/examples/upgrade-executor-add-account/index.ts index a6c0efa..20daf0a 100644 --- a/examples/upgrade-executor-add-account/index.ts +++ b/examples/upgrade-executor-add-account/index.ts @@ -7,8 +7,8 @@ import { upgradeExecutorFetchPrivilegedAccounts, upgradeExecutorPrepareAddExecutorTransactionRequest, createTokenBridgeFetchTokenBridgeContracts, -} from '@arbitrum/orbit-sdk'; -import { sanitizePrivateKey } from '@arbitrum/orbit-sdk/utils'; +} from '@eigenda/orbit-sdk'; +import { sanitizePrivateKey } from '@eigenda/orbit-sdk/utils'; import { config } from 'dotenv'; config(); diff --git a/src/contracts/SequencerInbox.ts b/src/contracts/SequencerInbox.ts index 4b9c8fa..b45ba7b 100644 --- a/src/contracts/SequencerInbox.ts +++ b/src/contracts/SequencerInbox.ts @@ -1,343 +1,1272 @@ export const sequencerInboxABI = [ - { inputs: [], name: 'AlreadyInit', type: 'error' }, { - inputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], - name: 'AlreadyValidDASKeyset', - type: 'error', + "inputs": [ + { + "internalType": "uint256", + "name": "_maxDataSize", + "type": "uint256" + }, + { + "internalType": "contract IReader4844", + "name": "reader4844_", + "type": "address" + }, + { + "internalType": "bool", + "name": "_isUsingFeeToken", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AlreadyInit", + "type": "error" }, { - inputs: [ - { internalType: 'uint256', name: 'stored', type: 'uint256' }, - { internalType: 'uint256', name: 'received', type: 'uint256' }, + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } ], - name: 'BadSequencerNumber', - type: 'error', + "name": "AlreadyValidDASKeyset", + "type": "error" }, - { inputs: [], name: 'DataNotAuthenticated', type: 'error' }, { - inputs: [ - { internalType: 'uint256', name: 'dataLength', type: 'uint256' }, - { internalType: 'uint256', name: 'maxDataLength', type: 'uint256' }, + "inputs": [], + "name": "BadMaxTimeVariation", + "type": "error" + }, + { + "inputs": [], + "name": "BadPostUpgradeInit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "stored", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "received", + "type": "uint256" + } ], - name: 'DataTooLarge', - type: 'error', + "name": "BadSequencerNumber", + "type": "error" + }, + { + "inputs": [], + "name": "DataBlobsNotSupported", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "dataLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxDataLength", + "type": "uint256" + } + ], + "name": "DataTooLarge", + "type": "error" + }, + { + "inputs": [], + "name": "DelayedBackwards", + "type": "error" + }, + { + "inputs": [], + "name": "DelayedTooFar", + "type": "error" + }, + { + "inputs": [], + "name": "Deprecated", + "type": "error" + }, + { + "inputs": [], + "name": "ForceIncludeBlockTooSoon", + "type": "error" + }, + { + "inputs": [], + "name": "ForceIncludeTimeTooSoon", + "type": "error" + }, + { + "inputs": [], + "name": "HadZeroInit", + "type": "error" }, - { inputs: [], name: 'DelayedBackwards', type: 'error' }, - { inputs: [], name: 'DelayedTooFar', type: 'error' }, - { inputs: [], name: 'ForceIncludeBlockTooSoon', type: 'error' }, - { inputs: [], name: 'ForceIncludeTimeTooSoon', type: 'error' }, - { inputs: [], name: 'HadZeroInit', type: 'error' }, - { inputs: [], name: 'IncorrectMessagePreimage', type: 'error' }, { - inputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], - name: 'NoSuchKeyset', - type: 'error', + "inputs": [], + "name": "IncorrectMessagePreimage", + "type": "error" }, - { inputs: [], name: 'NotBatchPoster', type: 'error' }, - { inputs: [], name: 'NotForked', type: 'error' }, - { inputs: [], name: 'NotOrigin', type: 'error' }, { - inputs: [ - { internalType: 'address', name: 'sender', type: 'address' }, - { internalType: 'address', name: 'owner', type: 'address' }, + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + } ], - name: 'NotOwner', - type: 'error', + "name": "InitParamZero", + "type": "error" }, { - anonymous: false, - inputs: [ - { indexed: true, internalType: 'uint256', name: 'messageNum', type: 'uint256' }, - { indexed: false, internalType: 'bytes', name: 'data', type: 'bytes' }, + "inputs": [ + { + "internalType": "bytes1", + "name": "", + "type": "bytes1" + } ], - name: 'InboxMessageDelivered', - type: 'event', + "name": "InvalidHeaderFlag", + "type": "error" }, { - anonymous: false, - inputs: [{ indexed: true, internalType: 'uint256', name: 'messageNum', type: 'uint256' }], - name: 'InboxMessageDeliveredFromOrigin', - type: 'event', + "inputs": [], + "name": "MissingDataHashes", + "type": "error" }, { - anonymous: false, - inputs: [{ indexed: true, internalType: 'bytes32', name: 'keysetHash', type: 'bytes32' }], - name: 'InvalidateKeyset', - type: 'event', + "inputs": [], + "name": "NativeTokenMismatch", + "type": "error" }, { - anonymous: false, - inputs: [{ indexed: true, internalType: 'uint256', name: 'id', type: 'uint256' }], - name: 'OwnerFunctionCalled', - type: 'event', + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "NoSuchKeyset", + "type": "error" }, { - anonymous: false, - inputs: [ - { indexed: true, internalType: 'uint256', name: 'batchSequenceNumber', type: 'uint256' }, - { indexed: false, internalType: 'bytes', name: 'data', type: 'bytes' }, + "inputs": [], + "name": "NotBatchPoster", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } ], - name: 'SequencerBatchData', - type: 'event', + "name": "NotBatchPosterManager", + "type": "error" + }, + { + "inputs": [], + "name": "NotForked", + "type": "error" + }, + { + "inputs": [], + "name": "NotOrigin", + "type": "error" }, { - anonymous: false, - inputs: [ - { indexed: true, internalType: 'uint256', name: 'batchSequenceNumber', type: 'uint256' }, - { indexed: true, internalType: 'bytes32', name: 'beforeAcc', type: 'bytes32' }, - { indexed: true, internalType: 'bytes32', name: 'afterAcc', type: 'bytes32' }, - { indexed: false, internalType: 'bytes32', name: 'delayedAcc', type: 'bytes32' }, + "inputs": [ { - indexed: false, - internalType: 'uint256', - name: 'afterDelayedMessagesRead', - type: 'uint256', + "internalType": "address", + "name": "sender", + "type": "address" }, { - components: [ - { internalType: 'uint64', name: 'minTimestamp', type: 'uint64' }, - { internalType: 'uint64', name: 'maxTimestamp', type: 'uint64' }, - { internalType: 'uint64', name: 'minBlockNumber', type: 'uint64' }, - { internalType: 'uint64', name: 'maxBlockNumber', type: 'uint64' }, - ], - indexed: false, - internalType: 'struct ISequencerInbox.TimeBounds', - name: 'timeBounds', - type: 'tuple', + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "NotOwner", + "type": "error" + }, + { + "inputs": [], + "name": "RollupNotChanged", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "messageNum", + "type": "uint256" }, { - indexed: false, - internalType: 'enum ISequencerInbox.BatchDataLocation', - name: 'dataLocation', - type: 'uint8', + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "InboxMessageDelivered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "messageNum", + "type": "uint256" + } + ], + "name": "InboxMessageDeliveredFromOrigin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "keysetHash", + "type": "bytes32" + } + ], + "name": "InvalidateKeyset", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "OwnerFunctionCalled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "batchSequenceNumber", + "type": "uint256" }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } ], - name: 'SequencerBatchDelivered', - type: 'event', + "name": "SequencerBatchData", + "type": "event" }, { - anonymous: false, - inputs: [ - { indexed: true, internalType: 'bytes32', name: 'keysetHash', type: 'bytes32' }, - { indexed: false, internalType: 'bytes', name: 'keysetBytes', type: 'bytes' }, + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "batchSequenceNumber", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "beforeAcc", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "afterAcc", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "delayedAcc", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "afterDelayedMessagesRead", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint64", + "name": "minTimestamp", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "maxTimestamp", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minBlockNumber", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "maxBlockNumber", + "type": "uint64" + } + ], + "indexed": false, + "internalType": "struct IBridge.TimeBounds", + "name": "timeBounds", + "type": "tuple" + }, + { + "indexed": false, + "internalType": "enum IBridge.BatchDataLocation", + "name": "dataLocation", + "type": "uint8" + } ], - name: 'SetValidKeyset', - type: 'event', + "name": "SequencerBatchDelivered", + "type": "event" }, { - inputs: [], - name: 'DATA_AUTHENTICATED_FLAG', - outputs: [{ internalType: 'bytes1', name: '', type: 'bytes1' }], - stateMutability: 'view', - type: 'function', + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "keysetHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "keysetBytes", + "type": "bytes" + } + ], + "name": "SetValidKeyset", + "type": "event" }, { - inputs: [], - name: 'HEADER_LENGTH', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function', + "inputs": [], + "name": "BROTLI_MESSAGE_HEADER_FLAG", + "outputs": [ + { + "internalType": "bytes1", + "name": "", + "type": "bytes1" + } + ], + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { internalType: 'uint256', name: 'sequenceNumber', type: 'uint256' }, - { internalType: 'bytes', name: 'data', type: 'bytes' }, - { internalType: 'uint256', name: 'afterDelayedMessagesRead', type: 'uint256' }, - { internalType: 'contract IGasRefunder', name: 'gasRefunder', type: 'address' }, - { internalType: 'uint256', name: 'prevMessageCount', type: 'uint256' }, - { internalType: 'uint256', name: 'newMessageCount', type: 'uint256' }, + "inputs": [], + "name": "DAS_MESSAGE_HEADER_FLAG", + "outputs": [ + { + "internalType": "bytes1", + "name": "", + "type": "bytes1" + } ], - name: 'addSequencerL2Batch', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { internalType: 'uint256', name: 'sequenceNumber', type: 'uint256' }, - { internalType: 'bytes', name: 'data', type: 'bytes' }, - { internalType: 'uint256', name: 'afterDelayedMessagesRead', type: 'uint256' }, - { internalType: 'contract IGasRefunder', name: 'gasRefunder', type: 'address' }, + "inputs": [], + "name": "DATA_AUTHENTICATED_FLAG", + "outputs": [ + { + "internalType": "bytes1", + "name": "", + "type": "bytes1" + } ], - name: 'addSequencerL2BatchFromOrigin', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { internalType: 'uint256', name: 'sequenceNumber', type: 'uint256' }, - { internalType: 'bytes', name: 'data', type: 'bytes' }, - { internalType: 'uint256', name: 'afterDelayedMessagesRead', type: 'uint256' }, - { internalType: 'contract IGasRefunder', name: 'gasRefunder', type: 'address' }, - { internalType: 'uint256', name: 'prevMessageCount', type: 'uint256' }, - { internalType: 'uint256', name: 'newMessageCount', type: 'uint256' }, + "inputs": [], + "name": "DATA_BLOB_HEADER_FLAG", + "outputs": [ + { + "internalType": "bytes1", + "name": "", + "type": "bytes1" + } ], - name: 'addSequencerL2BatchFromOrigin', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: 'batchCount', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function', + "inputs": [], + "name": "EIGENDA_MESSAGE_HEADER_FLAG", + "outputs": [ + { + "internalType": "bytes1", + "name": "", + "type": "bytes1" + } + ], + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: 'bridge', - outputs: [{ internalType: 'contract IBridge', name: '', type: 'address' }], - stateMutability: 'view', - type: 'function', + "inputs": [], + "name": "HEADER_LENGTH", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" }, { - inputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], - name: 'dasKeySetInfo', - outputs: [ - { internalType: 'bool', name: 'isValidKeyset', type: 'bool' }, - { internalType: 'uint64', name: 'creationBlock', type: 'uint64' }, + "inputs": [], + "name": "TREE_DAS_MESSAGE_HEADER_FLAG", + "outputs": [ + { + "internalType": "bytes1", + "name": "", + "type": "bytes1" + } ], - stateMutability: 'view', - type: 'function', + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { internalType: 'uint256', name: '_totalDelayedMessagesRead', type: 'uint256' }, - { internalType: 'uint8', name: 'kind', type: 'uint8' }, - { internalType: 'uint64[2]', name: 'l1BlockAndTime', type: 'uint64[2]' }, - { internalType: 'uint256', name: 'baseFeeL1', type: 'uint256' }, - { internalType: 'address', name: 'sender', type: 'address' }, - { internalType: 'bytes32', name: 'messageDataHash', type: 'bytes32' }, + "inputs": [], + "name": "ZERO_HEAVY_MESSAGE_HEADER_FLAG", + "outputs": [ + { + "internalType": "bytes1", + "name": "", + "type": "bytes1" + } ], - name: 'forceInclusion', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', + "stateMutability": "view", + "type": "function" }, { - inputs: [{ internalType: 'bytes32', name: 'ksHash', type: 'bytes32' }], - name: 'getKeysetCreationBlock', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function', + "inputs": [ + { + "internalType": "uint256", + "name": "sequenceNumber", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "afterDelayedMessagesRead", + "type": "uint256" + }, + { + "internalType": "contract IGasRefunder", + "name": "gasRefunder", + "type": "address" + }, + { + "internalType": "uint256", + "name": "prevMessageCount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "newMessageCount", + "type": "uint256" + } + ], + "name": "addSequencerL2Batch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [{ internalType: 'uint256', name: 'index', type: 'uint256' }], - name: 'inboxAccs', - outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }], - stateMutability: 'view', - type: 'function', + "inputs": [ + { + "internalType": "uint256", + "name": "sequenceNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "afterDelayedMessagesRead", + "type": "uint256" + }, + { + "internalType": "contract IGasRefunder", + "name": "gasRefunder", + "type": "address" + }, + { + "internalType": "uint256", + "name": "prevMessageCount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "newMessageCount", + "type": "uint256" + } + ], + "name": "addSequencerL2BatchFromBlobs", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ - { internalType: 'contract IBridge', name: 'bridge_', type: 'address' }, + "inputs": [ { - components: [ - { internalType: 'uint256', name: 'delayBlocks', type: 'uint256' }, - { internalType: 'uint256', name: 'futureBlocks', type: 'uint256' }, - { internalType: 'uint256', name: 'delaySeconds', type: 'uint256' }, - { internalType: 'uint256', name: 'futureSeconds', type: 'uint256' }, + "internalType": "uint256", + "name": "sequenceNumber", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint32", + "name": "batchId", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blobIndex", + "type": "uint32" + }, + { + "components": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "blobHeadersRoot", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "quorumNumbers", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signedStakeForQuorums", + "type": "bytes" + }, + { + "internalType": "uint32", + "name": "referenceBlockNumber", + "type": "uint32" + } + ], + "internalType": "struct IEigenDAServiceManager.BatchHeader", + "name": "batchHeader", + "type": "tuple" + }, + { + "internalType": "bytes32", + "name": "signatoryRecordHash", + "type": "bytes32" + }, + { + "internalType": "uint32", + "name": "confirmationBlockNumber", + "type": "uint32" + } + ], + "internalType": "struct IEigenDAServiceManager.BatchMetadata", + "name": "batchMetadata", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "inclusionProof", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "quorumIndices", + "type": "bytes" + } + ], + "internalType": "struct EigenDARollupUtils.BlobVerificationProof", + "name": "blobVerificationProof", + "type": "tuple" + }, + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "X", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "Y", + "type": "uint256" + } + ], + "internalType": "struct BN254.G1Point", + "name": "commitment", + "type": "tuple" + }, + { + "internalType": "uint32", + "name": "dataLength", + "type": "uint32" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "quorumNumber", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "adversaryThresholdPercentage", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "confirmationThresholdPercentage", + "type": "uint8" + }, + { + "internalType": "uint32", + "name": "chunkLength", + "type": "uint32" + } + ], + "internalType": "struct IEigenDAServiceManager.QuorumBlobParam[]", + "name": "quorumBlobParams", + "type": "tuple[]" + } ], - internalType: 'struct ISequencerInbox.MaxTimeVariation', - name: 'maxTimeVariation_', - type: 'tuple', + "internalType": "struct IEigenDAServiceManager.BlobHeader", + "name": "blobHeader", + "type": "tuple" + }, + { + "internalType": "contract IGasRefunder", + "name": "gasRefunder", + "type": "address" + }, + { + "internalType": "uint256", + "name": "afterDelayedMessagesRead", + "type": "uint256" }, + { + "internalType": "uint256", + "name": "prevMessageCount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "newMessageCount", + "type": "uint256" + } ], - name: 'initialize', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', + "name": "addSequencerL2BatchFromEigenDA", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [{ internalType: 'bytes32', name: 'ksHash', type: 'bytes32' }], - name: 'invalidateKeysetHash', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "contract IGasRefunder", + "name": "", + "type": "address" + } + ], + "name": "addSequencerL2BatchFromOrigin", + "outputs": [], + "stateMutability": "pure", + "type": "function" }, { - inputs: [{ internalType: 'address', name: '', type: 'address' }], - name: 'isBatchPoster', - outputs: [{ internalType: 'bool', name: '', type: 'bool' }], - stateMutability: 'view', - type: 'function', + "inputs": [ + { + "internalType": "uint256", + "name": "sequenceNumber", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "afterDelayedMessagesRead", + "type": "uint256" + }, + { + "internalType": "contract IGasRefunder", + "name": "gasRefunder", + "type": "address" + }, + { + "internalType": "uint256", + "name": "prevMessageCount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "newMessageCount", + "type": "uint256" + } + ], + "name": "addSequencerL2BatchFromOrigin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [{ internalType: 'bytes32', name: 'ksHash', type: 'bytes32' }], - name: 'isValidKeysetHash', - outputs: [{ internalType: 'bool', name: '', type: 'bool' }], - stateMutability: 'view', - type: 'function', + "inputs": [], + "name": "batchCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: 'maxTimeVariation', - outputs: [ - { internalType: 'uint256', name: 'delayBlocks', type: 'uint256' }, - { internalType: 'uint256', name: 'futureBlocks', type: 'uint256' }, - { internalType: 'uint256', name: 'delaySeconds', type: 'uint256' }, - { internalType: 'uint256', name: 'futureSeconds', type: 'uint256' }, + "inputs": [], + "name": "batchPosterManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } ], - stateMutability: 'view', - type: 'function', + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: 'removeDelayAfterFork', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', + "inputs": [], + "name": "bridge", + "outputs": [ + { + "internalType": "contract IBridge", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: 'rollup', - outputs: [{ internalType: 'contract IOwnable', name: '', type: 'address' }], - stateMutability: 'view', - type: 'function', + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "dasKeySetInfo", + "outputs": [ + { + "internalType": "bool", + "name": "isValidKeyset", + "type": "bool" + }, + { + "internalType": "uint64", + "name": "creationBlock", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { internalType: 'address', name: 'addr', type: 'address' }, - { internalType: 'bool', name: 'isBatchPoster_', type: 'bool' }, + "inputs": [], + "name": "eigenDARollupManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } ], - name: 'setIsBatchPoster', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ + { + "internalType": "uint256", + "name": "_totalDelayedMessagesRead", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "kind", + "type": "uint8" + }, + { + "internalType": "uint64[2]", + "name": "l1BlockAndTime", + "type": "uint64[2]" + }, + { + "internalType": "uint256", + "name": "baseFeeL1", + "type": "uint256" + }, { - components: [ - { internalType: 'uint256', name: 'delayBlocks', type: 'uint256' }, - { internalType: 'uint256', name: 'futureBlocks', type: 'uint256' }, - { internalType: 'uint256', name: 'delaySeconds', type: 'uint256' }, - { internalType: 'uint256', name: 'futureSeconds', type: 'uint256' }, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "messageDataHash", + "type": "bytes32" + } + ], + "name": "forceInclusion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ksHash", + "type": "bytes32" + } + ], + "name": "getKeysetCreationBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "inboxAccs", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IBridge", + "name": "bridge_", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "delayBlocks", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "futureBlocks", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "delaySeconds", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "futureSeconds", + "type": "uint256" + } ], - internalType: 'struct ISequencerInbox.MaxTimeVariation', - name: 'maxTimeVariation_', - type: 'tuple', + "internalType": "struct ISequencerInbox.MaxTimeVariation", + "name": "maxTimeVariation_", + "type": "tuple" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ksHash", + "type": "bytes32" + } + ], + "name": "invalidateKeysetHash", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isBatchPoster", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isSequencer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isUsingFeeToken", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "ksHash", + "type": "bytes32" + } + ], + "name": "isValidKeysetHash", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxDataSize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxTimeVariation", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } ], - name: 'setMaxTimeVariation', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', + "stateMutability": "view", + "type": "function" }, { - inputs: [{ internalType: 'bytes', name: 'keysetBytes', type: 'bytes' }], - name: 'setValidKeyset', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', + "inputs": [], + "name": "postUpgradeInit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [], - name: 'totalDelayedMessagesRead', - outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], - stateMutability: 'view', - type: 'function', + "inputs": [], + "name": "reader4844", + "outputs": [ + { + "internalType": "contract IReader4844", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" }, + { + "inputs": [], + "name": "removeDelayAfterFork", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "rollup", + "outputs": [ + { + "internalType": "contract IOwnable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newBatchPosterManager", + "type": "address" + } + ], + "name": "setBatchPosterManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newRollupManager", + "type": "address" + } + ], + "name": "setEigenDARollupManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "bool", + "name": "isBatchPoster_", + "type": "bool" + } + ], + "name": "setIsBatchPoster", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "bool", + "name": "isSequencer_", + "type": "bool" + } + ], + "name": "setIsSequencer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "delayBlocks", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "futureBlocks", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "delaySeconds", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "futureSeconds", + "type": "uint256" + } + ], + "internalType": "struct ISequencerInbox.MaxTimeVariation", + "name": "maxTimeVariation_", + "type": "tuple" + } + ], + "name": "setMaxTimeVariation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "setRollupAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "keysetBytes", + "type": "bytes" + } + ], + "name": "setValidKeyset", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "totalDelayedMessagesRead", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "updateRollupAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } ] as const; diff --git a/src/package.json b/src/package.json index 169afdb..ea745ef 100644 --- a/src/package.json +++ b/src/package.json @@ -1,6 +1,6 @@ { - "name": "@arbitrum/orbit-sdk", - "description": "TypeScript SDK for building Arbitrum Orbit chains", + "name": "@eigenda/orbit-sdk", + "description": "TypeScript SDK for building EigenDA integrated Arbitrum Orbit chains", "version": "0.17.2", "main": "./dist/index.js", "files": [ @@ -41,8 +41,8 @@ ] } }, - "repository": "git+https://github.com/OffchainLabs/arbitrum-orbit-sdk.git", - "author": "Offchain Labs, Inc.", + "repository": "git+https://github.com/Layr-Labs/eigenda-orbit-sdk.git", + "author": "EigenDA", "license": "Apache-2.0", "peerDependencies": { "viem": "^1.20.0"