@unruggable/gateways
Version:
Trustless Ethereum Multichain CCIP-Read Gateway
56 lines • 2.37 kB
TypeScript
import type { ProviderPair, HexString32 } from '../types.js';
import type { RollupDeployment } from '../rollup.js';
import { AbstractArbitrumRollup, type ArbitrumConfig, type ArbitrumCommit } from './ArbitrumRollup.js';
import { CachedValue } from '../cached.js';
export declare const ASSERTION_STATUS_CONFIRMED = 2n;
export declare const MACHINE_STATUS_FINISHED = 1n;
export declare const ROLLUP_ABI: any;
type ABIAssertionNode = {
firstChildBlock: bigint;
secondChildBlock: bigint;
createdAtBlock: bigint;
isFirstChild: boolean;
status: bigint;
configHash: HexString32;
};
type ABIAssertionState = {
globalState: [
bytes32Vals: [blockHash: HexString32, sendRoot: HexString32],
u64Vals: [inboxPosition: bigint, positionInMessage: bigint]
];
machineStatus: bigint;
endHistoryRoot: HexString32;
};
type KnownAssertion = {
readonly assertionHash: HexString32;
readonly parentAssertionHash: HexString32;
readonly afterState: ABIAssertionState;
readonly afterInboxBatchAcc: HexString32;
readonly createdAtBlock: bigint;
confirmed: boolean;
children: number;
};
export type BoLDCommit = ArbitrumCommit & {
readonly assertions: HexString32[];
readonly confirmed: boolean;
};
export declare class BoLDRollup extends AbstractArbitrumRollup<BoLDCommit> {
static readonly arb1MainnetConfig: RollupDeployment<ArbitrumConfig>;
static readonly arb1SepoliaConfig: RollupDeployment<ArbitrumConfig>;
static readonly arbNovaMainnetConfig: RollupDeployment<ArbitrumConfig>;
constructor(providers: ProviderPair, config: ArbitrumConfig, minAgeBlocks?: number);
_fetchNode(assertionHash: HexString32): Promise<ABIAssertionNode>;
private _lastBlock;
readonly _assertionMap: Map<string, KnownAssertion>;
readonly unfinalizedGuard: CachedValue<void>;
private _syncAssertions;
private _latestAssertions;
_unfinalizedAssertionChain(assertionHash: HexString32): Promise<KnownAssertion[]>;
fetchLatestCommitIndex(): Promise<bigint>;
protected _fetchParentCommitIndex(commit: BoLDCommit): Promise<bigint>;
_findAssertionChainAtIndex(index: bigint): Promise<KnownAssertion[]>;
protected _fetchCommit(index: bigint): Promise<BoLDCommit>;
isCommitStillValid(commit: BoLDCommit): Promise<boolean>;
}
export {};
//# sourceMappingURL=BoLDRollup.d.ts.map