From d4f1cb546f4cd60cb79b71f2bd3203ad83fb9863 Mon Sep 17 00:00:00 2001 From: Agustin Ramiro Diaz Date: Thu, 5 Feb 2026 12:14:19 -0300 Subject: [PATCH 01/15] feat: add WebSocket subscription support for consensus events Add subscription methods to GenLayerClient for real-time consensus event streaming via WebSocket: - subscribeToNewTransaction - subscribeToTransactionAccepted - subscribeToTransactionActivated - subscribeToTransactionUndetermined - subscribeToTransactionLeaderTimeout Features: - Typed async iterable streams (ConsensusEventStream) - Shared WebSocket client per GenLayerClient (WeakMap cache) - Bounded event queue (max 1000) to prevent memory leaks - Error propagation via async iterator - webSocketEndpoint config option for createClient() Throws WebSocketNotConfiguredError if no WS URL is configured. Co-Authored-By: Claude Opus 4.5 --- src/client/client.ts | 19 ++- src/subscriptions/actions.ts | 218 +++++++++++++++++++++++++++++++++++ src/subscriptions/index.ts | 5 + src/types/clients.ts | 13 +++ src/types/index.ts | 1 + src/types/subscriptions.ts | 45 ++++++++ tests/subscriptions.test.ts | 195 +++++++++++++++++++++++++++++++ 7 files changed, 493 insertions(+), 3 deletions(-) create mode 100644 src/subscriptions/actions.ts create mode 100644 src/subscriptions/index.ts create mode 100644 src/types/subscriptions.ts create mode 100644 tests/subscriptions.test.ts diff --git a/src/client/client.ts b/src/client/client.ts index 6afb3df..9412121 100644 --- a/src/client/client.ts +++ b/src/client/client.ts @@ -15,6 +15,7 @@ import {contractActions} from "../contracts/actions"; import {receiptActions, transactionActions} from "../transactions/actions"; import {walletActions as genlayerWalletActions} from "../wallet/actions"; import {stakingActions} from "../staking/actions"; +import {subscriptionActions} from "../subscriptions/actions"; import {GenLayerClient, GenLayerChain} from "@/types"; import {chainActions} from "@/chains/actions"; import {localnet} from "@/chains"; @@ -24,11 +25,12 @@ interface ClientConfig { chain?: { id: number; name: string; - rpcUrls: {default: {http: readonly string[]}}; + rpcUrls: {default: {http: readonly string[]; webSocket?: readonly string[]}}; nativeCurrency: {name: string; symbol: string; decimals: number}; blockExplorers?: {default: {name: string; url: string}}; }; - endpoint?: string; // Custom RPC endpoint + endpoint?: string; // Custom HTTP RPC endpoint + webSocketEndpoint?: string; // Custom WebSocket RPC endpoint for event subscriptions account?: Account | Address; provider?: EthereumProvider; // Custom provider for wallet framework integration } @@ -86,6 +88,12 @@ export const createClient = (config: ClientConfig = {chain: localnet}): GenLayer if (config.endpoint) { chainConfig.rpcUrls.default.http = [config.endpoint]; } + if (config.webSocketEndpoint) { + chainConfig.rpcUrls.default = { + ...chainConfig.rpcUrls.default, + webSocket: [config.webSocketEndpoint], + }; + } const customTransport = custom(getCustomTransportConfig(config, chainConfig as GenLayerChain), {retryCount: 0, retryDelay: 0}); const publicClient = createPublicClient(chainConfig as GenLayerChain, customTransport).extend( @@ -120,11 +128,16 @@ export const createClient = (config: ClientConfig = {chain: localnet}): GenLayer ...receiptActions(clientWithAllActions as unknown as GenLayerClient, publicClient), } as unknown as GenLayerClient; - const finalClient = { + const clientWithStakingActions = { ...clientWithReceiptActions, ...stakingActions(clientWithReceiptActions as unknown as GenLayerClient, publicClient), } as unknown as GenLayerClient; + const finalClient = { + ...clientWithStakingActions, + ...subscriptionActions(clientWithStakingActions), + } as unknown as GenLayerClient; + return finalClient; }; diff --git a/src/subscriptions/actions.ts b/src/subscriptions/actions.ts new file mode 100644 index 0000000..5eab7b0 --- /dev/null +++ b/src/subscriptions/actions.ts @@ -0,0 +1,218 @@ +import { + createPublicClient, + webSocket, + Log, + decodeEventLog, + Abi, + Address as ViemAddress, + PublicClient, + WebSocketTransport, +} from "viem"; +import { + GenLayerClient, + GenLayerChain, + ConsensusEventStream, + ConsensusEventMap, + NewTransactionEvent, + TransactionAcceptedEvent, + TransactionActivatedEvent, + TransactionUndeterminedEvent, + TransactionLeaderTimeoutEvent, + TransactionHash, +} from "@/types"; + +const MAX_EVENT_QUEUE_SIZE = 1000; + +export class WebSocketNotConfiguredError extends Error { + constructor() { + super( + "WebSocket URL not configured for this chain. Add a webSocket URL to rpcUrls.default.webSocket in the chain configuration, or pass webSocketEndpoint when creating the client.", + ); + this.name = "WebSocketNotConfiguredError"; + } +} + +export class ConsensusContractNotInitializedError extends Error { + constructor() { + super( + "Consensus main contract not initialized. Ensure the client is properly initialized before subscribing to events.", + ); + this.name = "ConsensusContractNotInitializedError"; + } +} + +// WeakMap to store shared WebSocket clients per GenLayerClient +const wsClientCache = new WeakMap, PublicClient>(); + +function getOrCreateWsClient(client: GenLayerClient): PublicClient { + let wsClient = wsClientCache.get(client); + if (wsClient) { + return wsClient; + } + + const wsUrl = client.chain.rpcUrls.default.webSocket?.[0]; + if (!wsUrl) { + throw new WebSocketNotConfiguredError(); + } + + wsClient = createPublicClient({ + chain: client.chain, + transport: webSocket(wsUrl), + }) as PublicClient; + + wsClientCache.set(client, wsClient); + return wsClient; +} + +function createEventStream( + client: GenLayerClient, + eventName: keyof ConsensusEventMap, + mapEvent: (log: Log) => T, +): ConsensusEventStream { + if (!client.chain.consensusMainContract?.address || !client.chain.consensusMainContract?.abi) { + throw new ConsensusContractNotInitializedError(); + } + + const wsClient = getOrCreateWsClient(client); + + const eventQueue: T[] = []; + let resolveNext: ((value: IteratorResult) => void) | null = null; + let rejectNext: ((error: Error) => void) | null = null; + let isUnsubscribed = false; + let unwatch: (() => void) | null = null; + let lastError: Error | null = null; + + const processLog = (logs: Log[]) => { + for (const log of logs) { + try { + const event = mapEvent(log); + if (resolveNext) { + resolveNext({value: event, done: false}); + resolveNext = null; + rejectNext = null; + } else { + // Prevent unbounded queue growth + if (eventQueue.length >= MAX_EVENT_QUEUE_SIZE) { + eventQueue.shift(); // Drop oldest event + } + eventQueue.push(event); + } + } catch (err) { + console.debug(`[genlayer-js] Failed to decode ${eventName} event:`, err); + } + } + }; + + const handleError = (error: Error) => { + console.error(`[genlayer-js] WebSocket error for ${eventName}:`, error); + lastError = error; + if (rejectNext) { + rejectNext(error); + resolveNext = null; + rejectNext = null; + } + }; + + unwatch = wsClient.watchContractEvent({ + address: client.chain.consensusMainContract.address as ViemAddress, + abi: client.chain.consensusMainContract.abi as Abi, + eventName, + onLogs: processLog, + onError: handleError, + }); + + const stream: ConsensusEventStream = { + [Symbol.asyncIterator]() { + return { + next(): Promise> { + if (isUnsubscribed) { + return Promise.resolve({value: undefined as unknown as T, done: true}); + } + + if (lastError) { + const error = lastError; + lastError = null; + return Promise.reject(error); + } + + if (eventQueue.length > 0) { + return Promise.resolve({value: eventQueue.shift()!, done: false}); + } + + return new Promise>((resolve, reject) => { + resolveNext = resolve; + rejectNext = reject; + }); + }, + return(): Promise> { + stream.unsubscribe(); + return Promise.resolve({value: undefined as unknown as T, done: true}); + }, + }; + }, + unsubscribe() { + isUnsubscribed = true; + if (unwatch) { + unwatch(); + unwatch = null; + } + if (resolveNext) { + resolveNext({value: undefined as unknown as T, done: true}); + resolveNext = null; + rejectNext = null; + } + }, + }; + + return stream; +} + +export function subscriptionActions(client: GenLayerClient) { + const decodeLog = (log: Log, eventName: keyof ConsensusEventMap): T => { + const decoded = decodeEventLog({ + abi: client.chain.consensusMainContract!.abi as Abi, + data: log.data, + topics: log.topics, + eventName, + }); + return decoded.args as T; + }; + + return { + subscribeToNewTransaction: (): ConsensusEventStream => { + return createEventStream(client, "NewTransaction", log => + decodeLog(log, "NewTransaction"), + ); + }, + + subscribeToTransactionAccepted: (): ConsensusEventStream => { + return createEventStream(client, "TransactionAccepted", log => { + // ABI uses snake_case `tx_id` for this event + const decoded = decodeLog<{tx_id: `0x${string}`}>(log, "TransactionAccepted"); + return {txId: decoded.tx_id as TransactionHash}; + }); + }, + + subscribeToTransactionActivated: (): ConsensusEventStream => { + return createEventStream(client, "TransactionActivated", log => + decodeLog(log, "TransactionActivated"), + ); + }, + + subscribeToTransactionUndetermined: (): ConsensusEventStream => { + return createEventStream(client, "TransactionUndetermined", log => { + // ABI uses snake_case `tx_id` for this event + const decoded = decodeLog<{tx_id: `0x${string}`}>(log, "TransactionUndetermined"); + return {txId: decoded.tx_id as TransactionHash}; + }); + }, + + subscribeToTransactionLeaderTimeout: (): ConsensusEventStream => { + return createEventStream(client, "TransactionLeaderTimeout", log => { + // ABI uses snake_case `tx_id` for this event + const decoded = decodeLog<{tx_id: `0x${string}`}>(log, "TransactionLeaderTimeout"); + return {txId: decoded.tx_id as TransactionHash}; + }); + }, + }; +} diff --git a/src/subscriptions/index.ts b/src/subscriptions/index.ts new file mode 100644 index 0000000..be27963 --- /dev/null +++ b/src/subscriptions/index.ts @@ -0,0 +1,5 @@ +export { + subscriptionActions, + WebSocketNotConfiguredError, + ConsensusContractNotInitializedError, +} from "./actions"; diff --git a/src/types/clients.ts b/src/types/clients.ts index 75013a8..6206df0 100644 --- a/src/types/clients.ts +++ b/src/types/clients.ts @@ -8,6 +8,14 @@ import {Network} from "./network"; import {SnapSource} from "@/types/snapSource"; import {MetaMaskClientResult} from "@/types/metamaskClientResult"; import {StakingActions} from "./staking"; +import { + ConsensusEventStream, + NewTransactionEvent, + TransactionAcceptedEvent, + TransactionActivatedEvent, + TransactionUndeterminedEvent, + TransactionLeaderTimeoutEvent, +} from "./subscriptions"; export type GenLayerMethod = | {method: "sim_fundAccount"; params: [address: Address, amount: number]} @@ -106,4 +114,9 @@ export type GenLayerClient = Omit< account?: Account; txId: `0x${string}`; }) => Promise; + subscribeToNewTransaction: () => ConsensusEventStream; + subscribeToTransactionAccepted: () => ConsensusEventStream; + subscribeToTransactionActivated: () => ConsensusEventStream; + subscribeToTransactionUndetermined: () => ConsensusEventStream; + subscribeToTransactionLeaderTimeout: () => ConsensusEventStream; } & StakingActions; diff --git a/src/types/index.ts b/src/types/index.ts index 0f878a0..b6d1aa3 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -7,3 +7,4 @@ export * from "./transactions"; export * from "./network"; export * from "./snapSource"; export * from "./staking"; +export * from "./subscriptions"; diff --git a/src/types/subscriptions.ts b/src/types/subscriptions.ts new file mode 100644 index 0000000..ed5ccac --- /dev/null +++ b/src/types/subscriptions.ts @@ -0,0 +1,45 @@ +import {Address} from "./accounts"; +import {TransactionHash} from "./transactions"; + +export type NewTransactionEvent = { + txId: TransactionHash; + recipient: Address; + activator: Address; +}; + +export type TransactionAcceptedEvent = { + txId: TransactionHash; +}; + +export type TransactionActivatedEvent = { + txId: TransactionHash; + leader: Address; +}; + +export type TransactionUndeterminedEvent = { + txId: TransactionHash; +}; + +export type TransactionLeaderTimeoutEvent = { + txId: TransactionHash; +}; + +export type ConsensusEventName = + | "NewTransaction" + | "TransactionAccepted" + | "TransactionActivated" + | "TransactionUndetermined" + | "TransactionLeaderTimeout"; + +export type ConsensusEventMap = { + NewTransaction: NewTransactionEvent; + TransactionAccepted: TransactionAcceptedEvent; + TransactionActivated: TransactionActivatedEvent; + TransactionUndetermined: TransactionUndeterminedEvent; + TransactionLeaderTimeout: TransactionLeaderTimeoutEvent; +}; + +export type ConsensusEventStream = { + [Symbol.asyncIterator](): AsyncIterator; + unsubscribe: () => void; +}; diff --git a/tests/subscriptions.test.ts b/tests/subscriptions.test.ts new file mode 100644 index 0000000..e5082a4 --- /dev/null +++ b/tests/subscriptions.test.ts @@ -0,0 +1,195 @@ +// tests/subscriptions.test.ts +import {describe, it, expect, vi, afterEach} from "vitest"; +import { + WebSocketNotConfiguredError, + ConsensusContractNotInitializedError, + subscriptionActions, +} from "../src/subscriptions/actions"; +import {GenLayerClient, GenLayerChain} from "../src/types"; + +// Mock viem module for WebSocket-related tests +vi.mock("viem", async importOriginal => { + const actual = (await importOriginal()) as object; + return { + ...actual, + webSocket: vi.fn(() => ({ + request: vi.fn(), + type: "webSocket" as const, + })), + }; +}); + +// Helper to create a minimal mock client +function createMockClient(options: { + webSocketUrl?: string; + consensusContract?: {address: string; abi: unknown[]} | null; +}): GenLayerClient { + const defaultContract = { + address: "0x0000000000000000000000000000000000000001", + abi: [ + { + name: "NewTransaction", + type: "event", + inputs: [ + {indexed: true, name: "txId", type: "bytes32"}, + {indexed: true, name: "recipient", type: "address"}, + {indexed: true, name: "activator", type: "address"}, + ], + }, + { + name: "TransactionAccepted", + type: "event", + inputs: [{indexed: true, name: "tx_id", type: "bytes32"}], + }, + { + name: "TransactionActivated", + type: "event", + inputs: [ + {indexed: true, name: "txId", type: "bytes32"}, + {indexed: true, name: "leader", type: "address"}, + ], + }, + { + name: "TransactionUndetermined", + type: "event", + inputs: [{indexed: true, name: "tx_id", type: "bytes32"}], + }, + { + name: "TransactionLeaderTimeout", + type: "event", + inputs: [{indexed: true, name: "tx_id", type: "bytes32"}], + }, + ], + bytecode: "", + }; + + // Use explicit check to allow null to be passed through + const consensusContract = + "consensusContract" in options ? options.consensusContract : defaultContract; + + return { + chain: { + id: 1, + name: "Test Chain", + rpcUrls: { + default: { + http: ["http://localhost:8545"], + webSocket: options.webSocketUrl ? [options.webSocketUrl] : undefined, + }, + }, + nativeCurrency: {name: "ETH", symbol: "ETH", decimals: 18}, + consensusMainContract: consensusContract, + consensusDataContract: null, + stakingContract: null, + isStudio: false, + defaultNumberOfInitialValidators: 3, + defaultConsensusMaxRotations: 5, + }, + } as unknown as GenLayerClient; +} + +describe("Subscription Actions", () => { + afterEach(() => { + vi.restoreAllMocks(); + }); + + describe("WebSocket Configuration", () => { + it("should throw WebSocketNotConfiguredError when no webSocket URL is configured", () => { + const client = createMockClient({webSocketUrl: undefined}); + const actions = subscriptionActions(client); + + expect(() => actions.subscribeToNewTransaction()).toThrow(WebSocketNotConfiguredError); + expect(() => actions.subscribeToNewTransaction()).toThrow( + /WebSocket URL not configured/, + ); + }); + + it("should throw WebSocketNotConfiguredError for all subscription methods", () => { + const client = createMockClient({webSocketUrl: undefined}); + const actions = subscriptionActions(client); + + expect(() => actions.subscribeToNewTransaction()).toThrow(WebSocketNotConfiguredError); + expect(() => actions.subscribeToTransactionAccepted()).toThrow(WebSocketNotConfiguredError); + expect(() => actions.subscribeToTransactionActivated()).toThrow(WebSocketNotConfiguredError); + expect(() => actions.subscribeToTransactionUndetermined()).toThrow(WebSocketNotConfiguredError); + expect(() => actions.subscribeToTransactionLeaderTimeout()).toThrow(WebSocketNotConfiguredError); + }); + + it("should not throw WebSocketNotConfiguredError when webSocket URL is provided", () => { + const client = createMockClient({webSocketUrl: "wss://example.com/ws"}); + const actions = subscriptionActions(client); + + // Should not throw WebSocketNotConfiguredError + // (may throw other errors due to mocking, but not this specific one) + try { + actions.subscribeToNewTransaction(); + } catch (error) { + expect(error).not.toBeInstanceOf(WebSocketNotConfiguredError); + } + }); + }); + + describe("Consensus Contract Initialization", () => { + it("should throw ConsensusContractNotInitializedError when contract is null", () => { + // WebSocket URL is not needed for this test since consensus check comes first + const client = createMockClient({ + webSocketUrl: undefined, + consensusContract: null, + }); + const actions = subscriptionActions(client); + + // Consensus contract check happens first in the code + expect(() => actions.subscribeToNewTransaction()).toThrow( + ConsensusContractNotInitializedError, + ); + }); + + it("should throw ConsensusContractNotInitializedError when contract has no address", () => { + const client = createMockClient({ + webSocketUrl: undefined, + consensusContract: {address: "", abi: []}, + }); + + // Manually set to simulate missing address + (client.chain.consensusMainContract as any).address = undefined; + + const actions = subscriptionActions(client); + + expect(() => actions.subscribeToNewTransaction()).toThrow( + ConsensusContractNotInitializedError, + ); + }); + }); +}); + +describe("Error Classes", () => { + it("WebSocketNotConfiguredError should have correct name and message", () => { + const error = new WebSocketNotConfiguredError(); + expect(error.name).toBe("WebSocketNotConfiguredError"); + expect(error.message).toContain("WebSocket URL not configured"); + expect(error).toBeInstanceOf(Error); + }); + + it("ConsensusContractNotInitializedError should have correct name and message", () => { + const error = new ConsensusContractNotInitializedError(); + expect(error.name).toBe("ConsensusContractNotInitializedError"); + expect(error.message).toContain("Consensus main contract not initialized"); + expect(error).toBeInstanceOf(Error); + }); +}); + +describe("ConsensusEventStream interface", () => { + it("should have asyncIterator and unsubscribe methods defined in type", () => { + // This is a compile-time type check + // The actual runtime behavior depends on WebSocket connection + const client = createMockClient({webSocketUrl: "wss://example.com/ws"}); + const actions = subscriptionActions(client); + + // Verify the methods exist on the actions object + expect(typeof actions.subscribeToNewTransaction).toBe("function"); + expect(typeof actions.subscribeToTransactionAccepted).toBe("function"); + expect(typeof actions.subscribeToTransactionActivated).toBe("function"); + expect(typeof actions.subscribeToTransactionUndetermined).toBe("function"); + expect(typeof actions.subscribeToTransactionLeaderTimeout).toBe("function"); + }); +}); From 8003e276db2308e5b468ebc45a4fb5b2de559267 Mon Sep 17 00:00:00 2001 From: Agustin Ramiro Diaz Date: Thu, 5 Feb 2026 14:49:49 -0300 Subject: [PATCH 02/15] feat: add genCall method for low-level transaction simulation Add genCall method to genlayer-js client for direct gen_call RPC access: - Supports read, write, and deploy transaction types - Leader/validator mode via leader_results parameter - Returns full response: data, status, stdout, stderr, logs, events, messages - Add GenCallResult, GenCallStatus, GenCallEvent, GenCallMessage types Co-Authored-By: Claude Opus 4.5 --- src/contracts/actions.ts | 113 +++++++++++++++++++++++++++++++++++++++ src/types/clients.ts | 63 ++++++++++++++++++++++ 2 files changed, 176 insertions(+) diff --git a/src/contracts/actions.ts b/src/contracts/actions.ts index c504d79..f4feb5e 100644 --- a/src/contracts/actions.ts +++ b/src/contracts/actions.ts @@ -9,6 +9,7 @@ import { CalldataEncodable, Address, TransactionHashVariant, + GenCallResult, } from "@/types"; import {fromHex, toHex, zeroAddress, encodeFunctionData, PublicClient, parseEventLogs} from "viem"; import {toJsonSafeDeep, b64ToArray} from "@/utils/jsonifier"; @@ -234,6 +235,118 @@ export const contractActions = (client: GenLayerClient, publicCli senderAccount, }); }, + + /** + * Low-level gen_call RPC method for transaction simulation. + * + * Use this for direct control over simulation parameters, including: + * - Transaction type (read, write, deploy) + * - Leader/validator mode via leader_results parameter + * - Raw transaction data (already RLP-encoded) + * + * For higher-level contract interactions, use readContract, writeContract, + * or simulateWriteContract instead. + * + * @param args.type - Transaction type: "read", "write", or "deploy" + * @param args.to - Target contract address + * @param args.from - Sender address (optional, uses client account if not provided) + * @param args.data - RLP-encoded transaction data + * @param args.leaderResults - Equivalence outputs from leader for validator simulation. + * If provided, simulates as validator; if null/undefined, simulates as leader. + * @param args.value - Value to send with the transaction (optional) + * @param args.gas - Gas limit for the transaction (optional) + * @param args.blockNumber - Block number to simulate at (optional, defaults to latest) + * @param args.status - State status: "accepted" or "finalized" (optional, defaults to "accepted") + * @returns GenCallResult with execution data, status, stdout, stderr, logs, events, and messages + */ + genCall: async (args: { + type: "read" | "write" | "deploy"; + to: Address; + from?: Address; + data: `0x${string}`; + leaderResults?: Record | null; + value?: bigint; + gas?: bigint; + blockNumber?: string; + status?: "accepted" | "finalized"; + }): Promise => { + const { + type, + to, + from, + data, + leaderResults, + value, + gas, + blockNumber, + status, + } = args; + + const senderAddress = from ?? client.account?.address ?? zeroAddress; + + const requestParams: Record = { + type, + to, + from: senderAddress, + data, + }; + + // Optional parameters + if (blockNumber !== undefined) { + requestParams.blockNumber = blockNumber; + } + if (status !== undefined) { + requestParams.status = status; + } + if (value !== undefined) { + requestParams.value = `0x${value.toString(16)}`; + } + if (gas !== undefined) { + requestParams.gas = `0x${gas.toString(16)}`; + } + + // If leaderResults provided, pass as leader_results for validator simulation (snake_case) + if (leaderResults !== undefined && leaderResults !== null) { + requestParams.leader_results = leaderResults; + } + + const response = await client.request({ + method: "gen_call", + params: [requestParams], + }); + + // Response format: { data, status: { code, message }, stdout, stderr, logs, events, messages } + const resp = response as { + data?: string; + status?: {code: number; message: string}; + stdout?: string; + stderr?: string; + logs?: unknown[]; + events?: Array<{topics: string[]; data: string}>; + messages?: Array<{ + messageType: number; + recipient: string; + value: string; + data: string; + onAcceptance: boolean; + saltNonce: string; + }>; + }; + + // Add 0x prefix to data if not present + const dataStr = resp.data ?? ""; + const prefixedData = dataStr.startsWith("0x") ? dataStr as `0x${string}` : `0x${dataStr}` as `0x${string}`; + + return { + data: prefixedData, + status: resp.status ?? {code: 0, message: "success"}, + stdout: resp.stdout ?? "", + stderr: resp.stderr ?? "", + logs: resp.logs ?? [], + events: resp.events ?? [], + messages: resp.messages ?? [], + }; + }, }; }; diff --git a/src/types/clients.ts b/src/types/clients.ts index 6206df0..c55c185 100644 --- a/src/types/clients.ts +++ b/src/types/clients.ts @@ -17,6 +17,58 @@ import { TransactionLeaderTimeoutEvent, } from "./subscriptions"; +/** + * Status from genCall execution + */ +export interface GenCallStatus { + /** Status code (0 = success, 1 = user error, 2 = vm error, 3 = internal error) */ + code: number; + /** Human-readable status message */ + message: string; +} + +/** + * Event emitted during contract execution + */ +export interface GenCallEvent { + /** Event topics as hex strings */ + topics: string[]; + /** Event data as hex string */ + data: string; +} + +/** + * Message submitted during contract execution + */ +export interface GenCallMessage { + messageType: number; + recipient: string; + value: string; + data: string; + onAcceptance: boolean; + saltNonce: string; +} + +/** + * Result from genCall method + */ +export interface GenCallResult { + /** Execution result as hex string (without 0x prefix from RPC, prefixed by client) */ + data: `0x${string}`; + /** Execution status */ + status: GenCallStatus; + /** Standard output from contract execution */ + stdout: string; + /** Standard error from contract execution */ + stderr: string; + /** Logs from GenVM execution */ + logs: unknown[]; + /** Events emitted during execution */ + events: GenCallEvent[]; + /** Messages submitted during execution */ + messages: GenCallMessage[]; +} + export type GenLayerMethod = | {method: "sim_fundAccount"; params: [address: Address, amount: number]} | {method: "eth_getTransactionByHash"; params: [hash: TransactionHash]} @@ -114,6 +166,17 @@ export type GenLayerClient = Omit< account?: Account; txId: `0x${string}`; }) => Promise; + genCall: (args: { + type: "read" | "write" | "deploy"; + to: Address; + from?: Address; + data: `0x${string}`; + leaderResults?: Record | null; + value?: bigint; + gas?: bigint; + blockNumber?: string; + status?: "accepted" | "finalized"; + }) => Promise; subscribeToNewTransaction: () => ConsensusEventStream; subscribeToTransactionAccepted: () => ConsensusEventStream; subscribeToTransactionActivated: () => ConsensusEventStream; From 2eca6f2a4690ccb758e58b91fb2a416b40606d9f Mon Sep 17 00:00:00 2001 From: Agustin Ramiro Diaz Date: Thu, 5 Feb 2026 15:07:07 -0300 Subject: [PATCH 03/15] feat(genCall): add GenCallStatusCode enum and comprehensive tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add GenCallStatusCode enum with SUCCESS, USER_ERROR, VM_ERROR, INTERNAL_ERROR values for type-safe status code handling - Update GenCallStatus.code to use enum type instead of number - Add 12 unit tests covering: - Basic request/response handling - Account resolution (client, explicit, zero address) - Optional parameters (value, gas, blockNumber, status) - leaderResults → leader_results conversion - Response data normalization (0x prefix handling) - Default values for missing response fields - Error status codes - Deploy transaction type Co-Authored-By: Claude Opus 4.5 --- src/contracts/actions.ts | 3 +- src/types/clients.ts | 14 +- tests/genCall.test.ts | 271 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 285 insertions(+), 3 deletions(-) create mode 100644 tests/genCall.test.ts diff --git a/src/contracts/actions.ts b/src/contracts/actions.ts index f4feb5e..1d33960 100644 --- a/src/contracts/actions.ts +++ b/src/contracts/actions.ts @@ -10,6 +10,7 @@ import { Address, TransactionHashVariant, GenCallResult, + GenCallStatusCode, } from "@/types"; import {fromHex, toHex, zeroAddress, encodeFunctionData, PublicClient, parseEventLogs} from "viem"; import {toJsonSafeDeep, b64ToArray} from "@/utils/jsonifier"; @@ -339,7 +340,7 @@ export const contractActions = (client: GenLayerClient, publicCli return { data: prefixedData, - status: resp.status ?? {code: 0, message: "success"}, + status: resp.status ?? {code: GenCallStatusCode.SUCCESS, message: "success"}, stdout: resp.stdout ?? "", stderr: resp.stderr ?? "", logs: resp.logs ?? [], diff --git a/src/types/clients.ts b/src/types/clients.ts index c55c185..1b0ae0d 100644 --- a/src/types/clients.ts +++ b/src/types/clients.ts @@ -17,12 +17,22 @@ import { TransactionLeaderTimeoutEvent, } from "./subscriptions"; +/** + * Status codes from genCall execution + */ +export enum GenCallStatusCode { + SUCCESS = 0, + USER_ERROR = 1, + VM_ERROR = 2, + INTERNAL_ERROR = 3, +} + /** * Status from genCall execution */ export interface GenCallStatus { - /** Status code (0 = success, 1 = user error, 2 = vm error, 3 = internal error) */ - code: number; + /** Status code indicating execution result */ + code: GenCallStatusCode; /** Human-readable status message */ message: string; } diff --git a/tests/genCall.test.ts b/tests/genCall.test.ts new file mode 100644 index 0000000..e40fa8c --- /dev/null +++ b/tests/genCall.test.ts @@ -0,0 +1,271 @@ +// tests/genCall.test.ts +import {describe, it, expect, vi, beforeEach, afterEach} from "vitest"; +import {createClient} from "../src/client/client"; +import {localnet} from "@/chains/localnet"; +import {Address} from "../src/types/accounts"; +import {createAccount, generatePrivateKey} from "../src/accounts/account"; +import {GenCallStatusCode} from "../src/types/clients"; +import {zeroAddress} from "viem"; + +// Setup fetch mock +const mockFetch = vi.fn(); +vi.stubGlobal("fetch", mockFetch); + +// Store for gen_call parameters received by mockFetch +let lastGenCallParams: any = null; +let mockGenCallResponse: any = null; + +describe("genCall", () => { + beforeEach(() => { + mockFetch.mockReset(); + lastGenCallParams = null; + mockGenCallResponse = { + data: "abcd1234", + status: {code: GenCallStatusCode.SUCCESS, message: "success"}, + stdout: "test stdout", + stderr: "", + logs: [], + events: [{topics: ["0x123"], data: "0x456"}], + messages: [], + }; + + mockFetch.mockImplementation(async (_url, options) => { + const bodyString = typeof options?.body === "string" ? options.body : null; + if (!bodyString) { + return {ok: false, status: 400, json: async () => ({error: "No body"})}; + } + + const body = JSON.parse(bodyString); + const method = body.method; + + if (method === "sim_getConsensusContract") { + return { + ok: true, + json: async () => ({ + result: { + address: "0x0000000000000000000000000000000000000001", + abi: [], + }, + }), + }; + } else if (method === "gen_call") { + lastGenCallParams = body.params; + return { + ok: true, + json: async () => ({result: mockGenCallResponse}), + }; + } + + return {ok: false, status: 404, json: async () => ({error: "Unknown method"})}; + }); + }); + + afterEach(() => { + vi.restoreAllMocks(); + }); + + it("should send basic genCall request with required parameters", async () => { + const client = createClient({chain: localnet}); + const contractAddress = "0x1234567890123456789012345678901234567890" as Address; + + const result = await client.genCall({ + type: "read", + to: contractAddress, + data: "0xabcdef", + }); + + expect(lastGenCallParams).toEqual([ + { + type: "read", + to: contractAddress, + from: zeroAddress, + data: "0xabcdef", + }, + ]); + + expect(result.data).toBe("0xabcd1234"); + expect(result.status.code).toBe(GenCallStatusCode.SUCCESS); + expect(result.stdout).toBe("test stdout"); + expect(result.events).toHaveLength(1); + }); + + it("should use client account as sender when available", async () => { + const account = createAccount(generatePrivateKey()); + const client = createClient({chain: localnet, account}); + const contractAddress = "0x1234567890123456789012345678901234567890" as Address; + + await client.genCall({ + type: "write", + to: contractAddress, + data: "0x1234", + }); + + expect(lastGenCallParams[0].from).toBe(account.address); + }); + + it("should use explicit from address over client account", async () => { + const account = createAccount(generatePrivateKey()); + const client = createClient({chain: localnet, account}); + const contractAddress = "0x1234567890123456789012345678901234567890" as Address; + const explicitFrom = "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" as Address; + + await client.genCall({ + type: "read", + to: contractAddress, + from: explicitFrom, + data: "0x1234", + }); + + expect(lastGenCallParams[0].from).toBe(explicitFrom); + }); + + it("should include optional parameters when provided", async () => { + const client = createClient({chain: localnet}); + const contractAddress = "0x1234567890123456789012345678901234567890" as Address; + + await client.genCall({ + type: "write", + to: contractAddress, + data: "0x1234", + value: 1000n, + gas: 50000n, + blockNumber: "0x100", + status: "finalized", + }); + + expect(lastGenCallParams[0]).toEqual({ + type: "write", + to: contractAddress, + from: zeroAddress, + data: "0x1234", + value: "0x3e8", // 1000 in hex + gas: "0xc350", // 50000 in hex + blockNumber: "0x100", + status: "finalized", + }); + }); + + it("should pass leaderResults as leader_results for validator simulation", async () => { + const client = createClient({chain: localnet}); + const contractAddress = "0x1234567890123456789012345678901234567890" as Address; + + const leaderResults = { + "web_request_1": {data: "response_data", kind: 1}, + "web_request_2": {data: "other_data", kind: 2}, + }; + + await client.genCall({ + type: "write", + to: contractAddress, + data: "0x1234", + leaderResults, + }); + + expect(lastGenCallParams[0].leader_results).toEqual(leaderResults); + }); + + it("should not include leader_results when leaderResults is null", async () => { + const client = createClient({chain: localnet}); + const contractAddress = "0x1234567890123456789012345678901234567890" as Address; + + await client.genCall({ + type: "read", + to: contractAddress, + data: "0x1234", + leaderResults: null, + }); + + expect(lastGenCallParams[0]).not.toHaveProperty("leader_results"); + }); + + it("should handle response with 0x prefix in data", async () => { + mockGenCallResponse = { + data: "0xdeadbeef", + status: {code: GenCallStatusCode.SUCCESS, message: "ok"}, + }; + + const client = createClient({chain: localnet}); + const result = await client.genCall({ + type: "read", + to: "0x1234567890123456789012345678901234567890" as Address, + data: "0x00", + }); + + expect(result.data).toBe("0xdeadbeef"); + }); + + it("should add 0x prefix to data when missing", async () => { + mockGenCallResponse = { + data: "deadbeef", + status: {code: GenCallStatusCode.SUCCESS, message: "ok"}, + }; + + const client = createClient({chain: localnet}); + const result = await client.genCall({ + type: "read", + to: "0x1234567890123456789012345678901234567890" as Address, + data: "0x00", + }); + + expect(result.data).toBe("0xdeadbeef"); + }); + + it("should provide default values for missing response fields", async () => { + mockGenCallResponse = {}; // Empty response + + const client = createClient({chain: localnet}); + const result = await client.genCall({ + type: "read", + to: "0x1234567890123456789012345678901234567890" as Address, + data: "0x00", + }); + + expect(result.data).toBe("0x"); + expect(result.status).toEqual({code: GenCallStatusCode.SUCCESS, message: "success"}); + expect(result.stdout).toBe(""); + expect(result.stderr).toBe(""); + expect(result.logs).toEqual([]); + expect(result.events).toEqual([]); + expect(result.messages).toEqual([]); + }); + + it("should handle error status codes", async () => { + mockGenCallResponse = { + data: "", + status: {code: GenCallStatusCode.USER_ERROR, message: "Contract reverted"}, + stderr: "Error: revert", + }; + + const client = createClient({chain: localnet}); + const result = await client.genCall({ + type: "write", + to: "0x1234567890123456789012345678901234567890" as Address, + data: "0x00", + }); + + expect(result.status.code).toBe(GenCallStatusCode.USER_ERROR); + expect(result.status.message).toBe("Contract reverted"); + expect(result.stderr).toBe("Error: revert"); + }); + + it("should handle deploy type", async () => { + const client = createClient({chain: localnet}); + + await client.genCall({ + type: "deploy", + to: zeroAddress as Address, + data: "0x608060405234801561001057600080fd5b50", + }); + + expect(lastGenCallParams[0].type).toBe("deploy"); + }); +}); + +describe("GenCallStatusCode enum", () => { + it("should have correct values", () => { + expect(GenCallStatusCode.SUCCESS).toBe(0); + expect(GenCallStatusCode.USER_ERROR).toBe(1); + expect(GenCallStatusCode.VM_ERROR).toBe(2); + expect(GenCallStatusCode.INTERNAL_ERROR).toBe(3); + }); +}); From b5dbea5071fe21a570a23449923b4ccf9b1ead04 Mon Sep 17 00:00:00 2001 From: Agustin Ramiro Diaz Date: Fri, 6 Feb 2026 12:28:21 -0300 Subject: [PATCH 04/15] feat: update contract ABIs and add AppealStarted subscription - Update consensus contract ABIs for localnet and testnetAsimov - Add validUntil parameter to addTransaction - Rename txData to txCalldata, txReceipt to eqBlocksOutputs - Add txExecutionHash, saltNonce, validatorResultHash fields - Add consumedValidators array - Add subscribeToAppealStarted event subscription for appeal monitoring - Update transaction decoders to handle new field names with backward compatibility - Add AppealStartedEvent type with txId, appealer, appealBond, appealValidators Co-Authored-By: Claude Opus 4.5 --- src/chains/localnet.ts | 43 ++++++++++++++++++++++++++++-------- src/chains/testnetAsimov.ts | 43 ++++++++++++++++++++++++++++-------- src/contracts/actions.ts | 4 +++- src/subscriptions/actions.ts | 19 ++++++++++++++++ src/transactions/actions.ts | 2 +- src/transactions/decoders.ts | 8 ++++--- src/types/clients.ts | 2 ++ src/types/subscriptions.ts | 11 ++++++++- src/types/transactions.ts | 11 +++++---- 9 files changed, 115 insertions(+), 28 deletions(-) diff --git a/src/chains/localnet.ts b/src/chains/localnet.ts index cec581a..cf994fa 100644 --- a/src/chains/localnet.ts +++ b/src/chains/localnet.ts @@ -827,13 +827,18 @@ const CONSENSUS_MAIN_CONTRACT = { }, { internalType: "bytes", - name: "_txData", + name: "_calldata", type: "bytes", }, + { + internalType: "uint256", + name: "_validUntil", + type: "uint256", + }, ], name: "addTransaction", outputs: [], - stateMutability: "nonpayable", + stateMutability: "payable", type: "function", }, { @@ -3405,7 +3410,7 @@ const CONSENSUS_DATA_CONTRACT = { inputs: [ { internalType: "bytes32", - name: "_tx_id", + name: "_txId", type: "bytes32", }, { @@ -3435,7 +3440,7 @@ const CONSENSUS_DATA_CONTRACT = { }, { internalType: "uint256", - name: "numOfInitialValidators", + name: "initialRotations", type: "uint256", }, { @@ -3463,14 +3468,19 @@ const CONSENSUS_DATA_CONTRACT = { name: "result", type: "uint8", }, + { + internalType: "bytes32", + name: "txExecutionHash", + type: "bytes32", + }, { internalType: "bytes", - name: "txData", + name: "txCalldata", type: "bytes", }, { internalType: "bytes", - name: "txReceipt", + name: "eqBlocksOutputs", type: "bytes", }, { @@ -3500,6 +3510,11 @@ const CONSENSUS_DATA_CONTRACT = { name: "onAcceptance", type: "bool", }, + { + internalType: "uint256", + name: "saltNonce", + type: "uint256", + }, ], internalType: "struct IMessages.SubmittedMessage[]", name: "messages", @@ -3604,21 +3619,31 @@ const CONSENSUS_DATA_CONTRACT = { name: "roundValidators", type: "address[]", }, + { + internalType: "enum ITransactions.VoteType[]", + name: "validatorVotes", + type: "uint8[]", + }, { internalType: "bytes32[]", name: "validatorVotesHash", type: "bytes32[]", }, { - internalType: "enum ITransactions.VoteType[]", - name: "validatorVotes", - type: "uint8[]", + internalType: "bytes32[]", + name: "validatorResultHash", + type: "bytes32[]", }, ], internalType: "struct ITransactions.RoundData", name: "lastRound", type: "tuple", }, + { + internalType: "address[]", + name: "consumedValidators", + type: "address[]", + }, ], internalType: "struct ConsensusData.TransactionData", name: "", diff --git a/src/chains/testnetAsimov.ts b/src/chains/testnetAsimov.ts index 2b1f683..59baec3 100644 --- a/src/chains/testnetAsimov.ts +++ b/src/chains/testnetAsimov.ts @@ -803,13 +803,18 @@ const CONSENSUS_MAIN_CONTRACT = { }, { internalType: "bytes", - name: "_txData", + name: "_calldata", type: "bytes", }, + { + internalType: "uint256", + name: "_validUntil", + type: "uint256", + }, ], name: "addTransaction", outputs: [], - stateMutability: "nonpayable", + stateMutability: "payable", type: "function", }, { @@ -3401,7 +3406,7 @@ const CONSENSUS_DATA_CONTRACT = { inputs: [ { internalType: "bytes32", - name: "_tx_id", + name: "_txId", type: "bytes32", }, { @@ -3431,7 +3436,7 @@ const CONSENSUS_DATA_CONTRACT = { }, { internalType: "uint256", - name: "numOfInitialValidators", + name: "initialRotations", type: "uint256", }, { @@ -3459,14 +3464,19 @@ const CONSENSUS_DATA_CONTRACT = { name: "result", type: "uint8", }, + { + internalType: "bytes32", + name: "txExecutionHash", + type: "bytes32", + }, { internalType: "bytes", - name: "txData", + name: "txCalldata", type: "bytes", }, { internalType: "bytes", - name: "txReceipt", + name: "eqBlocksOutputs", type: "bytes", }, { @@ -3496,6 +3506,11 @@ const CONSENSUS_DATA_CONTRACT = { name: "onAcceptance", type: "bool", }, + { + internalType: "uint256", + name: "saltNonce", + type: "uint256", + }, ], internalType: "struct IMessages.SubmittedMessage[]", name: "messages", @@ -3600,21 +3615,31 @@ const CONSENSUS_DATA_CONTRACT = { name: "roundValidators", type: "address[]", }, + { + internalType: "enum ITransactions.VoteType[]", + name: "validatorVotes", + type: "uint8[]", + }, { internalType: "bytes32[]", name: "validatorVotesHash", type: "bytes32[]", }, { - internalType: "enum ITransactions.VoteType[]", - name: "validatorVotes", - type: "uint8[]", + internalType: "bytes32[]", + name: "validatorResultHash", + type: "bytes32[]", }, ], internalType: "struct ITransactions.RoundData", name: "lastRound", type: "tuple", }, + { + internalType: "address[]", + name: "consumedValidators", + type: "address[]", + }, ], internalType: "struct ConsensusData.TransactionData", name: "", diff --git a/src/contracts/actions.ts b/src/contracts/actions.ts index 1d33960..32da87e 100644 --- a/src/contracts/actions.ts +++ b/src/contracts/actions.ts @@ -416,12 +416,14 @@ const _encodeAddTransactionData = ({ recipient, data, consensusMaxRotations = client.chain.defaultConsensusMaxRotations, + validUntil = 0n, // 0 means no expiration }: { client: GenLayerClient; senderAccount?: Account; recipient?: `0x${string}`; data?: `0x${string}`; consensusMaxRotations?: number; + validUntil?: bigint; }): {primaryEncodedData: `0x${string}`; fallbackEncodedData: `0x${string}`} => { const validatedSenderAccount = validateAccount(senderAccount); @@ -448,7 +450,7 @@ const _encodeAddTransactionData = ({ const encodedDataV6 = encodeFunctionData({ abi: ADD_TRANSACTION_ABI_V6 as any, functionName: "addTransaction", - args: [...addTransactionArgs, 0n], + args: [...addTransactionArgs, validUntil], }); if (getAddTransactionInputCount(client.chain.consensusMainContract?.abi) >= 6) { diff --git a/src/subscriptions/actions.ts b/src/subscriptions/actions.ts index 5eab7b0..f56fe84 100644 --- a/src/subscriptions/actions.ts +++ b/src/subscriptions/actions.ts @@ -18,7 +18,9 @@ import { TransactionActivatedEvent, TransactionUndeterminedEvent, TransactionLeaderTimeoutEvent, + AppealStartedEvent, TransactionHash, + Address, } from "@/types"; const MAX_EVENT_QUEUE_SIZE = 1000; @@ -214,5 +216,22 @@ export function subscriptionActions(client: GenLayerClient) { return {txId: decoded.tx_id as TransactionHash}; }); }, + + subscribeToAppealStarted: (): ConsensusEventStream => { + return createEventStream(client, "AppealStarted", log => { + const decoded = decodeLog<{ + txId: `0x${string}`; + appealer: `0x${string}`; + appealBond: bigint; + appealValidators: `0x${string}`[]; + }>(log, "AppealStarted"); + return { + txId: decoded.txId as TransactionHash, + appealer: decoded.appealer as Address, + appealBond: decoded.appealBond, + appealValidators: decoded.appealValidators as Address[], + }; + }); + }, }; } diff --git a/src/transactions/actions.ts b/src/transactions/actions.ts index 0a2c69e..59ac37e 100644 --- a/src/transactions/actions.ts +++ b/src/transactions/actions.ts @@ -83,7 +83,7 @@ export const transactionActions = (client: GenLayerClient, public functionName: "getTransactionData", args: [ hash, - Math.round(new Date().getTime() / 1000), // unix seconds + 0n, // Pass 0 to use block.timestamp on-chain ], })) as unknown as GenLayerRawTransaction; return decodeTransaction(transaction); diff --git a/src/transactions/decoders.ts b/src/transactions/decoders.ts index 0ef920f..cb837b7 100644 --- a/src/transactions/decoders.ts +++ b/src/transactions/decoders.ts @@ -74,15 +74,17 @@ export const decodeInputData = ( }; export const decodeTransaction = (tx: GenLayerRawTransaction): GenLayerTransaction => { - const txDataDecoded = decodeInputData(tx.txData, tx.recipient); + const txDataDecoded = decodeInputData(tx.txCalldata, tx.recipient); const decodedTx = { ...tx, - txData: tx.txData, + // Map new field names to old names for backward compatibility + txData: tx.txCalldata, txDataDecoded: txDataDecoded, + numOfInitialValidators: tx.initialRotations.toString(), currentTimestamp: tx.currentTimestamp.toString(), - numOfInitialValidators: tx.numOfInitialValidators.toString(), + initialRotations: tx.initialRotations.toString(), txSlot: tx.txSlot.toString(), createdTimestamp: tx.createdTimestamp.toString(), lastVoteTimestamp: tx.lastVoteTimestamp.toString(), diff --git a/src/types/clients.ts b/src/types/clients.ts index 1b0ae0d..b4f9680 100644 --- a/src/types/clients.ts +++ b/src/types/clients.ts @@ -15,6 +15,7 @@ import { TransactionActivatedEvent, TransactionUndeterminedEvent, TransactionLeaderTimeoutEvent, + AppealStartedEvent, } from "./subscriptions"; /** @@ -192,4 +193,5 @@ export type GenLayerClient = Omit< subscribeToTransactionActivated: () => ConsensusEventStream; subscribeToTransactionUndetermined: () => ConsensusEventStream; subscribeToTransactionLeaderTimeout: () => ConsensusEventStream; + subscribeToAppealStarted: () => ConsensusEventStream; } & StakingActions; diff --git a/src/types/subscriptions.ts b/src/types/subscriptions.ts index ed5ccac..5cc3c36 100644 --- a/src/types/subscriptions.ts +++ b/src/types/subscriptions.ts @@ -24,12 +24,20 @@ export type TransactionLeaderTimeoutEvent = { txId: TransactionHash; }; +export type AppealStartedEvent = { + txId: TransactionHash; + appealer: Address; + appealBond: bigint; + appealValidators: Address[]; +}; + export type ConsensusEventName = | "NewTransaction" | "TransactionAccepted" | "TransactionActivated" | "TransactionUndetermined" - | "TransactionLeaderTimeout"; + | "TransactionLeaderTimeout" + | "AppealStarted"; export type ConsensusEventMap = { NewTransaction: NewTransactionEvent; @@ -37,6 +45,7 @@ export type ConsensusEventMap = { TransactionActivated: TransactionActivatedEvent; TransactionUndetermined: TransactionUndeterminedEvent; TransactionLeaderTimeout: TransactionLeaderTimeoutEvent; + AppealStarted: AppealStartedEvent; }; export type ConsensusEventStream = { diff --git a/src/types/transactions.ts b/src/types/transactions.ts index 5748437..53fff27 100644 --- a/src/types/transactions.ts +++ b/src/types/transactions.ts @@ -276,14 +276,15 @@ export type GenLayerRawTransaction = { currentTimestamp: bigint; sender: Address; recipient: Address; - numOfInitialValidators: bigint; + initialRotations: bigint; txSlot: bigint; createdTimestamp: bigint; lastVoteTimestamp: bigint; randomSeed: Hash; result: number; - txData: Hex | undefined | null; - txReceipt: Hash; + txExecutionHash: Hash; + txCalldata: Hex | undefined | null; + eqBlocksOutputs: Hex | undefined | null; messages: unknown[]; queueType: number; queuePosition: bigint; @@ -306,7 +307,9 @@ export type GenLayerRawTransaction = { rotationsLeft: bigint; result: number; roundValidators: Address[]; - validatorVotesHash: Hash[]; validatorVotes: number[]; + validatorVotesHash: Hash[]; + validatorResultHash: Hash[]; }; + consumedValidators: Address[]; }; From f90538368bffac0cb7520cf22ca2580bf8f7c594 Mon Sep 17 00:00:00 2001 From: Agustin Ramiro Diaz Date: Mon, 9 Feb 2026 13:58:10 -0300 Subject: [PATCH 05/15] feat: enhance GenCallResult to include equivalence outputs - Update GenCallResult interface to add eqOutputs field for non-deterministic operation results. - Modify contractActions function to handle eqOutputs in response format and ensure it defaults to an empty array if not present. This change improves the handling of equivalence outputs in contract interactions. --- src/contracts/actions.ts | 4 +++- src/types/clients.ts | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/contracts/actions.ts b/src/contracts/actions.ts index 32da87e..dec9601 100644 --- a/src/contracts/actions.ts +++ b/src/contracts/actions.ts @@ -316,9 +316,10 @@ export const contractActions = (client: GenLayerClient, publicCli params: [requestParams], }); - // Response format: { data, status: { code, message }, stdout, stderr, logs, events, messages } + // Response format: { data, eqOutputs, status: { code, message }, stdout, stderr, logs, events, messages } const resp = response as { data?: string; + eqOutputs?: string[]; status?: {code: number; message: string}; stdout?: string; stderr?: string; @@ -340,6 +341,7 @@ export const contractActions = (client: GenLayerClient, publicCli return { data: prefixedData, + eqOutputs: resp.eqOutputs ?? [], status: resp.status ?? {code: GenCallStatusCode.SUCCESS, message: "success"}, stdout: resp.stdout ?? "", stderr: resp.stderr ?? "", diff --git a/src/types/clients.ts b/src/types/clients.ts index b4f9680..8a229fe 100644 --- a/src/types/clients.ts +++ b/src/types/clients.ts @@ -68,6 +68,8 @@ export interface GenCallResult { data: `0x${string}`; /** Execution status */ status: GenCallStatus; + /** Equivalence outputs from non-deterministic operations (hex strings) */ + eqOutputs: string[]; /** Standard output from contract execution */ stdout: string; /** Standard error from contract execution */ From 2ab494b257a4567e5f95c36a6547d1633516bba5 Mon Sep 17 00:00:00 2001 From: Agustin Ramiro Diaz Date: Tue, 10 Feb 2026 14:04:30 -0300 Subject: [PATCH 06/15] chore: improve imports --- src/client/client.ts | 25 ++++++++++++++----------- src/subscriptions/actions.ts | 8 ++++++++ src/transactions/decoders.ts | 1 + src/types/clients.ts | 2 +- src/types/subscriptions.ts | 4 ++-- tests/client.test.ts | 2 +- tests/genCall.test.ts | 14 +++++++++----- tests/subscriptions.test.ts | 10 +++------- 8 files changed, 39 insertions(+), 27 deletions(-) diff --git a/src/client/client.ts b/src/client/client.ts index 9412121..4259ff3 100644 --- a/src/client/client.ts +++ b/src/client/client.ts @@ -15,7 +15,7 @@ import {contractActions} from "../contracts/actions"; import {receiptActions, transactionActions} from "../transactions/actions"; import {walletActions as genlayerWalletActions} from "../wallet/actions"; import {stakingActions} from "../staking/actions"; -import {subscriptionActions} from "../subscriptions/actions"; +import {subscriptionActions} from "@/subscriptions/actions"; import {GenLayerClient, GenLayerChain} from "@/types"; import {chainActions} from "@/chains/actions"; import {localnet} from "@/chains"; @@ -84,16 +84,19 @@ const getCustomTransportConfig = (config: ClientConfig, chainConfig: GenLayerCha }; export const createClient = (config: ClientConfig = {chain: localnet}): GenLayerClient => { - const chainConfig = config.chain || localnet; - if (config.endpoint) { - chainConfig.rpcUrls.default.http = [config.endpoint]; - } - if (config.webSocketEndpoint) { - chainConfig.rpcUrls.default = { - ...chainConfig.rpcUrls.default, - webSocket: [config.webSocketEndpoint], - }; - } + const baseChain = config.chain || localnet; + // Clone to avoid mutating the shared chain config singleton + const chainConfig = { + ...baseChain, + rpcUrls: { + ...baseChain.rpcUrls, + default: { + ...baseChain.rpcUrls.default, + ...(config.endpoint ? {http: [config.endpoint]} : {}), + ...(config.webSocketEndpoint ? {webSocket: [config.webSocketEndpoint]} : {}), + }, + }, + }; const customTransport = custom(getCustomTransportConfig(config, chainConfig as GenLayerChain), {retryCount: 0, retryDelay: 0}); const publicClient = createPublicClient(chainConfig as GenLayerChain, customTransport).extend( diff --git a/src/subscriptions/actions.ts b/src/subscriptions/actions.ts index f56fe84..9516d5a 100644 --- a/src/subscriptions/actions.ts +++ b/src/subscriptions/actions.ts @@ -95,6 +95,7 @@ function createEventStream( } else { // Prevent unbounded queue growth if (eventQueue.length >= MAX_EVENT_QUEUE_SIZE) { + console.warn(`[genlayer-js] ${eventName} event queue full (${MAX_EVENT_QUEUE_SIZE}), dropping oldest event`); eventQueue.shift(); // Drop oldest event } eventQueue.push(event); @@ -113,6 +114,13 @@ function createEventStream( resolveNext = null; rejectNext = null; } + // Auto-terminate stream on WebSocket failure so subsequent next() calls + // return {done: true} instead of hanging indefinitely + isUnsubscribed = true; + if (unwatch) { + unwatch(); + unwatch = null; + } }; unwatch = wsClient.watchContractEvent({ diff --git a/src/transactions/decoders.ts b/src/transactions/decoders.ts index cb837b7..2d78e57 100644 --- a/src/transactions/decoders.ts +++ b/src/transactions/decoders.ts @@ -80,6 +80,7 @@ export const decodeTransaction = (tx: GenLayerRawTransaction): GenLayerTransacti ...tx, // Map new field names to old names for backward compatibility txData: tx.txCalldata, + txReceipt: tx.eqBlocksOutputs, txDataDecoded: txDataDecoded, numOfInitialValidators: tx.initialRotations.toString(), diff --git a/src/types/clients.ts b/src/types/clients.ts index 8a229fe..cc0f3b0 100644 --- a/src/types/clients.ts +++ b/src/types/clients.ts @@ -16,7 +16,7 @@ import { TransactionUndeterminedEvent, TransactionLeaderTimeoutEvent, AppealStartedEvent, -} from "./subscriptions"; +} from "@/types/subscriptions"; /** * Status codes from genCall execution diff --git a/src/types/subscriptions.ts b/src/types/subscriptions.ts index 5cc3c36..ae53910 100644 --- a/src/types/subscriptions.ts +++ b/src/types/subscriptions.ts @@ -1,5 +1,5 @@ -import {Address} from "./accounts"; -import {TransactionHash} from "./transactions"; +import {Address} from "@/types/accounts"; +import {TransactionHash} from "@/types/transactions"; export type NewTransactionEvent = { txId: TransactionHash; diff --git a/tests/client.test.ts b/tests/client.test.ts index c050038..2ec913f 100644 --- a/tests/client.test.ts +++ b/tests/client.test.ts @@ -18,7 +18,7 @@ describe("Client Creation", () => { it("should create a client for the localnet", () => { const client = createClient({chain: localnet}); expect(client).toBeDefined(); - expect(client.chain).toBe(localnet); + expect(client.chain).toStrictEqual(localnet); }); }); diff --git a/tests/genCall.test.ts b/tests/genCall.test.ts index e40fa8c..9da1475 100644 --- a/tests/genCall.test.ts +++ b/tests/genCall.test.ts @@ -1,10 +1,10 @@ // tests/genCall.test.ts -import {describe, it, expect, vi, beforeEach, afterEach} from "vitest"; -import {createClient} from "../src/client/client"; +import {describe, it, expect, vi, beforeEach, afterEach, afterAll} from "vitest"; +import {createClient} from "@/client/client"; import {localnet} from "@/chains/localnet"; -import {Address} from "../src/types/accounts"; -import {createAccount, generatePrivateKey} from "../src/accounts/account"; -import {GenCallStatusCode} from "../src/types/clients"; +import {Address} from "@/types/accounts"; +import {createAccount, generatePrivateKey} from "@/accounts/account"; +import {GenCallStatusCode} from "@/types/clients"; import {zeroAddress} from "viem"; // Setup fetch mock @@ -64,6 +64,10 @@ describe("genCall", () => { vi.restoreAllMocks(); }); + afterAll(() => { + vi.unstubAllGlobals(); + }); + it("should send basic genCall request with required parameters", async () => { const client = createClient({chain: localnet}); const contractAddress = "0x1234567890123456789012345678901234567890" as Address; diff --git a/tests/subscriptions.test.ts b/tests/subscriptions.test.ts index e5082a4..b747593 100644 --- a/tests/subscriptions.test.ts +++ b/tests/subscriptions.test.ts @@ -4,8 +4,8 @@ import { WebSocketNotConfiguredError, ConsensusContractNotInitializedError, subscriptionActions, -} from "../src/subscriptions/actions"; -import {GenLayerClient, GenLayerChain} from "../src/types"; +} from "@/subscriptions/actions"; +import {GenLayerClient, GenLayerChain} from "@/types"; // Mock viem module for WebSocket-related tests vi.mock("viem", async importOriginal => { @@ -121,11 +121,7 @@ describe("Subscription Actions", () => { // Should not throw WebSocketNotConfiguredError // (may throw other errors due to mocking, but not this specific one) - try { - actions.subscribeToNewTransaction(); - } catch (error) { - expect(error).not.toBeInstanceOf(WebSocketNotConfiguredError); - } + expect(() => actions.subscribeToNewTransaction()).not.toThrow(WebSocketNotConfiguredError); }); }); From 3d6a14aebb9af1292cc4f55cf010c2cbfdd9468a Mon Sep 17 00:00:00 2001 From: Agustin Ramiro Diaz Date: Tue, 10 Feb 2026 15:41:40 -0300 Subject: [PATCH 07/15] feat: implement WebSocket client cache eviction on error - Evict the cached WebSocket client when a WebSocket error occurs, ensuring that subsequent subscriptions create a fresh client. - Add tests to verify the behavior of client cache eviction upon WebSocket errors, confirming that the client is recreated as expected. This change enhances the reliability of WebSocket subscriptions by preventing stale connections. --- src/subscriptions/actions.ts | 2 ++ tests/subscriptions.test.ts | 48 ++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/src/subscriptions/actions.ts b/src/subscriptions/actions.ts index 9516d5a..544f06a 100644 --- a/src/subscriptions/actions.ts +++ b/src/subscriptions/actions.ts @@ -114,6 +114,8 @@ function createEventStream( resolveNext = null; rejectNext = null; } + // Evict the dead WebSocket client so the next subscription creates a fresh one + wsClientCache.delete(client); // Auto-terminate stream on WebSocket failure so subsequent next() calls // return {done: true} instead of hanging indefinitely isUnsubscribed = true; diff --git a/tests/subscriptions.test.ts b/tests/subscriptions.test.ts index b747593..29d0ca6 100644 --- a/tests/subscriptions.test.ts +++ b/tests/subscriptions.test.ts @@ -7,11 +7,29 @@ import { } from "@/subscriptions/actions"; import {GenLayerClient, GenLayerChain} from "@/types"; +// Track createPublicClient calls and captured onError handlers +const {createPublicClientSpy, getCapturedOnError, setCapturedOnError} = vi.hoisted(() => { + let capturedOnError: ((error: Error) => void) | null = null; + return { + createPublicClientSpy: vi.fn(() => ({ + watchContractEvent: vi.fn((opts: {onError?: (error: Error) => void}) => { + capturedOnError = opts.onError ?? null; + return vi.fn(); // unwatch function + }), + })), + getCapturedOnError: () => capturedOnError, + setCapturedOnError: (v: ((error: Error) => void) | null) => { + capturedOnError = v; + }, + }; +}); + // Mock viem module for WebSocket-related tests vi.mock("viem", async importOriginal => { const actual = (await importOriginal()) as object; return { ...actual, + createPublicClient: createPublicClientSpy, webSocket: vi.fn(() => ({ request: vi.fn(), type: "webSocket" as const, @@ -189,3 +207,33 @@ describe("ConsensusEventStream interface", () => { expect(typeof actions.subscribeToTransactionLeaderTimeout).toBe("function"); }); }); + +describe("WebSocket client cache eviction on error", () => { + afterEach(() => { + setCapturedOnError(null); + vi.restoreAllMocks(); + }); + + it("should evict cached wsClient on WebSocket error so next subscription creates a fresh client", () => { + createPublicClientSpy.mockClear(); + const client = createMockClient({webSocketUrl: "wss://example.com/ws"}); + const actions = subscriptionActions(client); + + // First subscription creates the wsClient + actions.subscribeToNewTransaction(); + expect(createPublicClientSpy).toHaveBeenCalledTimes(1); + + // Second subscription reuses the cached wsClient + actions.subscribeToNewTransaction(); + expect(createPublicClientSpy).toHaveBeenCalledTimes(1); + + // Simulate a WebSocket error + const onError = getCapturedOnError(); + expect(onError).not.toBeNull(); + onError!(new Error("WebSocket connection closed")); + + // Third subscription should create a new wsClient because the cache was evicted + actions.subscribeToNewTransaction(); + expect(createPublicClientSpy).toHaveBeenCalledTimes(2); + }); +}); From 8a953e626bdd7f0871e325395d5f231508d2730d Mon Sep 17 00:00:00 2001 From: Agustin Ramiro Diaz Date: Thu, 12 Feb 2026 08:49:13 -0300 Subject: [PATCH 08/15] feat: refactor _sendTransaction to return receipt/hash and fix type narrowing Move NewTransaction event parsing from _sendTransaction into each caller (writeContract, deployContract, appealTransaction) so external wallet flows return the consensus txId correctly. Add explicit return type to _sendTransaction for proper TypeScript narrowing. Update leaderResults type from Record to string[] and fix genCall test accordingly. Co-Authored-By: Claude Opus 4.6 --- src/contracts/actions.ts | 78 ++++++++++++++++++++++++++++------------ src/types/clients.ts | 2 +- tests/genCall.test.ts | 5 +-- 3 files changed, 57 insertions(+), 28 deletions(-) diff --git a/src/contracts/actions.ts b/src/contracts/actions.ts index dec9601..745222a 100644 --- a/src/contracts/actions.ts +++ b/src/contracts/actions.ts @@ -12,7 +12,7 @@ import { GenCallResult, GenCallStatusCode, } from "@/types"; -import {fromHex, toHex, zeroAddress, encodeFunctionData, PublicClient, parseEventLogs} from "viem"; +import {fromHex, toHex, zeroAddress, encodeFunctionData, PublicClient, parseEventLogs, TransactionReceipt} from "viem"; import {toJsonSafeDeep, b64ToArray} from "@/utils/jsonifier"; export const contractActions = (client: GenLayerClient, publicClient: PublicClient) => { @@ -174,7 +174,7 @@ export const contractActions = (client: GenLayerClient, publicCli data: serializedData, consensusMaxRotations, }); - return _sendTransaction({ + const result = await _sendTransaction({ client, publicClient, encodedData: primaryEncodedData, @@ -182,6 +182,22 @@ export const contractActions = (client: GenLayerClient, publicCli senderAccount, value, }); + + if ("hash" in result) { + return result.hash; + } + + const newTxEvents = parseEventLogs({ + abi: client.chain.consensusMainContract?.abi as any, + eventName: "NewTransaction", + logs: result.receipt.logs, + }) as unknown as {args: {txId: `0x${string}`}}[]; + + if (newTxEvents.length === 0) { + throw new Error("Transaction not processed by consensus"); + } + + return newTxEvents[0].args["txId"]; }, deployContract: async (args: { account?: Account; @@ -214,13 +230,29 @@ export const contractActions = (client: GenLayerClient, publicCli data: serializedData, consensusMaxRotations, }); - return _sendTransaction({ + const result = await _sendTransaction({ client, publicClient, encodedData: primaryEncodedData, fallbackEncodedData, senderAccount, }); + + if ("hash" in result) { + return result.hash; + } + + const newTxEvents = parseEventLogs({ + abi: client.chain.consensusMainContract?.abi as any, + eventName: "NewTransaction", + logs: result.receipt.logs, + }) as unknown as {args: {txId: `0x${string}`}}[]; + + if (newTxEvents.length === 0) { + throw new Error("Transaction not processed by consensus"); + } + + return newTxEvents[0].args["txId"]; }, appealTransaction: async (args: { account?: Account; @@ -229,12 +261,18 @@ export const contractActions = (client: GenLayerClient, publicCli const {account, txId} = args; const senderAccount = account || client.account; const encodedData = _encodeSubmitAppealData({client, txId}); - return _sendTransaction({ + const result = await _sendTransaction({ client, publicClient, encodedData, senderAccount, }); + + if ("hash" in result) { + return result.hash; + } + + return result.receipt.transactionHash; }, /** @@ -252,8 +290,9 @@ export const contractActions = (client: GenLayerClient, publicCli * @param args.to - Target contract address * @param args.from - Sender address (optional, uses client account if not provided) * @param args.data - RLP-encoded transaction data - * @param args.leaderResults - Equivalence outputs from leader for validator simulation. - * If provided, simulates as validator; if null/undefined, simulates as leader. + * @param args.leaderResults - Array of hex-encoded eq_outputs from leader for validator simulation. + * Each entry is a hex string (e.g. "00d102"). If provided, simulates as validator; + * if null/undefined, simulates as leader. * @param args.value - Value to send with the transaction (optional) * @param args.gas - Gas limit for the transaction (optional) * @param args.blockNumber - Block number to simulate at (optional, defaults to latest) @@ -265,7 +304,7 @@ export const contractActions = (client: GenLayerClient, publicCli to: Address; from?: Address; data: `0x${string}`; - leaderResults?: Record | null; + leaderResults?: string[] | null; value?: bigint; gas?: bigint; blockNumber?: string; @@ -536,7 +575,7 @@ const _sendTransaction = async ({ fallbackEncodedData?: `0x${string}`; senderAccount?: Account; value?: bigint; -}) => { +}): Promise<{receipt: TransactionReceipt} | {hash: `0x${string}`}> => { if (!client.chain.consensusMainContract?.address) { throw new Error("Consensus main contract not initialized. Please ensure client is properly initialized."); } @@ -589,17 +628,7 @@ const _sendTransaction = async ({ throw new Error("Transaction reverted"); } - const newTxEvents = parseEventLogs({ - abi: client.chain.consensusMainContract?.abi as any, - eventName: "NewTransaction", - logs: receipt.logs, - }) as unknown as {args: {txId: `0x${string}`}}[]; - - if (newTxEvents.length === 0) { - throw new Error("Transaction not processed by consensus"); - } - - return newTxEvents[0].args["txId"]; + return {receipt}; } // For injected/external wallets (e.g. MetaMask), avoid viem's @@ -636,10 +665,12 @@ const _sendTransaction = async ({ ...(gasPriceHex ? {gasPrice: gasPriceHex} : {}), }; - return await client.request({ - method: "eth_sendTransaction", - params: [formattedRequest as any], - }); + return { + hash: (await client.request({ + method: "eth_sendTransaction", + params: [formattedRequest as any], + })) as `0x${string}`, + }; }; try { @@ -651,3 +682,4 @@ const _sendTransaction = async ({ return await sendWithEncodedData(fallbackEncodedData); } }; + diff --git a/src/types/clients.ts b/src/types/clients.ts index cc0f3b0..8adb402 100644 --- a/src/types/clients.ts +++ b/src/types/clients.ts @@ -184,7 +184,7 @@ export type GenLayerClient = Omit< to: Address; from?: Address; data: `0x${string}`; - leaderResults?: Record | null; + leaderResults?: string[] | null; value?: bigint; gas?: bigint; blockNumber?: string; diff --git a/tests/genCall.test.ts b/tests/genCall.test.ts index 9da1475..8bdf6a7 100644 --- a/tests/genCall.test.ts +++ b/tests/genCall.test.ts @@ -153,10 +153,7 @@ describe("genCall", () => { const client = createClient({chain: localnet}); const contractAddress = "0x1234567890123456789012345678901234567890" as Address; - const leaderResults = { - "web_request_1": {data: "response_data", kind: 1}, - "web_request_2": {data: "other_data", kind: 2}, - }; + const leaderResults = ["0010", "00d102"]; await client.genCall({ type: "write", From 6100c5bb47f2d4b0587cf0905b55197de1b1f047 Mon Sep 17 00:00:00 2001 From: Agustin Ramiro Diaz Date: Thu, 12 Feb 2026 16:28:40 -0300 Subject: [PATCH 09/15] feat: add AddressManager resolution, update ABIs, and add TransactionFinalized subscription Add dynamic contract address resolution via AddressManager for chains that configure an addressManagerAddress. Update consensus contract ABIs across all chain configs. Add TransactionFinalized event type and subscription. Update genCall to accept leaderResults as string[] and fix appeal transaction to return receipt hash for external wallets. Co-Authored-By: Claude Opus 4.6 --- src/chains/actions.ts | 152 +- src/chains/localnet.ts | 5123 ++++++++++++++------------------- src/chains/studionet.ts | 5104 ++++++++++++++------------------ src/chains/testnetAsimov.ts | 5283 +++++++++++++++------------------- src/contracts/actions.ts | 51 +- src/subscriptions/actions.ts | 43 +- src/types/chains.ts | 1 + src/types/subscriptions.ts | 12 +- 8 files changed, 7030 insertions(+), 8739 deletions(-) diff --git a/src/chains/actions.ts b/src/chains/actions.ts index 5fb6ca2..0568d38 100644 --- a/src/chains/actions.ts +++ b/src/chains/actions.ts @@ -1,16 +1,146 @@ -import {GenLayerClient, GenLayerChain} from "@/types"; +import {encodeFunctionData, decodeFunctionResult} from "viem"; +import {GenLayerClient, GenLayerChain, Address} from "@/types"; +import {localnet} from "./localnet"; +import {studionet} from "./studionet"; +import {testnetAsimov} from "./testnetAsimov"; -export function chainActions(_client: GenLayerClient) { +const ADDRESS_MANAGER_ABI = [ + { + inputs: [{internalType: "string", name: "name", type: "string"}], + name: "getAddress", + outputs: [{internalType: "address", name: "", type: "address"}], + stateMutability: "view", + type: "function", + }, +] as const; + +async function resolveFromAddressManager( + rpcUrl: string, + addressManagerAddress: Address, + name: string, +): Promise
{ + const data = encodeFunctionData({ + abi: ADDRESS_MANAGER_ABI, + functionName: "getAddress", + args: [name], + }); + + const response = await fetch(rpcUrl, { + method: "POST", + headers: {"Content-Type": "application/json"}, + body: JSON.stringify({ + jsonrpc: "2.0", + id: Date.now(), + method: "eth_call", + params: [{to: addressManagerAddress, data}, "latest"], + }), + }); + + const json = (await response.json()) as {result?: string; error?: {message: string}}; + if (json.error) { + throw new Error(`AddressManager.getAddress("${name}") failed: ${json.error.message}`); + } + + const result = decodeFunctionResult({ + abi: ADDRESS_MANAGER_ABI, + functionName: "getAddress", + data: json.result as `0x${string}`, + }); + + return result as Address; +} + +export function chainActions(client: GenLayerClient) { return { - /** - * @deprecated This method is deprecated and will be removed in a future release. - * The consensus contract is now resolved from the static chain definition. - */ - initializeConsensusSmartContract: async (_forceReset: boolean = false): Promise => { - console.warn( - "[genlayer-js] initializeConsensusSmartContract() is deprecated and will be removed in a future release. " + - "The consensus contract is now resolved from the static chain definition.", - ); + initializeConsensusSmartContract: async (forceReset: boolean = false): Promise => { + // Resolve addresses from AddressManager if configured + if (client.chain.addressManagerAddress) { + const rpcUrl = client.chain.rpcUrls.default.http[0]; + + if (client.chain.consensusMainContract) { + const mainAddress = await resolveFromAddressManager( + rpcUrl, + client.chain.addressManagerAddress, + "ConsensusMain", + ); + client.chain.consensusMainContract = { + ...client.chain.consensusMainContract, + address: mainAddress, + }; + } + + if (client.chain.consensusDataContract) { + const dataAddress = await resolveFromAddressManager( + rpcUrl, + client.chain.addressManagerAddress, + "ConsensusData", + ); + client.chain.consensusDataContract = { + ...client.chain.consensusDataContract, + address: dataAddress, + }; + } + + return; + } + + if (client.chain?.id === testnetAsimov.id) { + return; + } + + const hasStaticConsensusContract = + !!client.chain.consensusMainContract?.address && + !!client.chain.consensusMainContract?.abi; + const isLocalOrStudioChain = + client.chain?.id === localnet.id || client.chain?.id === studionet.id; + + if ( + !forceReset && + hasStaticConsensusContract && + !isLocalOrStudioChain + ) { + return; + } + + try { + const contractsResponse = await fetch(client.chain.rpcUrls.default.http[0], { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + jsonrpc: "2.0", + id: Date.now(), + method: "sim_getConsensusContract", + params: ["ConsensusMain"], + }), + }); + + if (!contractsResponse.ok) { + throw new Error("Failed to fetch ConsensusMain contract"); + } + + const consensusMainContract = await contractsResponse.json(); + + if ( + consensusMainContract?.error || + !consensusMainContract?.result?.address || + !consensusMainContract?.result?.abi + ) { + throw new Error("ConsensusMain response did not include a valid contract"); + } + + client.chain.consensusMainContract = consensusMainContract.result; + (client.chain as any).__consensusAbiFetchedFromRpc = true; + } catch (error) { + // Some local simulators don't expose sim_getConsensusContract. + // If we already have a chain-baked consensus ABI, keep using it. + if (hasStaticConsensusContract) { + (client.chain as any).__consensusAbiFetchedFromRpc = false; + return; + } + throw error; + } }, }; } diff --git a/src/chains/localnet.ts b/src/chains/localnet.ts index cf994fa..7ab8a0b 100644 --- a/src/chains/localnet.ts +++ b/src/chains/localnet.ts @@ -7,1435 +7,1349 @@ const CONSENSUS_MAIN_CONTRACT = { address: "0xb7278A61aa25c888815aFC32Ad3cC52fF24fE575" as Address, abi: [ { - inputs: [], - name: "AccessControlBadConfirmation", - type: "error", + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" }, { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "neededRole", - type: "bytes32", - }, - ], - name: "AccessControlUnauthorizedAccount", - type: "error", + "inputs": [], + "name": "CallerNotMessages", + "type": "error" + }, + { + "inputs": [], + "name": "CanNotAppeal", + "type": "error" }, { - inputs: [], - name: "CallerNotMessages", - type: "error", + "inputs": [], + "name": "InvalidDeploymentWithSalt", + "type": "error" }, { - inputs: [], - name: "CanNotAppeal", - type: "error", + "inputs": [], + "name": "InvalidGhostContract", + "type": "error" }, { - inputs: [], - name: "EmptyTransaction", - type: "error", + "inputs": [], + "name": "InvalidInitialization", + "type": "error" }, { - inputs: [], - name: "FinalizationNotAllowed", - type: "error", + "inputs": [], + "name": "InvalidRevealLeaderData", + "type": "error" }, { - inputs: [], - name: "InvalidAddress", - type: "error", + "inputs": [], + "name": "InvalidVote", + "type": "error" }, { - inputs: [], - name: "InvalidGhostContract", - type: "error", + "inputs": [], + "name": "NotInitializing", + "type": "error" }, { - inputs: [], - name: "InvalidInitialization", - type: "error", + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" }, { - inputs: [], - name: "InvalidVote", - type: "error", + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" }, { - inputs: [], - name: "MaxNumOfIterationsInPendingQueueReached", - type: "error", + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" }, { - inputs: [ + "anonymous": false, + "inputs": [ { - internalType: "uint256", - name: "numOfMessages", - type: "uint256", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - internalType: "uint256", - name: "maxAllocatedMessages", - type: "uint256", + "indexed": true, + "internalType": "address", + "name": "oldActivator", + "type": "address" }, + { + "indexed": true, + "internalType": "address", + "name": "newActivator", + "type": "address" + } ], - name: "MaxNumOfMessagesExceeded", - type: "error", - }, - { - inputs: [], - name: "NonGenVMContract", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", + "name": "ActivatorReplaced", + "type": "event" }, { - inputs: [ + "anonymous": false, + "inputs": [ { - internalType: "address", - name: "owner", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "addressManager", + "type": "address" + } ], - name: "OwnableInvalidOwner", - type: "error", + "name": "AddressManagerSet", + "type": "event" }, { - inputs: [ + "anonymous": false, + "inputs": [ { - internalType: "address", - name: "account", - type: "address", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, + { + "indexed": false, + "internalType": "enum ITransactions.TransactionStatus", + "name": "newStatus", + "type": "uint8" + } ], - name: "OwnableUnauthorizedAccount", - type: "error", - }, - { - inputs: [], - name: "ReentrancyGuardReentrantCall", - type: "error", + "name": "AllVotesCommitted", + "type": "event" }, { - inputs: [], - name: "TransactionNotAtPendingQueueHead", - type: "error", - }, - { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "appealer", - type: "address", + "indexed": true, + "internalType": "address", + "name": "appellant", + "type": "address" }, { - indexed: false, - internalType: "uint256", - name: "appealBond", - type: "uint256", + "indexed": false, + "internalType": "uint256", + "name": "bond", + "type": "uint256" }, { - indexed: false, - internalType: "address[]", - name: "appealValidators", - type: "address[]", - }, + "indexed": false, + "internalType": "address[]", + "name": "validators", + "type": "address[]" + } ], - name: "AppealStarted", - type: "event", + "name": "AppealStarted", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", + "indexed": false, + "internalType": "uint256", + "name": "attempted", + "type": "uint256" }, { - indexed: true, - internalType: "address", - name: "recipient", - type: "address", + "indexed": false, + "internalType": "uint256", + "name": "succeeded", + "type": "uint256" }, { - indexed: false, - internalType: "bytes", - name: "data", - type: "bytes", - }, + "indexed": false, + "internalType": "uint256", + "name": "failed", + "type": "uint256" + } ], - name: "ErrorMessage", - type: "event", + "name": "BatchFinalizationCompleted", + "type": "event" }, { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "ghostFactory", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "genManager", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "genTransactions", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "genQueue", - type: "address", - }, + "anonymous": false, + "inputs": [ { - indexed: false, - internalType: "address", - name: "genStaking", - type: "address", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: false, - internalType: "address", - name: "genMessages", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "idleness", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "tribunalAppeal", - type: "address", - }, + "indexed": false, + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" + } ], - name: "ExternalContractsSet", - type: "event", + "name": "CreatedTransaction", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } ], - name: "Initialized", - type: "event", + "name": "Initialized", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "recipient", - type: "address", + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" }, { - indexed: true, - internalType: "address", - name: "activator", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "activator", + "type": "address" + } ], - name: "InternalMessageProcessed", - type: "event", + "name": "InternalMessageProcessed", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "recipient", - type: "address", + "indexed": true, + "internalType": "address", + "name": "oldLeader", + "type": "address" }, { - indexed: true, - internalType: "address", - name: "activator", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "newLeader", + "type": "address" + } ], - name: "NewTransaction", - type: "event", + "name": "LeaderIdlenessProcessed", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" }, + { + "indexed": true, + "internalType": "address", + "name": "activator", + "type": "address" + } ], - name: "OwnershipTransferStarted", - type: "event", + "name": "NewTransaction", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" }, { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } ], - name: "OwnershipTransferred", - type: "event", + "name": "OwnershipTransferStarted", + "type": "event" }, { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "role", - type: "bytes32", - }, + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "previousAdminRole", - type: "bytes32", + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" }, { - indexed: true, - internalType: "bytes32", - name: "newAdminRole", - type: "bytes32", - }, + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } ], - name: "RoleAdminChanged", - type: "event", + "name": "OwnershipTransferred", + "type": "event" }, { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } ], - name: "RoleGranted", - type: "event", + "name": "ProcessIdlenessAccepted", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "role", - type: "bytes32", - }, + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } + ], + "name": "TransactionAccepted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "account", - type: "address", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "leader", + "type": "address" + } ], - name: "RoleRevoked", - type: "event", + "name": "TransactionActivated", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "cancelledBy", + "type": "address" + } ], - name: "SlashAppealSubmitted", - type: "event", + "name": "TransactionCancelled", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "tx_id", - type: "bytes32", - }, + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } ], - name: "TransactionAccepted", - type: "event", + "name": "TransactionFinalizationFailed", + "type": "event" }, { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", - }, + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "leader", - type: "address", - }, + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } ], - name: "TransactionActivated", - type: "event", + "name": "TransactionFinalized", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "uint256", - name: "batchId", - type: "uint256", - }, - { - indexed: false, - internalType: "address[]", - name: "validators", - type: "address[]", - }, + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } ], - name: "TransactionActivatedValidators", - type: "event", + "name": "TransactionLeaderRevealed", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "newLeader", + "type": "address" + } ], - name: "TransactionCancelled", - type: "event", + "name": "TransactionLeaderRotated", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "tx_id", - type: "bytes32", - }, + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } ], - name: "TransactionFinalized", - type: "event", + "name": "TransactionLeaderTimeout", + "type": "event" }, { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", - }, - { - indexed: true, - internalType: "address", - name: "oldValidator", - type: "address", - }, + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "newValidator", - type: "address", - }, + "indexed": false, + "internalType": "bytes32[]", + "name": "txIds", + "type": "bytes32[]" + } ], - name: "TransactionIdleValidatorReplaced", - type: "event", + "name": "TransactionNeedsRecomputation", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "uint256", - name: "validatorIndex", - type: "uint256", - }, + "indexed": false, + "internalType": "address[]", + "name": "validators", + "type": "address[]" + } ], - name: "TransactionIdleValidatorReplacementFailed", - type: "event", + "name": "TransactionReceiptProposed", + "type": "event" }, { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", - }, + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "newLeader", - type: "address", - }, + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } ], - name: "TransactionLeaderRotated", - type: "event", + "name": "TransactionUndetermined", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "tx_id", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, - ], - name: "TransactionLeaderTimeout", - type: "event", - }, - { - anonymous: false, - inputs: [ { - indexed: false, - internalType: "bytes32[]", - name: "tx_ids", - type: "bytes32[]", + "indexed": false, + "internalType": "uint256", + "name": "tribunalIndex", + "type": "uint256" }, + { + "indexed": true, + "internalType": "address", + "name": "validator", + "type": "address" + } ], - name: "TransactionNeedsRecomputation", - type: "event", + "name": "TribunalAppealVoteCommitted", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "tx_id", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: false, - internalType: "address[]", - name: "validators", - type: "address[]", + "indexed": false, + "internalType": "uint256", + "name": "tribunalIndex", + "type": "uint256" }, - ], - name: "TransactionReceiptProposed", - type: "event", - }, - { - anonymous: false, - inputs: [ { - indexed: true, - internalType: "bytes32", - name: "tx_id", - type: "bytes32", + "indexed": true, + "internalType": "address", + "name": "validator", + "type": "address" }, + { + "indexed": false, + "internalType": "enum ITransactions.VoteType", + "name": "voteType", + "type": "uint8" + } ], - name: "TransactionUndetermined", - type: "event", + "name": "TribunalAppealVoteRevealed", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "validator", - type: "address", + "indexed": true, + "internalType": "address", + "name": "oldValidator", + "type": "address" }, { - indexed: false, - internalType: "bool", - name: "isLastVote", - type: "bool", + "indexed": true, + "internalType": "address", + "name": "newValidator", + "type": "address" }, + { + "indexed": false, + "internalType": "uint256", + "name": "validatorIndex", + "type": "uint256" + } ], - name: "TribunalAppealVoteCommitted", - type: "event", + "name": "ValidatorReplaced", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "validator", - type: "address", + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" }, { - indexed: false, - internalType: "bool", - name: "isLastVote", - type: "bool", - }, + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } ], - name: "TribunalAppealVoteRevealed", - type: "event", + "name": "ValueWithdrawalFailed", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "validator", - type: "address", + "indexed": true, + "internalType": "address", + "name": "validator", + "type": "address" }, { - indexed: false, - internalType: "bool", - name: "isLastVote", - type: "bool", - }, + "indexed": false, + "internalType": "bool", + "name": "isLastVote", + "type": "bool" + } ], - name: "VoteCommitted", - type: "event", + "name": "VoteCommitted", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "validator", - type: "address", + "indexed": true, + "internalType": "address", + "name": "validator", + "type": "address" }, { - indexed: false, - internalType: "enum ITransactions.VoteType", - name: "voteType", - type: "uint8", + "indexed": false, + "internalType": "enum ITransactions.VoteType", + "name": "voteType", + "type": "uint8" }, { - indexed: false, - internalType: "bool", - name: "isLastVote", - type: "bool", + "indexed": false, + "internalType": "bool", + "name": "isLastVote", + "type": "bool" }, { - indexed: false, - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", - }, + "indexed": false, + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" + } ], - name: "VoteRevealed", - type: "event", + "name": "VoteRevealed", + "type": "event" }, { - inputs: [], - name: "DEFAULT_ADMIN_ROLE", - outputs: [ + "inputs": [], + "name": "EVENTS_BATCH_SIZE", + "outputs": [ { - internalType: "bytes32", - name: "", - type: "bytes32", - }, + "internalType": "uint256", + "name": "", + "type": "uint256" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: "EVENTS_BATCH_SIZE", - outputs: [ + "inputs": [], + "name": "VERSION", + "outputs": [ { - internalType: "uint256", - name: "", - type: "uint256", - }, + "internalType": "string", + "name": "", + "type": "string" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: "acceptOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "_txId", - type: "bytes32", + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" }, { - internalType: "bytes", - name: "_vrfProof", - type: "bytes", + "internalType": "address", + "name": "_operator", + "type": "address" }, + { + "internalType": "bytes", + "name": "_vrfProof", + "type": "bytes" + } ], - name: "activateTransaction", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "activateTransaction", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "_sender", - type: "address", + "internalType": "address", + "name": "_sender", + "type": "address" }, { - internalType: "address", - name: "_recipient", - type: "address", + "internalType": "address", + "name": "_recipient", + "type": "address" }, { - internalType: "uint256", - name: "_numOfInitialValidators", - type: "uint256", + "internalType": "uint256", + "name": "_numOfInitialValidators", + "type": "uint256" }, { - internalType: "uint256", - name: "_maxRotations", - type: "uint256", + "internalType": "uint256", + "name": "_maxRotations", + "type": "uint256" }, { - internalType: "bytes", - name: "_calldata", - type: "bytes", + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" }, { - internalType: "uint256", - name: "_validUntil", - type: "uint256", - }, + "internalType": "uint256", + "name": "_validUntil", + "type": "uint256" + } ], - name: "addTransaction", - outputs: [], - stateMutability: "payable", - type: "function", + "name": "addTransaction", + "outputs": [], + "stateMutability": "payable", + "type": "function" }, { - inputs: [ + "inputs": [], + "name": "addressManager", + "outputs": [ { - internalType: "bytes32", - name: "_txId", - type: "bytes32", - }, + "internalType": "contract IAddressManager", + "name": "", + "type": "address" + } ], - name: "cancelTransaction", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { - internalType: "bytes32", - name: "_txId", - type: "bytes32", - }, + "inputs": [ { - internalType: "bytes32", - name: "_commitHash", - type: "bytes32", - }, + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } ], - name: "commitTribunalAppealVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "cancelTransaction", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "_txId", - type: "bytes32", + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" }, { - internalType: "bytes32", - name: "_commitHash", - type: "bytes32", + "internalType": "uint256", + "name": "_tribunalIndex", + "type": "uint256" }, { - internalType: "uint256", - name: "_validatorIndex", - type: "uint256", - }, + "internalType": "bytes32", + "name": "_commitHash", + "type": "bytes32" + } ], - name: "commitVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "commitTribunalAppealVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [], - name: "contracts", - outputs: [ + "inputs": [ { - internalType: "contract IGenManager", - name: "genManager", - type: "address", + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" }, { - internalType: "contract ITransactions", - name: "genTransactions", - type: "address", + "internalType": "bytes32", + "name": "_commitHash", + "type": "bytes32" }, { - internalType: "contract IQueues", - name: "genQueue", - type: "address", - }, + "internalType": "uint256", + "name": "_validatorIndex", + "type": "uint256" + } + ], + "name": "commitVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - internalType: "contract IGhostFactory", - name: "ghostFactory", - type: "address", + "internalType": "address", + "name": "_sender", + "type": "address" }, { - internalType: "contract IGenStaking", - name: "genStaking", - type: "address", + "internalType": "uint256", + "name": "_numOfInitialValidators", + "type": "uint256" }, { - internalType: "contract IMessages", - name: "genMessages", - type: "address", + "internalType": "uint256", + "name": "_maxRotations", + "type": "uint256" }, { - internalType: "contract IIdleness", - name: "idleness", - type: "address", + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" }, { - internalType: "contract ITribunalAppeal", - name: "tribunalAppeal", - type: "address", + "internalType": "uint256", + "name": "_saltNonce", + "type": "uint256" }, + { + "internalType": "uint256", + "name": "_validUntil", + "type": "uint256" + } ], - stateMutability: "view", - type: "function", + "name": "deploySalted", + "outputs": [], + "stateMutability": "payable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "_recipient", - type: "address", + "internalType": "address", + "name": "_recipient", + "type": "address" }, { - internalType: "uint256", - name: "_value", - type: "uint256", + "internalType": "uint256", + "name": "_value", + "type": "uint256" }, { - internalType: "bytes", - name: "_data", - type: "bytes", - }, + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } ], - name: "executeMessage", - outputs: [ + "name": "executeMessage", + "outputs": [ { - internalType: "bool", - name: "success", - type: "bool", - }, + "internalType": "bool", + "name": "success", + "type": "bool" + } ], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "_txId", - type: "bytes32", - }, + "internalType": "bytes32[]", + "name": "_txIds", + "type": "bytes32[]" + } ], - name: "finalizeTransaction", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "finalizeIdlenessTxs", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [], - name: "getContracts", - outputs: [ + "inputs": [ { - components: [ - { - internalType: "contract IGenManager", - name: "genManager", - type: "address", - }, - { - internalType: "contract ITransactions", - name: "genTransactions", - type: "address", - }, - { - internalType: "contract IQueues", - name: "genQueue", - type: "address", - }, - { - internalType: "contract IGhostFactory", - name: "ghostFactory", - type: "address", - }, - { - internalType: "contract IGenStaking", - name: "genStaking", - type: "address", - }, - { - internalType: "contract IMessages", - name: "genMessages", - type: "address", - }, - { - internalType: "contract IIdleness", - name: "idleness", - type: "address", - }, - { - internalType: "contract ITribunalAppeal", - name: "tribunalAppeal", - type: "address", - }, - ], - internalType: "struct IConsensusMain.ExternalContracts", - name: "", - type: "tuple", - }, + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } ], - stateMutability: "view", - type: "function", + "name": "finalizeTransaction", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - ], - name: "getRoleAdmin", - outputs: [ + "inputs": [ { - internalType: "bytes32", - name: "", - type: "bytes32", - }, + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } ], - stateMutability: "view", - type: "function", + "name": "flushExternalMessages", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ - { - internalType: "address", - name: "addr", - type: "address", - }, - ], - name: "ghostContracts", - outputs: [ + "inputs": [], + "name": "getAddressManager", + "outputs": [ { - internalType: "bool", - name: "isGhost", - type: "bool", - }, + "internalType": "contract IAddressManager", + "name": "", + "type": "address" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } + ], + "name": "getPendingTransactionValue", + "outputs": [ { - internalType: "address", - name: "account", - type: "address", - }, + "internalType": "uint256", + "name": "", + "type": "uint256" + } ], - name: "grantRole", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "hasRole", - outputs: [ + "inputs": [ { - internalType: "bool", - name: "", - type: "bool", - }, + "internalType": "address", + "name": "_addressManager", + "type": "address" + } ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [], - name: "owner", - outputs: [ + "inputs": [ { - internalType: "address", - name: "", - type: "address", - }, + "internalType": "address", + "name": "addr", + "type": "address" + } ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "pendingOwner", - outputs: [ + "name": "isGhostContract", + "outputs": [ { - internalType: "address", - name: "", - type: "address", - }, + "internalType": "bool", + "name": "", + "type": "bool" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "recipient", - type: "address", - }, + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } ], - name: "proceedPendingQueueProcessing", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "leaderIdleness", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ - { - internalType: "bytes32", - name: "_txId", - type: "bytes32", - }, - { - internalType: "bytes", - name: "_txReceipt", - type: "bytes", - }, - { - internalType: "uint256", - name: "_processingBlock", - type: "uint256", - }, + "inputs": [ { - components: [ + "components": [ + { + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, { - internalType: "enum IMessages.MessageType", - name: "messageType", - type: "uint8", + "internalType": "uint256", + "name": "saltAsAValidator", + "type": "uint256" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" }, { - internalType: "uint256", - name: "value", - type: "uint256", + "internalType": "bytes32", + "name": "messagesAndOtherFieldsHash", + "type": "bytes32" }, { - internalType: "bytes", - name: "data", - type: "bytes", + "internalType": "bytes32", + "name": "otherExecutionFieldsHash", + "type": "bytes32" }, { - internalType: "bool", - name: "onAcceptance", - type: "bool", + "internalType": "enum ITransactions.VoteType", + "name": "resultValue", + "type": "uint8" }, + { + "components": [ + { + "internalType": "enum IMessages.MessageType", + "name": "messageType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "onAcceptance", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + } + ], + "internalType": "struct IMessages.SubmittedMessage[]", + "name": "messages", + "type": "tuple[]" + } ], - internalType: "struct IMessages.SubmittedMessage[]", - name: "_messages", - type: "tuple[]", - }, - { - internalType: "bytes", - name: "_vrfProof", - type: "bytes", - }, + "internalType": "struct IConsensusMain.LeaderRevealVoteParams", + "name": "leaderRevealVoteParams", + "type": "tuple" + } ], - name: "proposeReceipt", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "leaderRevealVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [], - name: "renounceOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, + "inputs": [], + "name": "pendingOwner", + "outputs": [ { - internalType: "address", - name: "callerConfirmation", - type: "address", - }, + "internalType": "address", + "name": "", + "type": "address" + } ], - name: "renounceRole", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { - internalType: "bytes32", - name: "_txId", - type: "bytes32", - }, + "inputs": [ { - internalType: "bytes32", - name: "_voteHash", - type: "bytes32", - }, - { - internalType: "enum ITribunalAppeal.TribunalVoteType", - name: "_voteType", - type: "uint8", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } ], - name: "revealTribunalAppealVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "processIdleness", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "_txId", - type: "bytes32", + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" }, { - internalType: "bytes32", - name: "_voteHash", - type: "bytes32", + "internalType": "bytes32", + "name": "_txExecutionHash", + "type": "bytes32" }, { - internalType: "enum ITransactions.VoteType", - name: "_voteType", - type: "uint8", + "internalType": "uint256", + "name": "_processingBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "_nonce", - type: "uint256", + "internalType": "address", + "name": "_operator", + "type": "address" }, { - internalType: "uint256", - name: "_validatorIndex", - type: "uint256", + "internalType": "bytes", + "name": "_eqBlocksOutputs", + "type": "bytes" }, + { + "internalType": "bytes", + "name": "_vrfProof", + "type": "bytes" + } ], - name: "revealVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "proposeReceipt", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, + "internalType": "bytes32[]", + "name": "_txIds", + "type": "bytes32[]" + } + ], + "name": "redButtonFinalize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - internalType: "address", - name: "account", - type: "address", - }, + "internalType": "address", + "name": "ghost", + "type": "address" + } ], - name: "revokeRole", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "registerGhostContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + }, { - internalType: "address", - name: "_ghostFactory", - type: "address", + "internalType": "uint256", + "name": "_tribunalIndex", + "type": "uint256" }, { - internalType: "address", - name: "_genManager", - type: "address", + "internalType": "bytes32", + "name": "_voteHash", + "type": "bytes32" }, { - internalType: "address", - name: "_genTransactions", - type: "address", + "internalType": "enum ITransactions.VoteType", + "name": "_voteType", + "type": "uint8" }, { - internalType: "address", - name: "_genQueue", - type: "address", + "internalType": "bytes32", + "name": "_otherExecutionFieldsHash", + "type": "bytes32" }, { - internalType: "address", - name: "_genStaking", - type: "address", + "internalType": "uint256", + "name": "_nonce", + "type": "uint256" + } + ], + "name": "revealTribunalAppealVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" }, { - internalType: "address", - name: "_genMessages", - type: "address", + "internalType": "bytes32", + "name": "_voteHash", + "type": "bytes32" }, { - internalType: "address", - name: "_idleness", - type: "address", + "internalType": "enum ITransactions.VoteType", + "name": "_voteType", + "type": "uint8" }, { - internalType: "address", - name: "_tribunalAppeal", - type: "address", + "internalType": "bytes32", + "name": "_otherExecutionFieldsHash", + "type": "bytes32" }, - ], - name: "setExternalContracts", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ { - internalType: "bytes32", - name: "_txId", - type: "bytes32", + "internalType": "uint256", + "name": "_nonce", + "type": "uint256" }, + { + "internalType": "uint256", + "name": "_validatorIndex", + "type": "uint256" + } ], - name: "submitAppeal", - outputs: [], - stateMutability: "payable", - type: "function", + "name": "revealVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "_txId", - type: "bytes32", - }, + "internalType": "address", + "name": "_addressManager", + "type": "address" + } ], - name: "submitSlashAppeal", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "setAddressManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes4", - name: "interfaceId", - type: "bytes4", - }, - ], - name: "supportsInterface", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } ], - stateMutability: "view", - type: "function", + "name": "submitAppeal", + "outputs": [], + "stateMutability": "payable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "newOwner", - type: "address", - }, + "internalType": "address", + "name": "newOwner", + "type": "address" + } ], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, + { + "stateMutability": "payable", + "type": "receive" + } ], bytecode: "", }; @@ -1444,2570 +1358,1965 @@ const CONSENSUS_DATA_CONTRACT = { address: "0x88B0F18613Db92Bf970FfE264E02496e20a74D16" as Address, abi: [ { - inputs: [], - name: "AccessControlBadConfirmation", - type: "error", + "inputs": [], + "name": "AccessControlBadConfirmation", + "type": "error" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "account", - type: "address", + "internalType": "address", + "name": "account", + "type": "address" }, { - internalType: "bytes32", - name: "neededRole", - type: "bytes32", - }, + "internalType": "bytes32", + "name": "neededRole", + "type": "bytes32" + } ], - name: "AccessControlUnauthorizedAccount", - type: "error", + "name": "AccessControlUnauthorizedAccount", + "type": "error" }, { - inputs: [], - name: "InvalidInitialization", - type: "error", + "inputs": [], + "name": "InvalidInitialization", + "type": "error" }, { - inputs: [], - name: "NotInitializing", - type: "error", + "inputs": [], + "name": "NotInitializing", + "type": "error" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "owner", - type: "address", - }, + "internalType": "address", + "name": "owner", + "type": "address" + } ], - name: "OwnableInvalidOwner", - type: "error", + "name": "OwnableInvalidOwner", + "type": "error" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "account", - type: "address", - }, + "internalType": "address", + "name": "account", + "type": "address" + } ], - name: "OwnableUnauthorizedAccount", - type: "error", + "name": "OwnableUnauthorizedAccount", + "type": "error" }, { - inputs: [], - name: "ReentrancyGuardReentrantCall", - type: "error", + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } ], - name: "Initialized", - type: "event", + "name": "Initialized", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" }, { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } ], - name: "OwnershipTransferStarted", - type: "event", + "name": "OwnershipTransferStarted", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" }, { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } ], - name: "OwnershipTransferred", - type: "event", + "name": "OwnershipTransferred", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "role", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - indexed: true, - internalType: "bytes32", - name: "previousAdminRole", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" }, { - indexed: true, - internalType: "bytes32", - name: "newAdminRole", - type: "bytes32", - }, + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } ], - name: "RoleAdminChanged", - type: "event", + "name": "RoleAdminChanged", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "role", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "account", - type: "address", + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" }, { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } ], - name: "RoleGranted", - type: "event", + "name": "RoleGranted", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "role", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "account", - type: "address", + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" }, { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } ], - name: "RoleRevoked", - type: "event", + "name": "RoleRevoked", + "type": "event" }, { - inputs: [], - name: "DEFAULT_ADMIN_ROLE", - outputs: [ + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ { - internalType: "bytes32", - name: "", - type: "bytes32", - }, + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: "acceptOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ - { - internalType: "bytes32", - name: "_txId", - type: "bytes32", - }, - { - internalType: "uint256", - name: "_currentTimestamp", - type: "uint256", - }, - ], - name: "canFinalize", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, + "inputs": [], + "name": "addressManager", + "outputs": [ { - internalType: "uint256", - name: "", - type: "uint256", - }, + "internalType": "contract IAddressManager", + "name": "", + "type": "address" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: "consensusMain", - outputs: [ + "inputs": [ { - internalType: "contract IConsensusMain", - name: "", - type: "address", + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" }, + { + "internalType": "uint256", + "name": "_currentTimestamp", + "type": "uint256" + } ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ + "name": "canFinalize", + "outputs": [ { - internalType: "bytes32", - name: "_tx_id", - type: "bytes32", + "internalType": "bool", + "name": "", + "type": "bool" }, - ], - name: "getLastAppealResult", - outputs: [ { - internalType: "enum ITransactions.ResultType", - name: "", - type: "uint8", + "internalType": "uint256", + "name": "", + "type": "uint256" }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "recipient", - type: "address", - }, + "internalType": "address", + "name": "recipient", + "type": "address" + } ], - name: "getLatestAcceptedTransaction", - outputs: [ + "name": "getLatestAcceptedTransaction", + "outputs": [ { - components: [ + "components": [ { - internalType: "uint256", - name: "currentTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" }, { - internalType: "address", - name: "sender", - type: "address", + "internalType": "address", + "name": "sender", + "type": "address" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "uint256", - name: "numOfInitialValidators", - type: "uint256", + "internalType": "uint256", + "name": "initialRotations", + "type": "uint256" }, { - internalType: "uint256", - name: "txSlot", - type: "uint256", + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" }, { - internalType: "uint256", - name: "createdTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "createdTimestamp", + "type": "uint256" }, { - internalType: "uint256", - name: "lastVoteTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "lastVoteTimestamp", + "type": "uint256" }, { - internalType: "bytes32", - name: "randomSeed", - type: "bytes32", + "internalType": "bytes32", + "name": "randomSeed", + "type": "bytes32" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "bytes", - name: "txData", - type: "bytes", + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" }, { - internalType: "bytes", - name: "txReceipt", - type: "bytes", + "internalType": "bytes", + "name": "txCalldata", + "type": "bytes" }, { - components: [ + "internalType": "bytes", + "name": "eqBlocksOutputs", + "type": "bytes" + }, + { + "components": [ { - internalType: "enum IMessages.MessageType", - name: "messageType", - type: "uint8", + "internalType": "enum IMessages.MessageType", + "name": "messageType", + "type": "uint8" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "uint256", - name: "value", - type: "uint256", + "internalType": "uint256", + "name": "value", + "type": "uint256" }, { - internalType: "bytes", - name: "data", - type: "bytes", + "internalType": "bytes", + "name": "data", + "type": "bytes" }, { - internalType: "bool", - name: "onAcceptance", - type: "bool", + "internalType": "bool", + "name": "onAcceptance", + "type": "bool" }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + } ], - internalType: "struct IMessages.SubmittedMessage[]", - name: "messages", - type: "tuple[]", + "internalType": "struct IMessages.SubmittedMessage[]", + "name": "messages", + "type": "tuple[]" }, { - internalType: "enum IQueues.QueueType", - name: "queueType", - type: "uint8", + "internalType": "enum IQueues.QueueType", + "name": "queueType", + "type": "uint8" }, { - internalType: "uint256", - name: "queuePosition", - type: "uint256", + "internalType": "uint256", + "name": "queuePosition", + "type": "uint256" }, { - internalType: "address", - name: "activator", - type: "address", + "internalType": "address", + "name": "activator", + "type": "address" }, { - internalType: "address", - name: "lastLeader", - type: "address", + "internalType": "address", + "name": "lastLeader", + "type": "address" }, { - internalType: "enum ITransactions.TransactionStatus", - name: "status", - type: "uint8", + "internalType": "enum ITransactions.TransactionStatus", + "name": "status", + "type": "uint8" }, { - internalType: "bytes32", - name: "txId", - type: "bytes32", + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "activationBlock", - type: "uint256", + "internalType": "uint256", + "name": "activationBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "processingBlock", - type: "uint256", + "internalType": "uint256", + "name": "processingBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "proposalBlock", - type: "uint256", - }, + "internalType": "uint256", + "name": "proposalBlock", + "type": "uint256" + } ], - internalType: "struct ITransactions.ReadStateBlockRange", - name: "readStateBlockRange", - type: "tuple", + "internalType": "struct ITransactions.ReadStateBlockRange", + "name": "readStateBlockRange", + "type": "tuple" }, { - internalType: "uint256", - name: "numOfRounds", - type: "uint256", + "internalType": "uint256", + "name": "numOfRounds", + "type": "uint256" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "round", - type: "uint256", + "internalType": "uint256", + "name": "round", + "type": "uint256" }, { - internalType: "uint256", - name: "leaderIndex", - type: "uint256", + "internalType": "uint256", + "name": "leaderIndex", + "type": "uint256" }, { - internalType: "uint256", - name: "votesCommitted", - type: "uint256", + "internalType": "uint256", + "name": "votesCommitted", + "type": "uint256" }, { - internalType: "uint256", - name: "votesRevealed", - type: "uint256", + "internalType": "uint256", + "name": "votesRevealed", + "type": "uint256" }, { - internalType: "uint256", - name: "appealBond", - type: "uint256", + "internalType": "uint256", + "name": "appealBond", + "type": "uint256" }, { - internalType: "uint256", - name: "rotationsLeft", - type: "uint256", + "internalType": "uint256", + "name": "rotationsLeft", + "type": "uint256" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "address[]", - name: "roundValidators", - type: "address[]", + "internalType": "address[]", + "name": "roundValidators", + "type": "address[]" }, { - internalType: "bytes32[]", - name: "validatorVotesHash", - type: "bytes32[]", + "internalType": "enum ITransactions.VoteType[]", + "name": "validatorVotes", + "type": "uint8[]" }, { - internalType: "enum ITransactions.VoteType[]", - name: "validatorVotes", - type: "uint8[]", + "internalType": "bytes32[]", + "name": "validatorVotesHash", + "type": "bytes32[]" }, + { + "internalType": "bytes32[]", + "name": "validatorResultHash", + "type": "bytes32[]" + } ], - internalType: "struct ITransactions.RoundData", - name: "lastRound", - type: "tuple", + "internalType": "struct ITransactions.RoundData", + "name": "lastRound", + "type": "tuple" }, + { + "internalType": "address[]", + "name": "consumedValidators", + "type": "address[]" + } ], - internalType: "struct ConsensusData.TransactionData", - name: "txData", - type: "tuple", - }, + "internalType": "struct ConsensusData.TransactionData", + "name": "inputData", + "type": "tuple" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "uint256", - name: "startIndex", - type: "uint256", + "internalType": "uint256", + "name": "startIndex", + "type": "uint256" }, { - internalType: "uint256", - name: "pageSize", - type: "uint256", - }, + "internalType": "uint256", + "name": "pageSize", + "type": "uint256" + } ], - name: "getLatestAcceptedTransactions", - outputs: [ + "name": "getLatestAcceptedTransactions", + "outputs": [ { - components: [ + "components": [ { - internalType: "uint256", - name: "currentTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" }, { - internalType: "address", - name: "sender", - type: "address", + "internalType": "address", + "name": "sender", + "type": "address" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "uint256", - name: "numOfInitialValidators", - type: "uint256", + "internalType": "uint256", + "name": "initialRotations", + "type": "uint256" }, { - internalType: "uint256", - name: "txSlot", - type: "uint256", + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" }, { - internalType: "uint256", - name: "createdTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "createdTimestamp", + "type": "uint256" }, { - internalType: "uint256", - name: "lastVoteTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "lastVoteTimestamp", + "type": "uint256" }, { - internalType: "bytes32", - name: "randomSeed", - type: "bytes32", + "internalType": "bytes32", + "name": "randomSeed", + "type": "bytes32" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "bytes", - name: "txData", - type: "bytes", + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" }, { - internalType: "bytes", - name: "txReceipt", - type: "bytes", + "internalType": "bytes", + "name": "txCalldata", + "type": "bytes" }, { - components: [ + "internalType": "bytes", + "name": "eqBlocksOutputs", + "type": "bytes" + }, + { + "components": [ { - internalType: "enum IMessages.MessageType", - name: "messageType", - type: "uint8", + "internalType": "enum IMessages.MessageType", + "name": "messageType", + "type": "uint8" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "uint256", - name: "value", - type: "uint256", + "internalType": "uint256", + "name": "value", + "type": "uint256" }, { - internalType: "bytes", - name: "data", - type: "bytes", + "internalType": "bytes", + "name": "data", + "type": "bytes" }, { - internalType: "bool", - name: "onAcceptance", - type: "bool", + "internalType": "bool", + "name": "onAcceptance", + "type": "bool" }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + } ], - internalType: "struct IMessages.SubmittedMessage[]", - name: "messages", - type: "tuple[]", + "internalType": "struct IMessages.SubmittedMessage[]", + "name": "messages", + "type": "tuple[]" }, { - internalType: "enum IQueues.QueueType", - name: "queueType", - type: "uint8", + "internalType": "enum IQueues.QueueType", + "name": "queueType", + "type": "uint8" }, { - internalType: "uint256", - name: "queuePosition", - type: "uint256", + "internalType": "uint256", + "name": "queuePosition", + "type": "uint256" }, { - internalType: "address", - name: "activator", - type: "address", + "internalType": "address", + "name": "activator", + "type": "address" }, { - internalType: "address", - name: "lastLeader", - type: "address", + "internalType": "address", + "name": "lastLeader", + "type": "address" }, { - internalType: "enum ITransactions.TransactionStatus", - name: "status", - type: "uint8", + "internalType": "enum ITransactions.TransactionStatus", + "name": "status", + "type": "uint8" }, { - internalType: "bytes32", - name: "txId", - type: "bytes32", + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "activationBlock", - type: "uint256", + "internalType": "uint256", + "name": "activationBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "processingBlock", - type: "uint256", + "internalType": "uint256", + "name": "processingBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "proposalBlock", - type: "uint256", - }, + "internalType": "uint256", + "name": "proposalBlock", + "type": "uint256" + } ], - internalType: "struct ITransactions.ReadStateBlockRange", - name: "readStateBlockRange", - type: "tuple", + "internalType": "struct ITransactions.ReadStateBlockRange", + "name": "readStateBlockRange", + "type": "tuple" }, { - internalType: "uint256", - name: "numOfRounds", - type: "uint256", + "internalType": "uint256", + "name": "numOfRounds", + "type": "uint256" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "round", - type: "uint256", + "internalType": "uint256", + "name": "round", + "type": "uint256" }, { - internalType: "uint256", - name: "leaderIndex", - type: "uint256", + "internalType": "uint256", + "name": "leaderIndex", + "type": "uint256" }, { - internalType: "uint256", - name: "votesCommitted", - type: "uint256", + "internalType": "uint256", + "name": "votesCommitted", + "type": "uint256" }, { - internalType: "uint256", - name: "votesRevealed", - type: "uint256", + "internalType": "uint256", + "name": "votesRevealed", + "type": "uint256" }, { - internalType: "uint256", - name: "appealBond", - type: "uint256", + "internalType": "uint256", + "name": "appealBond", + "type": "uint256" }, { - internalType: "uint256", - name: "rotationsLeft", - type: "uint256", + "internalType": "uint256", + "name": "rotationsLeft", + "type": "uint256" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "address[]", - name: "roundValidators", - type: "address[]", + "internalType": "address[]", + "name": "roundValidators", + "type": "address[]" }, { - internalType: "bytes32[]", - name: "validatorVotesHash", - type: "bytes32[]", + "internalType": "enum ITransactions.VoteType[]", + "name": "validatorVotes", + "type": "uint8[]" }, { - internalType: "enum ITransactions.VoteType[]", - name: "validatorVotes", - type: "uint8[]", + "internalType": "bytes32[]", + "name": "validatorVotesHash", + "type": "bytes32[]" }, + { + "internalType": "bytes32[]", + "name": "validatorResultHash", + "type": "bytes32[]" + } ], - internalType: "struct ITransactions.RoundData", - name: "lastRound", - type: "tuple", + "internalType": "struct ITransactions.RoundData", + "name": "lastRound", + "type": "tuple" }, + { + "internalType": "address[]", + "name": "consumedValidators", + "type": "address[]" + } ], - internalType: "struct ConsensusData.TransactionData[]", - name: "", - type: "tuple[]", - }, + "internalType": "struct ConsensusData.TransactionData[]", + "name": "", + "type": "tuple[]" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "recipient", - type: "address", - }, + "internalType": "address", + "name": "recipient", + "type": "address" + } ], - name: "getLatestAcceptedTxCount", - outputs: [ + "name": "getLatestAcceptedTxCount", + "outputs": [ { - internalType: "uint256", - name: "", - type: "uint256", - }, + "internalType": "uint256", + "name": "", + "type": "uint256" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "recipient", - type: "address", - }, + "internalType": "address", + "name": "recipient", + "type": "address" + } ], - name: "getLatestFinalizedTransaction", - outputs: [ + "name": "getLatestFinalizedTransaction", + "outputs": [ { - components: [ + "components": [ + { + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" + }, { - internalType: "uint256", - name: "currentTimestamp", - type: "uint256", + "internalType": "address", + "name": "sender", + "type": "address" }, { - internalType: "address", - name: "sender", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "uint256", + "name": "initialRotations", + "type": "uint256" }, { - internalType: "uint256", - name: "numOfInitialValidators", - type: "uint256", + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" }, { - internalType: "uint256", - name: "txSlot", - type: "uint256", + "internalType": "uint256", + "name": "createdTimestamp", + "type": "uint256" }, { - internalType: "uint256", - name: "createdTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "lastVoteTimestamp", + "type": "uint256" }, { - internalType: "uint256", - name: "lastVoteTimestamp", - type: "uint256", + "internalType": "bytes32", + "name": "randomSeed", + "type": "bytes32" }, { - internalType: "bytes32", - name: "randomSeed", - type: "bytes32", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" }, { - internalType: "bytes", - name: "txData", - type: "bytes", + "internalType": "bytes", + "name": "txCalldata", + "type": "bytes" }, { - internalType: "bytes", - name: "txReceipt", - type: "bytes", + "internalType": "bytes", + "name": "eqBlocksOutputs", + "type": "bytes" }, { - components: [ + "components": [ { - internalType: "enum IMessages.MessageType", - name: "messageType", - type: "uint8", + "internalType": "enum IMessages.MessageType", + "name": "messageType", + "type": "uint8" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "uint256", - name: "value", - type: "uint256", + "internalType": "uint256", + "name": "value", + "type": "uint256" }, { - internalType: "bytes", - name: "data", - type: "bytes", + "internalType": "bytes", + "name": "data", + "type": "bytes" }, { - internalType: "bool", - name: "onAcceptance", - type: "bool", + "internalType": "bool", + "name": "onAcceptance", + "type": "bool" }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + } ], - internalType: "struct IMessages.SubmittedMessage[]", - name: "messages", - type: "tuple[]", + "internalType": "struct IMessages.SubmittedMessage[]", + "name": "messages", + "type": "tuple[]" }, { - internalType: "enum IQueues.QueueType", - name: "queueType", - type: "uint8", + "internalType": "enum IQueues.QueueType", + "name": "queueType", + "type": "uint8" }, { - internalType: "uint256", - name: "queuePosition", - type: "uint256", + "internalType": "uint256", + "name": "queuePosition", + "type": "uint256" }, { - internalType: "address", - name: "activator", - type: "address", + "internalType": "address", + "name": "activator", + "type": "address" }, { - internalType: "address", - name: "lastLeader", - type: "address", + "internalType": "address", + "name": "lastLeader", + "type": "address" }, { - internalType: "enum ITransactions.TransactionStatus", - name: "status", - type: "uint8", + "internalType": "enum ITransactions.TransactionStatus", + "name": "status", + "type": "uint8" }, { - internalType: "bytes32", - name: "txId", - type: "bytes32", + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "activationBlock", - type: "uint256", + "internalType": "uint256", + "name": "activationBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "processingBlock", - type: "uint256", + "internalType": "uint256", + "name": "processingBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "proposalBlock", - type: "uint256", - }, + "internalType": "uint256", + "name": "proposalBlock", + "type": "uint256" + } ], - internalType: "struct ITransactions.ReadStateBlockRange", - name: "readStateBlockRange", - type: "tuple", + "internalType": "struct ITransactions.ReadStateBlockRange", + "name": "readStateBlockRange", + "type": "tuple" }, { - internalType: "uint256", - name: "numOfRounds", - type: "uint256", + "internalType": "uint256", + "name": "numOfRounds", + "type": "uint256" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "round", - type: "uint256", + "internalType": "uint256", + "name": "round", + "type": "uint256" }, { - internalType: "uint256", - name: "leaderIndex", - type: "uint256", + "internalType": "uint256", + "name": "leaderIndex", + "type": "uint256" }, { - internalType: "uint256", - name: "votesCommitted", - type: "uint256", + "internalType": "uint256", + "name": "votesCommitted", + "type": "uint256" }, { - internalType: "uint256", - name: "votesRevealed", - type: "uint256", + "internalType": "uint256", + "name": "votesRevealed", + "type": "uint256" }, { - internalType: "uint256", - name: "appealBond", - type: "uint256", + "internalType": "uint256", + "name": "appealBond", + "type": "uint256" }, { - internalType: "uint256", - name: "rotationsLeft", - type: "uint256", + "internalType": "uint256", + "name": "rotationsLeft", + "type": "uint256" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "address[]", - name: "roundValidators", - type: "address[]", + "internalType": "address[]", + "name": "roundValidators", + "type": "address[]" }, { - internalType: "bytes32[]", - name: "validatorVotesHash", - type: "bytes32[]", + "internalType": "enum ITransactions.VoteType[]", + "name": "validatorVotes", + "type": "uint8[]" }, { - internalType: "enum ITransactions.VoteType[]", - name: "validatorVotes", - type: "uint8[]", + "internalType": "bytes32[]", + "name": "validatorVotesHash", + "type": "bytes32[]" }, + { + "internalType": "bytes32[]", + "name": "validatorResultHash", + "type": "bytes32[]" + } ], - internalType: "struct ITransactions.RoundData", - name: "lastRound", - type: "tuple", + "internalType": "struct ITransactions.RoundData", + "name": "lastRound", + "type": "tuple" }, + { + "internalType": "address[]", + "name": "consumedValidators", + "type": "address[]" + } ], - internalType: "struct ConsensusData.TransactionData", - name: "txData", - type: "tuple", - }, + "internalType": "struct ConsensusData.TransactionData", + "name": "inputData", + "type": "tuple" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "uint256", - name: "startIndex", - type: "uint256", + "internalType": "uint256", + "name": "startIndex", + "type": "uint256" }, { - internalType: "uint256", - name: "pageSize", - type: "uint256", - }, + "internalType": "uint256", + "name": "pageSize", + "type": "uint256" + } ], - name: "getLatestFinalizedTransactions", - outputs: [ + "name": "getLatestFinalizedTransactions", + "outputs": [ { - components: [ + "components": [ { - internalType: "uint256", - name: "currentTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" }, { - internalType: "address", - name: "sender", - type: "address", + "internalType": "address", + "name": "sender", + "type": "address" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "uint256", - name: "numOfInitialValidators", - type: "uint256", + "internalType": "uint256", + "name": "initialRotations", + "type": "uint256" }, { - internalType: "uint256", - name: "txSlot", - type: "uint256", + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" }, { - internalType: "uint256", - name: "createdTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "createdTimestamp", + "type": "uint256" }, { - internalType: "uint256", - name: "lastVoteTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "lastVoteTimestamp", + "type": "uint256" }, { - internalType: "bytes32", - name: "randomSeed", - type: "bytes32", + "internalType": "bytes32", + "name": "randomSeed", + "type": "bytes32" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "bytes", - name: "txData", - type: "bytes", + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" }, { - internalType: "bytes", - name: "txReceipt", - type: "bytes", + "internalType": "bytes", + "name": "txCalldata", + "type": "bytes" }, { - components: [ + "internalType": "bytes", + "name": "eqBlocksOutputs", + "type": "bytes" + }, + { + "components": [ { - internalType: "enum IMessages.MessageType", - name: "messageType", - type: "uint8", + "internalType": "enum IMessages.MessageType", + "name": "messageType", + "type": "uint8" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "uint256", - name: "value", - type: "uint256", + "internalType": "uint256", + "name": "value", + "type": "uint256" }, { - internalType: "bytes", - name: "data", - type: "bytes", + "internalType": "bytes", + "name": "data", + "type": "bytes" }, { - internalType: "bool", - name: "onAcceptance", - type: "bool", + "internalType": "bool", + "name": "onAcceptance", + "type": "bool" }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + } ], - internalType: "struct IMessages.SubmittedMessage[]", - name: "messages", - type: "tuple[]", + "internalType": "struct IMessages.SubmittedMessage[]", + "name": "messages", + "type": "tuple[]" }, { - internalType: "enum IQueues.QueueType", - name: "queueType", - type: "uint8", + "internalType": "enum IQueues.QueueType", + "name": "queueType", + "type": "uint8" }, { - internalType: "uint256", - name: "queuePosition", - type: "uint256", + "internalType": "uint256", + "name": "queuePosition", + "type": "uint256" }, { - internalType: "address", - name: "activator", - type: "address", + "internalType": "address", + "name": "activator", + "type": "address" }, { - internalType: "address", - name: "lastLeader", - type: "address", + "internalType": "address", + "name": "lastLeader", + "type": "address" }, { - internalType: "enum ITransactions.TransactionStatus", - name: "status", - type: "uint8", + "internalType": "enum ITransactions.TransactionStatus", + "name": "status", + "type": "uint8" }, { - internalType: "bytes32", - name: "txId", - type: "bytes32", + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "activationBlock", - type: "uint256", + "internalType": "uint256", + "name": "activationBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "processingBlock", - type: "uint256", + "internalType": "uint256", + "name": "processingBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "proposalBlock", - type: "uint256", - }, + "internalType": "uint256", + "name": "proposalBlock", + "type": "uint256" + } ], - internalType: "struct ITransactions.ReadStateBlockRange", - name: "readStateBlockRange", - type: "tuple", + "internalType": "struct ITransactions.ReadStateBlockRange", + "name": "readStateBlockRange", + "type": "tuple" }, { - internalType: "uint256", - name: "numOfRounds", - type: "uint256", + "internalType": "uint256", + "name": "numOfRounds", + "type": "uint256" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "round", - type: "uint256", + "internalType": "uint256", + "name": "round", + "type": "uint256" }, { - internalType: "uint256", - name: "leaderIndex", - type: "uint256", + "internalType": "uint256", + "name": "leaderIndex", + "type": "uint256" }, { - internalType: "uint256", - name: "votesCommitted", - type: "uint256", + "internalType": "uint256", + "name": "votesCommitted", + "type": "uint256" }, { - internalType: "uint256", - name: "votesRevealed", - type: "uint256", + "internalType": "uint256", + "name": "votesRevealed", + "type": "uint256" }, { - internalType: "uint256", - name: "appealBond", - type: "uint256", + "internalType": "uint256", + "name": "appealBond", + "type": "uint256" }, { - internalType: "uint256", - name: "rotationsLeft", - type: "uint256", + "internalType": "uint256", + "name": "rotationsLeft", + "type": "uint256" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "address[]", - name: "roundValidators", - type: "address[]", + "internalType": "address[]", + "name": "roundValidators", + "type": "address[]" }, { - internalType: "bytes32[]", - name: "validatorVotesHash", - type: "bytes32[]", + "internalType": "enum ITransactions.VoteType[]", + "name": "validatorVotes", + "type": "uint8[]" }, { - internalType: "enum ITransactions.VoteType[]", - name: "validatorVotes", - type: "uint8[]", + "internalType": "bytes32[]", + "name": "validatorVotesHash", + "type": "bytes32[]" }, + { + "internalType": "bytes32[]", + "name": "validatorResultHash", + "type": "bytes32[]" + } ], - internalType: "struct ITransactions.RoundData", - name: "lastRound", - type: "tuple", + "internalType": "struct ITransactions.RoundData", + "name": "lastRound", + "type": "tuple" }, + { + "internalType": "address[]", + "name": "consumedValidators", + "type": "address[]" + } ], - internalType: "struct ConsensusData.TransactionData[]", - name: "", - type: "tuple[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "recipient", - type: "address", - }, - ], - name: "getLatestFinalizedTxCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, + "internalType": "struct ConsensusData.TransactionData[]", + "name": "", + "type": "tuple[]" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "recipient", - type: "address", - }, + "internalType": "address", + "name": "recipient", + "type": "address" + } ], - name: "getLatestPendingTxCount", - outputs: [ + "name": "getLatestFinalizedTxCount", + "outputs": [ { - internalType: "uint256", - name: "", - type: "uint256", - }, + "internalType": "uint256", + "name": "", + "type": "uint256" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { - internalType: "address", - name: "recipient", - type: "address", - }, + "inputs": [ { - internalType: "uint256", - name: "slot", - type: "uint256", - }, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } ], - name: "getLatestPendingTxId", - outputs: [ + "name": "getRoleAdmin", + "outputs": [ { - internalType: "bytes32", - name: "", - type: "bytes32", - }, + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "recipient", - type: "address", - }, + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } ], - name: "getLatestUndeterminedTransaction", - outputs: [ + "name": "getTransactionAllData", + "outputs": [ { - components: [ + "components": [ { - internalType: "uint256", - name: "currentTimestamp", - type: "uint256", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "address", - name: "sender", - type: "address", + "internalType": "enum ITransactions.VoteType", + "name": "txExecutionResult", + "type": "uint8" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "enum ITransactions.TransactionStatus", + "name": "previousStatus", + "type": "uint8" }, { - internalType: "uint256", - name: "numOfInitialValidators", - type: "uint256", + "internalType": "enum ITransactions.TransactionStatus", + "name": "status", + "type": "uint8" }, { - internalType: "uint256", - name: "txSlot", - type: "uint256", + "internalType": "address", + "name": "txOrigin", + "type": "address" }, { - internalType: "uint256", - name: "createdTimestamp", - type: "uint256", + "internalType": "address", + "name": "sender", + "type": "address" }, { - internalType: "uint256", - name: "lastVoteTimestamp", - type: "uint256", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "bytes32", - name: "randomSeed", - type: "bytes32", + "internalType": "address", + "name": "activator", + "type": "address" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" }, { - internalType: "bytes", - name: "txData", - type: "bytes", + "internalType": "uint256", + "name": "initialRotations", + "type": "uint256" }, { - internalType: "bytes", - name: "txReceipt", - type: "bytes", + "internalType": "uint256", + "name": "numOfInitialValidators", + "type": "uint256" }, { - components: [ - { - internalType: "enum IMessages.MessageType", - name: "messageType", - type: "uint8", - }, - { - internalType: "address", - name: "recipient", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "bool", - name: "onAcceptance", - type: "bool", - }, - ], - internalType: "struct IMessages.SubmittedMessage[]", - name: "messages", - type: "tuple[]", + "internalType": "uint256", + "name": "epoch", + "type": "uint256" }, { - internalType: "enum IQueues.QueueType", - name: "queueType", - type: "uint8", + "internalType": "bytes32", + "name": "id", + "type": "bytes32" }, { - internalType: "uint256", - name: "queuePosition", - type: "uint256", + "internalType": "bytes32", + "name": "randomSeed", + "type": "bytes32" }, { - internalType: "address", - name: "activator", - type: "address", + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" }, { - internalType: "address", - name: "lastLeader", - type: "address", + "internalType": "bytes32", + "name": "resultHash", + "type": "bytes32" }, { - internalType: "enum ITransactions.TransactionStatus", - name: "status", - type: "uint8", + "internalType": "bytes", + "name": "txCalldata", + "type": "bytes" }, { - internalType: "bytes32", - name: "txId", - type: "bytes32", + "internalType": "bytes", + "name": "eqBlocksOutputs", + "type": "bytes" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "activationBlock", - type: "uint256", + "internalType": "uint256", + "name": "activationBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "processingBlock", - type: "uint256", + "internalType": "uint256", + "name": "processingBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "proposalBlock", - type: "uint256", - }, + "internalType": "uint256", + "name": "proposalBlock", + "type": "uint256" + } ], - internalType: "struct ITransactions.ReadStateBlockRange", - name: "readStateBlockRange", - type: "tuple", + "internalType": "struct ITransactions.ReadStateBlockRange[]", + "name": "readStateBlockRanges", + "type": "tuple[]" }, { - internalType: "uint256", - name: "numOfRounds", - type: "uint256", + "internalType": "uint256", + "name": "validUntil", + "type": "uint256" }, { - components: [ - { - internalType: "uint256", - name: "round", - type: "uint256", - }, - { - internalType: "uint256", - name: "leaderIndex", - type: "uint256", - }, - { - internalType: "uint256", - name: "votesCommitted", - type: "uint256", - }, - { - internalType: "uint256", - name: "votesRevealed", - type: "uint256", - }, - { - internalType: "uint256", - name: "appealBond", - type: "uint256", - }, - { - internalType: "uint256", - name: "rotationsLeft", - type: "uint256", - }, - { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", - }, - { - internalType: "address[]", - name: "roundValidators", - type: "address[]", - }, - { - internalType: "bytes32[]", - name: "validatorVotesHash", - type: "bytes32[]", - }, - { - internalType: "enum ITransactions.VoteType[]", - name: "validatorVotes", - type: "uint8[]", - }, - ], - internalType: "struct ITransactions.RoundData", - name: "lastRound", - type: "tuple", - }, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } ], - internalType: "struct ConsensusData.TransactionData", - name: "txData", - type: "tuple", + "internalType": "struct ITransactions.Transaction", + "name": "transaction", + "type": "tuple" }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "recipient", - type: "address", - }, - ], - name: "getLatestUndeterminedTxCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { - internalType: "bytes32", - name: "_tx_id", - type: "bytes32", - }, - ], - name: "getMessagesForTransaction", - outputs: [ - { - components: [ + "components": [ { - internalType: "enum IMessages.MessageType", - name: "messageType", - type: "uint8", + "internalType": "uint256", + "name": "round", + "type": "uint256" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "uint256", + "name": "leaderIndex", + "type": "uint256" }, { - internalType: "uint256", - name: "value", - type: "uint256", + "internalType": "uint256", + "name": "votesCommitted", + "type": "uint256" }, { - internalType: "bytes", - name: "data", - type: "bytes", + "internalType": "uint256", + "name": "votesRevealed", + "type": "uint256" }, { - internalType: "bool", - name: "onAcceptance", - type: "bool", - }, - ], - internalType: "struct IMessages.SubmittedMessage[]", - name: "", - type: "tuple[]", - }, - { - internalType: "address", - name: "ghostAddress", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_tx_id", - type: "bytes32", - }, - ], - name: "getReadStateBlockRangeForTransaction", - outputs: [ - { - internalType: "uint256", - name: "activationBlock", - type: "uint256", - }, - { - internalType: "uint256", - name: "processingBlock", - type: "uint256", - }, - { - internalType: "uint256", - name: "proposalBlock", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "recipient", - type: "address", - }, - { - internalType: "uint256", - name: "startIndex", - type: "uint256", - }, - { - internalType: "uint256", - name: "endIndex", - type: "uint256", - }, - ], - name: "getRecipientQueues", - outputs: [ - { - components: [ - { - components: [ - { - internalType: "uint256", - name: "head", - type: "uint256", - }, - { - internalType: "uint256", - name: "tail", - type: "uint256", - }, - { - internalType: "bytes32[]", - name: "txIds", - type: "bytes32[]", - }, - ], - internalType: "struct IQueues.QueueInfoView", - name: "pending", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "head", - type: "uint256", - }, - { - internalType: "uint256", - name: "tail", - type: "uint256", - }, - { - internalType: "bytes32[]", - name: "txIds", - type: "bytes32[]", - }, - ], - internalType: "struct IQueues.QueueInfoView", - name: "accepted", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "head", - type: "uint256", - }, - { - internalType: "uint256", - name: "tail", - type: "uint256", - }, - { - internalType: "bytes32[]", - name: "txIds", - type: "bytes32[]", - }, - ], - internalType: "struct IQueues.QueueInfoView", - name: "undetermined", - type: "tuple", + "internalType": "uint256", + "name": "appealBond", + "type": "uint256" }, { - internalType: "uint256", - name: "finalizedCount", - type: "uint256", + "internalType": "uint256", + "name": "rotationsLeft", + "type": "uint256" }, { - internalType: "uint256", - name: "issuedTxCount", - type: "uint256", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, - ], - internalType: "struct IQueues.RecipientQueuesView", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - ], - name: "getRoleAdmin", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getTotalNumOfTransactions", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_tx_id", - type: "bytes32", - }, - ], - name: "getTransactionAllData", - outputs: [ - { - components: [ { - internalType: "bytes32", - name: "id", - type: "bytes32", + "internalType": "address[]", + "name": "roundValidators", + "type": "address[]" }, { - internalType: "address", - name: "sender", - type: "address", + "internalType": "enum ITransactions.VoteType[]", + "name": "validatorVotes", + "type": "uint8[]" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "bytes32[]", + "name": "validatorVotesHash", + "type": "bytes32[]" }, { - internalType: "uint256", - name: "numOfInitialValidators", - type: "uint256", - }, - { - internalType: "uint256", - name: "txSlot", - type: "uint256", - }, - { - internalType: "address", - name: "activator", - type: "address", - }, - { - internalType: "enum ITransactions.TransactionStatus", - name: "status", - type: "uint8", - }, - { - internalType: "enum ITransactions.TransactionStatus", - name: "previousStatus", - type: "uint8", - }, - { - components: [ - { - internalType: "uint256", - name: "created", - type: "uint256", - }, - { - internalType: "uint256", - name: "pending", - type: "uint256", - }, - { - internalType: "uint256", - name: "activated", - type: "uint256", - }, - { - internalType: "uint256", - name: "proposed", - type: "uint256", - }, - { - internalType: "uint256", - name: "committed", - type: "uint256", - }, - { - internalType: "uint256", - name: "lastVote", - type: "uint256", - }, - { - internalType: "uint256", - name: "appealSubmitted", - type: "uint256", - }, - ], - internalType: "struct ITransactions.Timestamps", - name: "timestamps", - type: "tuple", - }, - { - internalType: "bytes32", - name: "randomSeed", - type: "bytes32", - }, - { - internalType: "bool", - name: "onAcceptanceMessages", - type: "bool", - }, - { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", - }, - { - components: [ - { - internalType: "uint256", - name: "activationBlock", - type: "uint256", - }, - { - internalType: "uint256", - name: "processingBlock", - type: "uint256", - }, - { - internalType: "uint256", - name: "proposalBlock", - type: "uint256", - }, - ], - internalType: "struct ITransactions.ReadStateBlockRange", - name: "readStateBlockRange", - type: "tuple", - }, - { - internalType: "bytes", - name: "txData", - type: "bytes", - }, - { - internalType: "bytes", - name: "txReceipt", - type: "bytes", - }, - { - components: [ - { - internalType: "enum IMessages.MessageType", - name: "messageType", - type: "uint8", - }, - { - internalType: "address", - name: "recipient", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "bool", - name: "onAcceptance", - type: "bool", - }, - ], - internalType: "struct IMessages.SubmittedMessage[]", - name: "messages", - type: "tuple[]", - }, - { - internalType: "address[]", - name: "consumedValidators", - type: "address[]", - }, - { - components: [ - { - internalType: "uint256", - name: "round", - type: "uint256", - }, - { - internalType: "uint256", - name: "leaderIndex", - type: "uint256", - }, - { - internalType: "uint256", - name: "votesCommitted", - type: "uint256", - }, - { - internalType: "uint256", - name: "votesRevealed", - type: "uint256", - }, - { - internalType: "uint256", - name: "appealBond", - type: "uint256", - }, - { - internalType: "uint256", - name: "rotationsLeft", - type: "uint256", - }, - { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", - }, - { - internalType: "address[]", - name: "roundValidators", - type: "address[]", - }, - { - internalType: "bytes32[]", - name: "validatorVotesHash", - type: "bytes32[]", - }, - { - internalType: "enum ITransactions.VoteType[]", - name: "validatorVotes", - type: "uint8[]", - }, - ], - internalType: "struct ITransactions.RoundData[]", - name: "roundData", - type: "tuple[]", - }, + "internalType": "bytes32[]", + "name": "validatorResultHash", + "type": "bytes32[]" + } ], - internalType: "struct ITransactions.Transaction", - name: "transaction", - type: "tuple", - }, + "internalType": "struct ITransactions.RoundData[]", + "name": "roundsData", + "type": "tuple[]" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "_txId", - type: "bytes32", + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" }, { - internalType: "uint256", - name: "_timestamp", - type: "uint256", - }, + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } ], - name: "getTransactionData", - outputs: [ + "name": "getTransactionData", + "outputs": [ { - components: [ + "components": [ { - internalType: "uint256", - name: "currentTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" }, { - internalType: "address", - name: "sender", - type: "address", + "internalType": "address", + "name": "sender", + "type": "address" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "uint256", - name: "initialRotations", - type: "uint256", + "internalType": "uint256", + "name": "initialRotations", + "type": "uint256" }, { - internalType: "uint256", - name: "txSlot", - type: "uint256", + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" }, { - internalType: "uint256", - name: "createdTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "createdTimestamp", + "type": "uint256" }, { - internalType: "uint256", - name: "lastVoteTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "lastVoteTimestamp", + "type": "uint256" }, { - internalType: "bytes32", - name: "randomSeed", - type: "bytes32", + "internalType": "bytes32", + "name": "randomSeed", + "type": "bytes32" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "bytes32", - name: "txExecutionHash", - type: "bytes32", + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" }, { - internalType: "bytes", - name: "txCalldata", - type: "bytes", + "internalType": "bytes", + "name": "txCalldata", + "type": "bytes" }, { - internalType: "bytes", - name: "eqBlocksOutputs", - type: "bytes", + "internalType": "bytes", + "name": "eqBlocksOutputs", + "type": "bytes" }, { - components: [ + "components": [ { - internalType: "enum IMessages.MessageType", - name: "messageType", - type: "uint8", + "internalType": "enum IMessages.MessageType", + "name": "messageType", + "type": "uint8" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "uint256", - name: "value", - type: "uint256", + "internalType": "uint256", + "name": "value", + "type": "uint256" }, { - internalType: "bytes", - name: "data", - type: "bytes", + "internalType": "bytes", + "name": "data", + "type": "bytes" }, { - internalType: "bool", - name: "onAcceptance", - type: "bool", + "internalType": "bool", + "name": "onAcceptance", + "type": "bool" }, { - internalType: "uint256", - name: "saltNonce", - type: "uint256", - }, + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + } ], - internalType: "struct IMessages.SubmittedMessage[]", - name: "messages", - type: "tuple[]", + "internalType": "struct IMessages.SubmittedMessage[]", + "name": "messages", + "type": "tuple[]" }, { - internalType: "enum IQueues.QueueType", - name: "queueType", - type: "uint8", + "internalType": "enum IQueues.QueueType", + "name": "queueType", + "type": "uint8" }, { - internalType: "uint256", - name: "queuePosition", - type: "uint256", + "internalType": "uint256", + "name": "queuePosition", + "type": "uint256" }, { - internalType: "address", - name: "activator", - type: "address", + "internalType": "address", + "name": "activator", + "type": "address" }, { - internalType: "address", - name: "lastLeader", - type: "address", + "internalType": "address", + "name": "lastLeader", + "type": "address" }, { - internalType: "enum ITransactions.TransactionStatus", - name: "status", - type: "uint8", + "internalType": "enum ITransactions.TransactionStatus", + "name": "status", + "type": "uint8" }, { - internalType: "bytes32", - name: "txId", - type: "bytes32", + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "activationBlock", - type: "uint256", + "internalType": "uint256", + "name": "activationBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "processingBlock", - type: "uint256", + "internalType": "uint256", + "name": "processingBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "proposalBlock", - type: "uint256", - }, + "internalType": "uint256", + "name": "proposalBlock", + "type": "uint256" + } ], - internalType: "struct ITransactions.ReadStateBlockRange", - name: "readStateBlockRange", - type: "tuple", + "internalType": "struct ITransactions.ReadStateBlockRange", + "name": "readStateBlockRange", + "type": "tuple" }, { - internalType: "uint256", - name: "numOfRounds", - type: "uint256", + "internalType": "uint256", + "name": "numOfRounds", + "type": "uint256" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "round", - type: "uint256", + "internalType": "uint256", + "name": "round", + "type": "uint256" }, { - internalType: "uint256", - name: "leaderIndex", - type: "uint256", + "internalType": "uint256", + "name": "leaderIndex", + "type": "uint256" }, { - internalType: "uint256", - name: "votesCommitted", - type: "uint256", + "internalType": "uint256", + "name": "votesCommitted", + "type": "uint256" }, { - internalType: "uint256", - name: "votesRevealed", - type: "uint256", + "internalType": "uint256", + "name": "votesRevealed", + "type": "uint256" }, { - internalType: "uint256", - name: "appealBond", - type: "uint256", + "internalType": "uint256", + "name": "appealBond", + "type": "uint256" }, { - internalType: "uint256", - name: "rotationsLeft", - type: "uint256", + "internalType": "uint256", + "name": "rotationsLeft", + "type": "uint256" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "address[]", - name: "roundValidators", - type: "address[]", + "internalType": "address[]", + "name": "roundValidators", + "type": "address[]" }, { - internalType: "enum ITransactions.VoteType[]", - name: "validatorVotes", - type: "uint8[]", + "internalType": "enum ITransactions.VoteType[]", + "name": "validatorVotes", + "type": "uint8[]" }, { - internalType: "bytes32[]", - name: "validatorVotesHash", - type: "bytes32[]", + "internalType": "bytes32[]", + "name": "validatorVotesHash", + "type": "bytes32[]" }, { - internalType: "bytes32[]", - name: "validatorResultHash", - type: "bytes32[]", - }, + "internalType": "bytes32[]", + "name": "validatorResultHash", + "type": "bytes32[]" + } ], - internalType: "struct ITransactions.RoundData", - name: "lastRound", - type: "tuple", + "internalType": "struct ITransactions.RoundData", + "name": "lastRound", + "type": "tuple" }, { - internalType: "address[]", - name: "consumedValidators", - type: "address[]", - }, + "internalType": "address[]", + "name": "consumedValidators", + "type": "address[]" + } ], - internalType: "struct ConsensusData.TransactionData", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "uint256", - name: "startIndex", - type: "uint256", - }, - { - internalType: "uint256", - name: "endIndex", - type: "uint256", - }, + "internalType": "struct ConsensusData.TransactionData", + "name": "", + "type": "tuple" + } ], - name: "getTransactionIndexToTxId", - outputs: [ - { - internalType: "bytes32[]", - name: "", - type: "bytes32[]", - }, - ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "_tx_id", - type: "bytes32", + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" }, { - internalType: "uint256", - name: "_timestamp", - type: "uint256", - }, + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } ], - name: "getTransactionStatus", - outputs: [ + "name": "getTransactionStatus", + "outputs": [ { - internalType: "enum ITransactions.TransactionStatus", - name: "", - type: "uint8", - }, + "internalType": "enum ITransactions.TransactionStatus", + "name": "", + "type": "uint8" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { - internalType: "bytes32", - name: "_tx_id", - type: "bytes32", - }, - ], - name: "getValidatorsForLastAppeal", - outputs: [ - { - internalType: "address[]", - name: "", - type: "address[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_tx_id", - type: "bytes32", - }, - ], - name: "getValidatorsForLastRound", - outputs: [ - { - internalType: "address[]", - name: "", - type: "address[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "grantRole", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, + "inputs": [ { - internalType: "address", - name: "account", - type: "address", - }, + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } ], - name: "hasRole", - outputs: [ + "name": "getValidatorsForLastRound", + "outputs": [ { - internalType: "bool", - name: "", - type: "bool", - }, + "internalType": "address[]", + "name": "validators", + "type": "address[]" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "_tx_id", - type: "bytes32", + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, - ], - name: "hasTransactionOnAcceptanceMessages", - outputs: [ { - internalType: "bool", - name: "", - type: "bool", - }, + "internalType": "address", + "name": "account", + "type": "address" + } ], - stateMutability: "view", - type: "function", + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "_tx_id", - type: "bytes32", + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, - ], - name: "hasTransactionOnFinalizationMessages", - outputs: [ { - internalType: "bool", - name: "", - type: "bool", - }, + "internalType": "address", + "name": "account", + "type": "address" + } ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_consensusMain", - type: "address", - }, - { - internalType: "address", - name: "_transactions", - type: "address", - }, + "name": "hasRole", + "outputs": [ { - internalType: "address", - name: "_queues", - type: "address", - }, + "internalType": "bool", + "name": "", + "type": "bool" + } ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: "owner", - outputs: [ + "inputs": [ { - internalType: "address", - name: "", - type: "address", - }, + "internalType": "address", + "name": "_addressManager", + "type": "address" + } ], - stateMutability: "view", - type: "function", + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [], - name: "pendingOwner", - outputs: [ + "inputs": [], + "name": "owner", + "outputs": [ { - internalType: "address", - name: "", - type: "address", - }, + "internalType": "address", + "name": "", + "type": "address" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: "queues", - outputs: [ + "inputs": [], + "name": "pendingOwner", + "outputs": [ { - internalType: "contract IQueues", - name: "", - type: "address", - }, + "internalType": "address", + "name": "", + "type": "address" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: "renounceOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "role", - type: "bytes32", + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - internalType: "address", - name: "callerConfirmation", - type: "address", - }, + "internalType": "address", + "name": "callerConfirmation", + "type": "address" + } ], - name: "renounceRole", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "role", - type: "bytes32", + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - internalType: "address", - name: "account", - type: "address", - }, + "internalType": "address", + "name": "account", + "type": "address" + } ], - name: "revokeRole", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "_consensusMain", - type: "address", - }, + "internalType": "address", + "name": "_addressManager", + "type": "address" + } ], - name: "setConsensusMain", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "setAddressManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "_queues", - type: "address", - }, + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } ], - name: "setQueues", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ + "name": "supportsInterface", + "outputs": [ { - internalType: "address", - name: "_transactions", - type: "address", - }, + "internalType": "bool", + "name": "", + "type": "bool" + } ], - name: "setTransactions", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { - internalType: "bytes4", - name: "interfaceId", - type: "bytes4", - }, - ], - name: "supportsInterface", - outputs: [ + "inputs": [ { - internalType: "bool", - name: "", - type: "bool", - }, + "internalType": "address", + "name": "newOwner", + "type": "address" + } ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "transactions", - outputs: [ - { - internalType: "contract ITransactions", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } ], bytecode: "", }; diff --git a/src/chains/studionet.ts b/src/chains/studionet.ts index f7476e8..059af24 100644 --- a/src/chains/studionet.ts +++ b/src/chains/studionet.ts @@ -8,1430 +8,1349 @@ const CONSENSUS_MAIN_CONTRACT = { address: "0xb7278A61aa25c888815aFC32Ad3cC52fF24fE575" as Address, abi: [ { - inputs: [], - name: "AccessControlBadConfirmation", - type: "error", + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" }, { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "neededRole", - type: "bytes32", - }, - ], - name: "AccessControlUnauthorizedAccount", - type: "error", + "inputs": [], + "name": "CallerNotMessages", + "type": "error" + }, + { + "inputs": [], + "name": "CanNotAppeal", + "type": "error" }, { - inputs: [], - name: "CallerNotMessages", - type: "error", + "inputs": [], + "name": "InvalidDeploymentWithSalt", + "type": "error" }, { - inputs: [], - name: "CanNotAppeal", - type: "error", + "inputs": [], + "name": "InvalidGhostContract", + "type": "error" }, { - inputs: [], - name: "EmptyTransaction", - type: "error", + "inputs": [], + "name": "InvalidInitialization", + "type": "error" }, { - inputs: [], - name: "FinalizationNotAllowed", - type: "error", + "inputs": [], + "name": "InvalidRevealLeaderData", + "type": "error" }, { - inputs: [], - name: "InvalidAddress", - type: "error", + "inputs": [], + "name": "InvalidVote", + "type": "error" }, { - inputs: [], - name: "InvalidGhostContract", - type: "error", + "inputs": [], + "name": "NotInitializing", + "type": "error" }, { - inputs: [], - name: "InvalidInitialization", - type: "error", + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" }, { - inputs: [], - name: "InvalidVote", - type: "error", + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" }, { - inputs: [], - name: "MaxNumOfIterationsInPendingQueueReached", - type: "error", + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" }, { - inputs: [ + "anonymous": false, + "inputs": [ { - internalType: "uint256", - name: "numOfMessages", - type: "uint256", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - internalType: "uint256", - name: "maxAllocatedMessages", - type: "uint256", + "indexed": true, + "internalType": "address", + "name": "oldActivator", + "type": "address" }, + { + "indexed": true, + "internalType": "address", + "name": "newActivator", + "type": "address" + } ], - name: "MaxNumOfMessagesExceeded", - type: "error", - }, - { - inputs: [], - name: "NonGenVMContract", - type: "error", - }, - { - inputs: [], - name: "NotInitializing", - type: "error", + "name": "ActivatorReplaced", + "type": "event" }, { - inputs: [ + "anonymous": false, + "inputs": [ { - internalType: "address", - name: "owner", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "addressManager", + "type": "address" + } ], - name: "OwnableInvalidOwner", - type: "error", + "name": "AddressManagerSet", + "type": "event" }, { - inputs: [ + "anonymous": false, + "inputs": [ { - internalType: "address", - name: "account", - type: "address", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, + { + "indexed": false, + "internalType": "enum ITransactions.TransactionStatus", + "name": "newStatus", + "type": "uint8" + } ], - name: "OwnableUnauthorizedAccount", - type: "error", - }, - { - inputs: [], - name: "ReentrancyGuardReentrantCall", - type: "error", + "name": "AllVotesCommitted", + "type": "event" }, { - inputs: [], - name: "TransactionNotAtPendingQueueHead", - type: "error", - }, - { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "appealer", - type: "address", + "indexed": true, + "internalType": "address", + "name": "appellant", + "type": "address" }, { - indexed: false, - internalType: "uint256", - name: "appealBond", - type: "uint256", + "indexed": false, + "internalType": "uint256", + "name": "bond", + "type": "uint256" }, { - indexed: false, - internalType: "address[]", - name: "appealValidators", - type: "address[]", - }, + "indexed": false, + "internalType": "address[]", + "name": "validators", + "type": "address[]" + } ], - name: "AppealStarted", - type: "event", + "name": "AppealStarted", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", + "indexed": false, + "internalType": "uint256", + "name": "attempted", + "type": "uint256" }, { - indexed: true, - internalType: "address", - name: "recipient", - type: "address", + "indexed": false, + "internalType": "uint256", + "name": "succeeded", + "type": "uint256" }, { - indexed: false, - internalType: "bytes", - name: "data", - type: "bytes", - }, + "indexed": false, + "internalType": "uint256", + "name": "failed", + "type": "uint256" + } ], - name: "ErrorMessage", - type: "event", + "name": "BatchFinalizationCompleted", + "type": "event" }, { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "ghostFactory", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "genManager", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "genTransactions", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "genQueue", - type: "address", - }, + "anonymous": false, + "inputs": [ { - indexed: false, - internalType: "address", - name: "genStaking", - type: "address", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: false, - internalType: "address", - name: "genMessages", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "idleness", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "tribunalAppeal", - type: "address", - }, + "indexed": false, + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" + } ], - name: "ExternalContractsSet", - type: "event", + "name": "CreatedTransaction", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } ], - name: "Initialized", - type: "event", + "name": "Initialized", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "recipient", - type: "address", + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" }, { - indexed: true, - internalType: "address", - name: "activator", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "activator", + "type": "address" + } ], - name: "InternalMessageProcessed", - type: "event", + "name": "InternalMessageProcessed", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "recipient", - type: "address", + "indexed": true, + "internalType": "address", + "name": "oldLeader", + "type": "address" }, { - indexed: true, - internalType: "address", - name: "activator", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "newLeader", + "type": "address" + } ], - name: "NewTransaction", - type: "event", + "name": "LeaderIdlenessProcessed", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" }, + { + "indexed": true, + "internalType": "address", + "name": "activator", + "type": "address" + } ], - name: "OwnershipTransferStarted", - type: "event", + "name": "NewTransaction", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" }, { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } ], - name: "OwnershipTransferred", - type: "event", + "name": "OwnershipTransferStarted", + "type": "event" }, { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "role", - type: "bytes32", - }, + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "previousAdminRole", - type: "bytes32", + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" }, { - indexed: true, - internalType: "bytes32", - name: "newAdminRole", - type: "bytes32", - }, + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } ], - name: "RoleAdminChanged", - type: "event", + "name": "OwnershipTransferred", + "type": "event" }, { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } ], - name: "RoleGranted", - type: "event", + "name": "ProcessIdlenessAccepted", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "role", - type: "bytes32", - }, + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } + ], + "name": "TransactionAccepted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "account", - type: "address", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "leader", + "type": "address" + } ], - name: "RoleRevoked", - type: "event", + "name": "TransactionActivated", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "cancelledBy", + "type": "address" + } ], - name: "SlashAppealSubmitted", - type: "event", + "name": "TransactionCancelled", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "tx_id", - type: "bytes32", - }, + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } ], - name: "TransactionAccepted", - type: "event", + "name": "TransactionFinalizationFailed", + "type": "event" }, { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", - }, + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "leader", - type: "address", - }, + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } ], - name: "TransactionActivated", - type: "event", + "name": "TransactionFinalized", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "uint256", - name: "batchId", - type: "uint256", - }, - { - indexed: false, - internalType: "address[]", - name: "validators", - type: "address[]", - }, + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } ], - name: "TransactionActivatedValidators", - type: "event", + "name": "TransactionLeaderRevealed", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "newLeader", + "type": "address" + } ], - name: "TransactionCancelled", - type: "event", + "name": "TransactionLeaderRotated", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "tx_id", - type: "bytes32", - }, + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } ], - name: "TransactionFinalized", - type: "event", + "name": "TransactionLeaderTimeout", + "type": "event" }, { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", - }, - { - indexed: true, - internalType: "address", - name: "oldValidator", - type: "address", - }, + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "newValidator", - type: "address", - }, + "indexed": false, + "internalType": "bytes32[]", + "name": "txIds", + "type": "bytes32[]" + } ], - name: "TransactionIdleValidatorReplaced", - type: "event", + "name": "TransactionNeedsRecomputation", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "uint256", - name: "validatorIndex", - type: "uint256", - }, + "indexed": false, + "internalType": "address[]", + "name": "validators", + "type": "address[]" + } ], - name: "TransactionIdleValidatorReplacementFailed", - type: "event", + "name": "TransactionReceiptProposed", + "type": "event" }, { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", - }, + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "newLeader", - type: "address", - }, + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } ], - name: "TransactionLeaderRotated", - type: "event", + "name": "TransactionUndetermined", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "tx_id", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, - ], - name: "TransactionLeaderTimeout", - type: "event", - }, - { - anonymous: false, - inputs: [ { - indexed: false, - internalType: "bytes32[]", - name: "tx_ids", - type: "bytes32[]", + "indexed": false, + "internalType": "uint256", + "name": "tribunalIndex", + "type": "uint256" }, + { + "indexed": true, + "internalType": "address", + "name": "validator", + "type": "address" + } ], - name: "TransactionNeedsRecomputation", - type: "event", + "name": "TribunalAppealVoteCommitted", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "tx_id", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: false, - internalType: "address[]", - name: "validators", - type: "address[]", + "indexed": false, + "internalType": "uint256", + "name": "tribunalIndex", + "type": "uint256" }, - ], - name: "TransactionReceiptProposed", - type: "event", - }, - { - anonymous: false, - inputs: [ { - indexed: true, - internalType: "bytes32", - name: "tx_id", - type: "bytes32", + "indexed": true, + "internalType": "address", + "name": "validator", + "type": "address" }, + { + "indexed": false, + "internalType": "enum ITransactions.VoteType", + "name": "voteType", + "type": "uint8" + } ], - name: "TransactionUndetermined", - type: "event", + "name": "TribunalAppealVoteRevealed", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "validator", - type: "address", + "indexed": true, + "internalType": "address", + "name": "oldValidator", + "type": "address" }, { - indexed: false, - internalType: "bool", - name: "isLastVote", - type: "bool", + "indexed": true, + "internalType": "address", + "name": "newValidator", + "type": "address" }, + { + "indexed": false, + "internalType": "uint256", + "name": "validatorIndex", + "type": "uint256" + } ], - name: "TribunalAppealVoteCommitted", - type: "event", + "name": "ValidatorReplaced", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "validator", - type: "address", + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" }, { - indexed: false, - internalType: "bool", - name: "isLastVote", - type: "bool", - }, + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } ], - name: "TribunalAppealVoteRevealed", - type: "event", + "name": "ValueWithdrawalFailed", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "validator", - type: "address", + "indexed": true, + "internalType": "address", + "name": "validator", + "type": "address" }, { - indexed: false, - internalType: "bool", - name: "isLastVote", - type: "bool", - }, + "indexed": false, + "internalType": "bool", + "name": "isLastVote", + "type": "bool" + } ], - name: "VoteCommitted", - type: "event", + "name": "VoteCommitted", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "validator", - type: "address", + "indexed": true, + "internalType": "address", + "name": "validator", + "type": "address" }, { - indexed: false, - internalType: "enum ITransactions.VoteType", - name: "voteType", - type: "uint8", + "indexed": false, + "internalType": "enum ITransactions.VoteType", + "name": "voteType", + "type": "uint8" }, { - indexed: false, - internalType: "bool", - name: "isLastVote", - type: "bool", + "indexed": false, + "internalType": "bool", + "name": "isLastVote", + "type": "bool" }, { - indexed: false, - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", - }, + "indexed": false, + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" + } ], - name: "VoteRevealed", - type: "event", + "name": "VoteRevealed", + "type": "event" }, { - inputs: [], - name: "DEFAULT_ADMIN_ROLE", - outputs: [ + "inputs": [], + "name": "EVENTS_BATCH_SIZE", + "outputs": [ { - internalType: "bytes32", - name: "", - type: "bytes32", - }, + "internalType": "uint256", + "name": "", + "type": "uint256" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: "EVENTS_BATCH_SIZE", - outputs: [ + "inputs": [], + "name": "VERSION", + "outputs": [ { - internalType: "uint256", - name: "", - type: "uint256", - }, + "internalType": "string", + "name": "", + "type": "string" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: "acceptOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "_txId", - type: "bytes32", + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" }, { - internalType: "bytes", - name: "_vrfProof", - type: "bytes", + "internalType": "address", + "name": "_operator", + "type": "address" }, + { + "internalType": "bytes", + "name": "_vrfProof", + "type": "bytes" + } ], - name: "activateTransaction", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "activateTransaction", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "_sender", - type: "address", + "internalType": "address", + "name": "_sender", + "type": "address" }, { - internalType: "address", - name: "_recipient", - type: "address", + "internalType": "address", + "name": "_recipient", + "type": "address" }, { - internalType: "uint256", - name: "_numOfInitialValidators", - type: "uint256", + "internalType": "uint256", + "name": "_numOfInitialValidators", + "type": "uint256" }, { - internalType: "uint256", - name: "_maxRotations", - type: "uint256", + "internalType": "uint256", + "name": "_maxRotations", + "type": "uint256" }, { - internalType: "bytes", - name: "_txData", - type: "bytes", + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" }, + { + "internalType": "uint256", + "name": "_validUntil", + "type": "uint256" + } ], - name: "addTransaction", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "addTransaction", + "outputs": [], + "stateMutability": "payable", + "type": "function" }, { - inputs: [ + "inputs": [], + "name": "addressManager", + "outputs": [ { - internalType: "bytes32", - name: "_txId", - type: "bytes32", - }, + "internalType": "contract IAddressManager", + "name": "", + "type": "address" + } ], - name: "cancelTransaction", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { - internalType: "bytes32", - name: "_txId", - type: "bytes32", - }, + "inputs": [ { - internalType: "bytes32", - name: "_commitHash", - type: "bytes32", - }, + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } ], - name: "commitTribunalAppealVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "cancelTransaction", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "_txId", - type: "bytes32", + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" }, { - internalType: "bytes32", - name: "_commitHash", - type: "bytes32", + "internalType": "uint256", + "name": "_tribunalIndex", + "type": "uint256" }, { - internalType: "uint256", - name: "_validatorIndex", - type: "uint256", - }, + "internalType": "bytes32", + "name": "_commitHash", + "type": "bytes32" + } ], - name: "commitVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "commitTribunalAppealVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [], - name: "contracts", - outputs: [ + "inputs": [ { - internalType: "contract IGenManager", - name: "genManager", - type: "address", + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" }, { - internalType: "contract ITransactions", - name: "genTransactions", - type: "address", + "internalType": "bytes32", + "name": "_commitHash", + "type": "bytes32" }, { - internalType: "contract IQueues", - name: "genQueue", - type: "address", - }, + "internalType": "uint256", + "name": "_validatorIndex", + "type": "uint256" + } + ], + "name": "commitVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - internalType: "contract IGhostFactory", - name: "ghostFactory", - type: "address", + "internalType": "address", + "name": "_sender", + "type": "address" }, { - internalType: "contract IGenStaking", - name: "genStaking", - type: "address", + "internalType": "uint256", + "name": "_numOfInitialValidators", + "type": "uint256" }, { - internalType: "contract IMessages", - name: "genMessages", - type: "address", + "internalType": "uint256", + "name": "_maxRotations", + "type": "uint256" }, { - internalType: "contract IIdleness", - name: "idleness", - type: "address", + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" }, { - internalType: "contract ITribunalAppeal", - name: "tribunalAppeal", - type: "address", + "internalType": "uint256", + "name": "_saltNonce", + "type": "uint256" }, + { + "internalType": "uint256", + "name": "_validUntil", + "type": "uint256" + } ], - stateMutability: "view", - type: "function", + "name": "deploySalted", + "outputs": [], + "stateMutability": "payable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "_recipient", - type: "address", + "internalType": "address", + "name": "_recipient", + "type": "address" }, { - internalType: "uint256", - name: "_value", - type: "uint256", + "internalType": "uint256", + "name": "_value", + "type": "uint256" }, { - internalType: "bytes", - name: "_data", - type: "bytes", - }, + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } ], - name: "executeMessage", - outputs: [ + "name": "executeMessage", + "outputs": [ { - internalType: "bool", - name: "success", - type: "bool", - }, + "internalType": "bool", + "name": "success", + "type": "bool" + } ], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "_txId", - type: "bytes32", - }, + "internalType": "bytes32[]", + "name": "_txIds", + "type": "bytes32[]" + } ], - name: "finalizeTransaction", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "finalizeIdlenessTxs", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [], - name: "getContracts", - outputs: [ + "inputs": [ { - components: [ - { - internalType: "contract IGenManager", - name: "genManager", - type: "address", - }, - { - internalType: "contract ITransactions", - name: "genTransactions", - type: "address", - }, - { - internalType: "contract IQueues", - name: "genQueue", - type: "address", - }, - { - internalType: "contract IGhostFactory", - name: "ghostFactory", - type: "address", - }, - { - internalType: "contract IGenStaking", - name: "genStaking", - type: "address", - }, - { - internalType: "contract IMessages", - name: "genMessages", - type: "address", - }, - { - internalType: "contract IIdleness", - name: "idleness", - type: "address", - }, - { - internalType: "contract ITribunalAppeal", - name: "tribunalAppeal", - type: "address", - }, - ], - internalType: "struct IConsensusMain.ExternalContracts", - name: "", - type: "tuple", - }, + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } ], - stateMutability: "view", - type: "function", + "name": "finalizeTransaction", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - ], - name: "getRoleAdmin", - outputs: [ + "inputs": [ { - internalType: "bytes32", - name: "", - type: "bytes32", - }, + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } ], - stateMutability: "view", - type: "function", + "name": "flushExternalMessages", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ - { - internalType: "address", - name: "addr", - type: "address", - }, - ], - name: "ghostContracts", - outputs: [ + "inputs": [], + "name": "getAddressManager", + "outputs": [ { - internalType: "bool", - name: "isGhost", - type: "bool", - }, + "internalType": "contract IAddressManager", + "name": "", + "type": "address" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } + ], + "name": "getPendingTransactionValue", + "outputs": [ { - internalType: "address", - name: "account", - type: "address", - }, + "internalType": "uint256", + "name": "", + "type": "uint256" + } ], - name: "grantRole", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "hasRole", - outputs: [ + "inputs": [ { - internalType: "bool", - name: "", - type: "bool", - }, + "internalType": "address", + "name": "_addressManager", + "type": "address" + } ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [], - name: "owner", - outputs: [ + "inputs": [ { - internalType: "address", - name: "", - type: "address", - }, + "internalType": "address", + "name": "addr", + "type": "address" + } ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "pendingOwner", - outputs: [ + "name": "isGhostContract", + "outputs": [ { - internalType: "address", - name: "", - type: "address", - }, + "internalType": "bool", + "name": "", + "type": "bool" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "recipient", - type: "address", - }, + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } ], - name: "proceedPendingQueueProcessing", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "leaderIdleness", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ - { - internalType: "bytes32", - name: "_txId", - type: "bytes32", - }, - { - internalType: "bytes", - name: "_txReceipt", - type: "bytes", - }, - { - internalType: "uint256", - name: "_processingBlock", - type: "uint256", - }, + "inputs": [ { - components: [ + "components": [ + { + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, { - internalType: "enum IMessages.MessageType", - name: "messageType", - type: "uint8", + "internalType": "uint256", + "name": "saltAsAValidator", + "type": "uint256" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" }, { - internalType: "uint256", - name: "value", - type: "uint256", + "internalType": "bytes32", + "name": "messagesAndOtherFieldsHash", + "type": "bytes32" }, { - internalType: "bytes", - name: "data", - type: "bytes", + "internalType": "bytes32", + "name": "otherExecutionFieldsHash", + "type": "bytes32" }, { - internalType: "bool", - name: "onAcceptance", - type: "bool", + "internalType": "enum ITransactions.VoteType", + "name": "resultValue", + "type": "uint8" }, + { + "components": [ + { + "internalType": "enum IMessages.MessageType", + "name": "messageType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "onAcceptance", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + } + ], + "internalType": "struct IMessages.SubmittedMessage[]", + "name": "messages", + "type": "tuple[]" + } ], - internalType: "struct IMessages.SubmittedMessage[]", - name: "_messages", - type: "tuple[]", - }, - { - internalType: "bytes", - name: "_vrfProof", - type: "bytes", - }, + "internalType": "struct IConsensusMain.LeaderRevealVoteParams", + "name": "leaderRevealVoteParams", + "type": "tuple" + } ], - name: "proposeReceipt", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "leaderRevealVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [], - name: "renounceOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, + "inputs": [], + "name": "pendingOwner", + "outputs": [ { - internalType: "address", - name: "callerConfirmation", - type: "address", - }, + "internalType": "address", + "name": "", + "type": "address" + } ], - name: "renounceRole", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { - internalType: "bytes32", - name: "_txId", - type: "bytes32", - }, + "inputs": [ { - internalType: "bytes32", - name: "_voteHash", - type: "bytes32", - }, - { - internalType: "enum ITribunalAppeal.TribunalVoteType", - name: "_voteType", - type: "uint8", - }, - { - internalType: "uint256", - name: "_nonce", - type: "uint256", - }, + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } ], - name: "revealTribunalAppealVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "processIdleness", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "_txId", - type: "bytes32", + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" }, { - internalType: "bytes32", - name: "_voteHash", - type: "bytes32", + "internalType": "bytes32", + "name": "_txExecutionHash", + "type": "bytes32" }, { - internalType: "enum ITransactions.VoteType", - name: "_voteType", - type: "uint8", + "internalType": "uint256", + "name": "_processingBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "_nonce", - type: "uint256", + "internalType": "address", + "name": "_operator", + "type": "address" }, { - internalType: "uint256", - name: "_validatorIndex", - type: "uint256", + "internalType": "bytes", + "name": "_eqBlocksOutputs", + "type": "bytes" }, + { + "internalType": "bytes", + "name": "_vrfProof", + "type": "bytes" + } ], - name: "revealVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "proposeReceipt", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, + "internalType": "bytes32[]", + "name": "_txIds", + "type": "bytes32[]" + } + ], + "name": "redButtonFinalize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - internalType: "address", - name: "account", - type: "address", - }, + "internalType": "address", + "name": "ghost", + "type": "address" + } ], - name: "revokeRole", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "registerGhostContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + }, { - internalType: "address", - name: "_ghostFactory", - type: "address", + "internalType": "uint256", + "name": "_tribunalIndex", + "type": "uint256" }, { - internalType: "address", - name: "_genManager", - type: "address", + "internalType": "bytes32", + "name": "_voteHash", + "type": "bytes32" }, { - internalType: "address", - name: "_genTransactions", - type: "address", + "internalType": "enum ITransactions.VoteType", + "name": "_voteType", + "type": "uint8" }, { - internalType: "address", - name: "_genQueue", - type: "address", + "internalType": "bytes32", + "name": "_otherExecutionFieldsHash", + "type": "bytes32" }, { - internalType: "address", - name: "_genStaking", - type: "address", + "internalType": "uint256", + "name": "_nonce", + "type": "uint256" + } + ], + "name": "revealTribunalAppealVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" }, { - internalType: "address", - name: "_genMessages", - type: "address", + "internalType": "bytes32", + "name": "_voteHash", + "type": "bytes32" }, { - internalType: "address", - name: "_idleness", - type: "address", + "internalType": "enum ITransactions.VoteType", + "name": "_voteType", + "type": "uint8" }, { - internalType: "address", - name: "_tribunalAppeal", - type: "address", + "internalType": "bytes32", + "name": "_otherExecutionFieldsHash", + "type": "bytes32" }, - ], - name: "setExternalContracts", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ { - internalType: "bytes32", - name: "_txId", - type: "bytes32", + "internalType": "uint256", + "name": "_nonce", + "type": "uint256" }, + { + "internalType": "uint256", + "name": "_validatorIndex", + "type": "uint256" + } ], - name: "submitAppeal", - outputs: [], - stateMutability: "payable", - type: "function", + "name": "revealVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "_txId", - type: "bytes32", - }, + "internalType": "address", + "name": "_addressManager", + "type": "address" + } ], - name: "submitSlashAppeal", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "setAddressManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes4", - name: "interfaceId", - type: "bytes4", - }, - ], - name: "supportsInterface", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } ], - stateMutability: "view", - type: "function", + "name": "submitAppeal", + "outputs": [], + "stateMutability": "payable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "newOwner", - type: "address", - }, + "internalType": "address", + "name": "newOwner", + "type": "address" + } ], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, + { + "stateMutability": "payable", + "type": "receive" + } ], bytecode: "", }; @@ -1440,2550 +1359,1965 @@ const CONSENSUS_DATA_CONTRACT = { address: "0x88B0F18613Db92Bf970FfE264E02496e20a74D16" as Address, abi: [ { - inputs: [], - name: "AccessControlBadConfirmation", - type: "error", + "inputs": [], + "name": "AccessControlBadConfirmation", + "type": "error" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "account", - type: "address", + "internalType": "address", + "name": "account", + "type": "address" }, { - internalType: "bytes32", - name: "neededRole", - type: "bytes32", - }, + "internalType": "bytes32", + "name": "neededRole", + "type": "bytes32" + } ], - name: "AccessControlUnauthorizedAccount", - type: "error", + "name": "AccessControlUnauthorizedAccount", + "type": "error" }, { - inputs: [], - name: "InvalidInitialization", - type: "error", + "inputs": [], + "name": "InvalidInitialization", + "type": "error" }, { - inputs: [], - name: "NotInitializing", - type: "error", + "inputs": [], + "name": "NotInitializing", + "type": "error" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "owner", - type: "address", - }, + "internalType": "address", + "name": "owner", + "type": "address" + } ], - name: "OwnableInvalidOwner", - type: "error", + "name": "OwnableInvalidOwner", + "type": "error" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "account", - type: "address", - }, + "internalType": "address", + "name": "account", + "type": "address" + } ], - name: "OwnableUnauthorizedAccount", - type: "error", + "name": "OwnableUnauthorizedAccount", + "type": "error" }, { - inputs: [], - name: "ReentrancyGuardReentrantCall", - type: "error", + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } ], - name: "Initialized", - type: "event", + "name": "Initialized", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" }, { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } ], - name: "OwnershipTransferStarted", - type: "event", + "name": "OwnershipTransferStarted", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" }, { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } ], - name: "OwnershipTransferred", - type: "event", + "name": "OwnershipTransferred", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "role", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - indexed: true, - internalType: "bytes32", - name: "previousAdminRole", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" }, { - indexed: true, - internalType: "bytes32", - name: "newAdminRole", - type: "bytes32", - }, + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } ], - name: "RoleAdminChanged", - type: "event", + "name": "RoleAdminChanged", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "role", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "account", - type: "address", + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" }, { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } ], - name: "RoleGranted", - type: "event", + "name": "RoleGranted", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "role", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "account", - type: "address", + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" }, { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } ], - name: "RoleRevoked", - type: "event", + "name": "RoleRevoked", + "type": "event" }, { - inputs: [], - name: "DEFAULT_ADMIN_ROLE", - outputs: [ + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ { - internalType: "bytes32", - name: "", - type: "bytes32", - }, + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: "acceptOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ - { - internalType: "bytes32", - name: "_txId", - type: "bytes32", - }, - { - internalType: "uint256", - name: "_currentTimestamp", - type: "uint256", - }, - ], - name: "canFinalize", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, + "inputs": [], + "name": "addressManager", + "outputs": [ { - internalType: "uint256", - name: "", - type: "uint256", - }, + "internalType": "contract IAddressManager", + "name": "", + "type": "address" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: "consensusMain", - outputs: [ + "inputs": [ { - internalType: "contract IConsensusMain", - name: "", - type: "address", + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" }, + { + "internalType": "uint256", + "name": "_currentTimestamp", + "type": "uint256" + } ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ + "name": "canFinalize", + "outputs": [ { - internalType: "bytes32", - name: "_tx_id", - type: "bytes32", + "internalType": "bool", + "name": "", + "type": "bool" }, - ], - name: "getLastAppealResult", - outputs: [ { - internalType: "enum ITransactions.ResultType", - name: "", - type: "uint8", + "internalType": "uint256", + "name": "", + "type": "uint256" }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "recipient", - type: "address", - }, + "internalType": "address", + "name": "recipient", + "type": "address" + } ], - name: "getLatestAcceptedTransaction", - outputs: [ + "name": "getLatestAcceptedTransaction", + "outputs": [ { - components: [ + "components": [ { - internalType: "uint256", - name: "currentTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" }, { - internalType: "address", - name: "sender", - type: "address", + "internalType": "address", + "name": "sender", + "type": "address" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "uint256", - name: "numOfInitialValidators", - type: "uint256", + "internalType": "uint256", + "name": "initialRotations", + "type": "uint256" }, { - internalType: "uint256", - name: "txSlot", - type: "uint256", + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" }, { - internalType: "uint256", - name: "createdTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "createdTimestamp", + "type": "uint256" }, { - internalType: "uint256", - name: "lastVoteTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "lastVoteTimestamp", + "type": "uint256" }, { - internalType: "bytes32", - name: "randomSeed", - type: "bytes32", + "internalType": "bytes32", + "name": "randomSeed", + "type": "bytes32" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "bytes", - name: "txData", - type: "bytes", + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" }, { - internalType: "bytes", - name: "txReceipt", - type: "bytes", + "internalType": "bytes", + "name": "txCalldata", + "type": "bytes" }, { - components: [ + "internalType": "bytes", + "name": "eqBlocksOutputs", + "type": "bytes" + }, + { + "components": [ { - internalType: "enum IMessages.MessageType", - name: "messageType", - type: "uint8", + "internalType": "enum IMessages.MessageType", + "name": "messageType", + "type": "uint8" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "uint256", - name: "value", - type: "uint256", + "internalType": "uint256", + "name": "value", + "type": "uint256" }, { - internalType: "bytes", - name: "data", - type: "bytes", + "internalType": "bytes", + "name": "data", + "type": "bytes" }, { - internalType: "bool", - name: "onAcceptance", - type: "bool", + "internalType": "bool", + "name": "onAcceptance", + "type": "bool" }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + } ], - internalType: "struct IMessages.SubmittedMessage[]", - name: "messages", - type: "tuple[]", + "internalType": "struct IMessages.SubmittedMessage[]", + "name": "messages", + "type": "tuple[]" }, { - internalType: "enum IQueues.QueueType", - name: "queueType", - type: "uint8", + "internalType": "enum IQueues.QueueType", + "name": "queueType", + "type": "uint8" }, { - internalType: "uint256", - name: "queuePosition", - type: "uint256", + "internalType": "uint256", + "name": "queuePosition", + "type": "uint256" }, { - internalType: "address", - name: "activator", - type: "address", + "internalType": "address", + "name": "activator", + "type": "address" }, { - internalType: "address", - name: "lastLeader", - type: "address", + "internalType": "address", + "name": "lastLeader", + "type": "address" }, { - internalType: "enum ITransactions.TransactionStatus", - name: "status", - type: "uint8", + "internalType": "enum ITransactions.TransactionStatus", + "name": "status", + "type": "uint8" }, { - internalType: "bytes32", - name: "txId", - type: "bytes32", + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "activationBlock", - type: "uint256", + "internalType": "uint256", + "name": "activationBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "processingBlock", - type: "uint256", + "internalType": "uint256", + "name": "processingBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "proposalBlock", - type: "uint256", - }, + "internalType": "uint256", + "name": "proposalBlock", + "type": "uint256" + } ], - internalType: "struct ITransactions.ReadStateBlockRange", - name: "readStateBlockRange", - type: "tuple", + "internalType": "struct ITransactions.ReadStateBlockRange", + "name": "readStateBlockRange", + "type": "tuple" }, { - internalType: "uint256", - name: "numOfRounds", - type: "uint256", + "internalType": "uint256", + "name": "numOfRounds", + "type": "uint256" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "round", - type: "uint256", + "internalType": "uint256", + "name": "round", + "type": "uint256" }, { - internalType: "uint256", - name: "leaderIndex", - type: "uint256", + "internalType": "uint256", + "name": "leaderIndex", + "type": "uint256" }, { - internalType: "uint256", - name: "votesCommitted", - type: "uint256", + "internalType": "uint256", + "name": "votesCommitted", + "type": "uint256" }, { - internalType: "uint256", - name: "votesRevealed", - type: "uint256", + "internalType": "uint256", + "name": "votesRevealed", + "type": "uint256" }, { - internalType: "uint256", - name: "appealBond", - type: "uint256", + "internalType": "uint256", + "name": "appealBond", + "type": "uint256" }, { - internalType: "uint256", - name: "rotationsLeft", - type: "uint256", + "internalType": "uint256", + "name": "rotationsLeft", + "type": "uint256" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "address[]", - name: "roundValidators", - type: "address[]", + "internalType": "address[]", + "name": "roundValidators", + "type": "address[]" }, { - internalType: "bytes32[]", - name: "validatorVotesHash", - type: "bytes32[]", + "internalType": "enum ITransactions.VoteType[]", + "name": "validatorVotes", + "type": "uint8[]" }, { - internalType: "enum ITransactions.VoteType[]", - name: "validatorVotes", - type: "uint8[]", + "internalType": "bytes32[]", + "name": "validatorVotesHash", + "type": "bytes32[]" }, + { + "internalType": "bytes32[]", + "name": "validatorResultHash", + "type": "bytes32[]" + } ], - internalType: "struct ITransactions.RoundData", - name: "lastRound", - type: "tuple", + "internalType": "struct ITransactions.RoundData", + "name": "lastRound", + "type": "tuple" }, + { + "internalType": "address[]", + "name": "consumedValidators", + "type": "address[]" + } ], - internalType: "struct ConsensusData.TransactionData", - name: "txData", - type: "tuple", - }, + "internalType": "struct ConsensusData.TransactionData", + "name": "inputData", + "type": "tuple" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "uint256", - name: "startIndex", - type: "uint256", + "internalType": "uint256", + "name": "startIndex", + "type": "uint256" }, { - internalType: "uint256", - name: "pageSize", - type: "uint256", - }, + "internalType": "uint256", + "name": "pageSize", + "type": "uint256" + } ], - name: "getLatestAcceptedTransactions", - outputs: [ + "name": "getLatestAcceptedTransactions", + "outputs": [ { - components: [ + "components": [ { - internalType: "uint256", - name: "currentTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" }, { - internalType: "address", - name: "sender", - type: "address", + "internalType": "address", + "name": "sender", + "type": "address" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "uint256", - name: "numOfInitialValidators", - type: "uint256", + "internalType": "uint256", + "name": "initialRotations", + "type": "uint256" }, { - internalType: "uint256", - name: "txSlot", - type: "uint256", + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" }, { - internalType: "uint256", - name: "createdTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "createdTimestamp", + "type": "uint256" }, { - internalType: "uint256", - name: "lastVoteTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "lastVoteTimestamp", + "type": "uint256" }, { - internalType: "bytes32", - name: "randomSeed", - type: "bytes32", + "internalType": "bytes32", + "name": "randomSeed", + "type": "bytes32" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "bytes", - name: "txData", - type: "bytes", + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" }, { - internalType: "bytes", - name: "txReceipt", - type: "bytes", + "internalType": "bytes", + "name": "txCalldata", + "type": "bytes" }, { - components: [ + "internalType": "bytes", + "name": "eqBlocksOutputs", + "type": "bytes" + }, + { + "components": [ { - internalType: "enum IMessages.MessageType", - name: "messageType", - type: "uint8", + "internalType": "enum IMessages.MessageType", + "name": "messageType", + "type": "uint8" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "uint256", - name: "value", - type: "uint256", + "internalType": "uint256", + "name": "value", + "type": "uint256" }, { - internalType: "bytes", - name: "data", - type: "bytes", + "internalType": "bytes", + "name": "data", + "type": "bytes" }, { - internalType: "bool", - name: "onAcceptance", - type: "bool", + "internalType": "bool", + "name": "onAcceptance", + "type": "bool" }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + } ], - internalType: "struct IMessages.SubmittedMessage[]", - name: "messages", - type: "tuple[]", + "internalType": "struct IMessages.SubmittedMessage[]", + "name": "messages", + "type": "tuple[]" }, { - internalType: "enum IQueues.QueueType", - name: "queueType", - type: "uint8", + "internalType": "enum IQueues.QueueType", + "name": "queueType", + "type": "uint8" }, { - internalType: "uint256", - name: "queuePosition", - type: "uint256", + "internalType": "uint256", + "name": "queuePosition", + "type": "uint256" }, { - internalType: "address", - name: "activator", - type: "address", + "internalType": "address", + "name": "activator", + "type": "address" }, { - internalType: "address", - name: "lastLeader", - type: "address", + "internalType": "address", + "name": "lastLeader", + "type": "address" }, { - internalType: "enum ITransactions.TransactionStatus", - name: "status", - type: "uint8", + "internalType": "enum ITransactions.TransactionStatus", + "name": "status", + "type": "uint8" }, { - internalType: "bytes32", - name: "txId", - type: "bytes32", + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "activationBlock", - type: "uint256", + "internalType": "uint256", + "name": "activationBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "processingBlock", - type: "uint256", + "internalType": "uint256", + "name": "processingBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "proposalBlock", - type: "uint256", - }, + "internalType": "uint256", + "name": "proposalBlock", + "type": "uint256" + } ], - internalType: "struct ITransactions.ReadStateBlockRange", - name: "readStateBlockRange", - type: "tuple", + "internalType": "struct ITransactions.ReadStateBlockRange", + "name": "readStateBlockRange", + "type": "tuple" }, { - internalType: "uint256", - name: "numOfRounds", - type: "uint256", + "internalType": "uint256", + "name": "numOfRounds", + "type": "uint256" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "round", - type: "uint256", + "internalType": "uint256", + "name": "round", + "type": "uint256" }, { - internalType: "uint256", - name: "leaderIndex", - type: "uint256", + "internalType": "uint256", + "name": "leaderIndex", + "type": "uint256" }, { - internalType: "uint256", - name: "votesCommitted", - type: "uint256", + "internalType": "uint256", + "name": "votesCommitted", + "type": "uint256" }, { - internalType: "uint256", - name: "votesRevealed", - type: "uint256", + "internalType": "uint256", + "name": "votesRevealed", + "type": "uint256" }, { - internalType: "uint256", - name: "appealBond", - type: "uint256", + "internalType": "uint256", + "name": "appealBond", + "type": "uint256" }, { - internalType: "uint256", - name: "rotationsLeft", - type: "uint256", + "internalType": "uint256", + "name": "rotationsLeft", + "type": "uint256" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "address[]", - name: "roundValidators", - type: "address[]", + "internalType": "address[]", + "name": "roundValidators", + "type": "address[]" }, { - internalType: "bytes32[]", - name: "validatorVotesHash", - type: "bytes32[]", + "internalType": "enum ITransactions.VoteType[]", + "name": "validatorVotes", + "type": "uint8[]" }, { - internalType: "enum ITransactions.VoteType[]", - name: "validatorVotes", - type: "uint8[]", + "internalType": "bytes32[]", + "name": "validatorVotesHash", + "type": "bytes32[]" }, + { + "internalType": "bytes32[]", + "name": "validatorResultHash", + "type": "bytes32[]" + } ], - internalType: "struct ITransactions.RoundData", - name: "lastRound", - type: "tuple", + "internalType": "struct ITransactions.RoundData", + "name": "lastRound", + "type": "tuple" }, + { + "internalType": "address[]", + "name": "consumedValidators", + "type": "address[]" + } ], - internalType: "struct ConsensusData.TransactionData[]", - name: "", - type: "tuple[]", - }, + "internalType": "struct ConsensusData.TransactionData[]", + "name": "", + "type": "tuple[]" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "recipient", - type: "address", - }, + "internalType": "address", + "name": "recipient", + "type": "address" + } ], - name: "getLatestAcceptedTxCount", - outputs: [ + "name": "getLatestAcceptedTxCount", + "outputs": [ { - internalType: "uint256", - name: "", - type: "uint256", - }, + "internalType": "uint256", + "name": "", + "type": "uint256" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "recipient", - type: "address", - }, + "internalType": "address", + "name": "recipient", + "type": "address" + } ], - name: "getLatestFinalizedTransaction", - outputs: [ + "name": "getLatestFinalizedTransaction", + "outputs": [ { - components: [ + "components": [ + { + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" + }, { - internalType: "uint256", - name: "currentTimestamp", - type: "uint256", + "internalType": "address", + "name": "sender", + "type": "address" }, { - internalType: "address", - name: "sender", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "uint256", + "name": "initialRotations", + "type": "uint256" }, { - internalType: "uint256", - name: "numOfInitialValidators", - type: "uint256", + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" }, { - internalType: "uint256", - name: "txSlot", - type: "uint256", + "internalType": "uint256", + "name": "createdTimestamp", + "type": "uint256" }, { - internalType: "uint256", - name: "createdTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "lastVoteTimestamp", + "type": "uint256" }, { - internalType: "uint256", - name: "lastVoteTimestamp", - type: "uint256", + "internalType": "bytes32", + "name": "randomSeed", + "type": "bytes32" }, { - internalType: "bytes32", - name: "randomSeed", - type: "bytes32", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" }, { - internalType: "bytes", - name: "txData", - type: "bytes", + "internalType": "bytes", + "name": "txCalldata", + "type": "bytes" }, { - internalType: "bytes", - name: "txReceipt", - type: "bytes", + "internalType": "bytes", + "name": "eqBlocksOutputs", + "type": "bytes" }, { - components: [ + "components": [ { - internalType: "enum IMessages.MessageType", - name: "messageType", - type: "uint8", + "internalType": "enum IMessages.MessageType", + "name": "messageType", + "type": "uint8" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "uint256", - name: "value", - type: "uint256", + "internalType": "uint256", + "name": "value", + "type": "uint256" }, { - internalType: "bytes", - name: "data", - type: "bytes", + "internalType": "bytes", + "name": "data", + "type": "bytes" }, { - internalType: "bool", - name: "onAcceptance", - type: "bool", + "internalType": "bool", + "name": "onAcceptance", + "type": "bool" }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + } ], - internalType: "struct IMessages.SubmittedMessage[]", - name: "messages", - type: "tuple[]", + "internalType": "struct IMessages.SubmittedMessage[]", + "name": "messages", + "type": "tuple[]" }, { - internalType: "enum IQueues.QueueType", - name: "queueType", - type: "uint8", + "internalType": "enum IQueues.QueueType", + "name": "queueType", + "type": "uint8" }, { - internalType: "uint256", - name: "queuePosition", - type: "uint256", + "internalType": "uint256", + "name": "queuePosition", + "type": "uint256" }, { - internalType: "address", - name: "activator", - type: "address", + "internalType": "address", + "name": "activator", + "type": "address" }, { - internalType: "address", - name: "lastLeader", - type: "address", + "internalType": "address", + "name": "lastLeader", + "type": "address" }, { - internalType: "enum ITransactions.TransactionStatus", - name: "status", - type: "uint8", + "internalType": "enum ITransactions.TransactionStatus", + "name": "status", + "type": "uint8" }, { - internalType: "bytes32", - name: "txId", - type: "bytes32", + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "activationBlock", - type: "uint256", + "internalType": "uint256", + "name": "activationBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "processingBlock", - type: "uint256", + "internalType": "uint256", + "name": "processingBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "proposalBlock", - type: "uint256", - }, + "internalType": "uint256", + "name": "proposalBlock", + "type": "uint256" + } ], - internalType: "struct ITransactions.ReadStateBlockRange", - name: "readStateBlockRange", - type: "tuple", + "internalType": "struct ITransactions.ReadStateBlockRange", + "name": "readStateBlockRange", + "type": "tuple" }, { - internalType: "uint256", - name: "numOfRounds", - type: "uint256", + "internalType": "uint256", + "name": "numOfRounds", + "type": "uint256" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "round", - type: "uint256", + "internalType": "uint256", + "name": "round", + "type": "uint256" }, { - internalType: "uint256", - name: "leaderIndex", - type: "uint256", + "internalType": "uint256", + "name": "leaderIndex", + "type": "uint256" }, { - internalType: "uint256", - name: "votesCommitted", - type: "uint256", + "internalType": "uint256", + "name": "votesCommitted", + "type": "uint256" }, { - internalType: "uint256", - name: "votesRevealed", - type: "uint256", + "internalType": "uint256", + "name": "votesRevealed", + "type": "uint256" }, { - internalType: "uint256", - name: "appealBond", - type: "uint256", + "internalType": "uint256", + "name": "appealBond", + "type": "uint256" }, { - internalType: "uint256", - name: "rotationsLeft", - type: "uint256", + "internalType": "uint256", + "name": "rotationsLeft", + "type": "uint256" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "address[]", - name: "roundValidators", - type: "address[]", + "internalType": "address[]", + "name": "roundValidators", + "type": "address[]" }, { - internalType: "bytes32[]", - name: "validatorVotesHash", - type: "bytes32[]", + "internalType": "enum ITransactions.VoteType[]", + "name": "validatorVotes", + "type": "uint8[]" }, { - internalType: "enum ITransactions.VoteType[]", - name: "validatorVotes", - type: "uint8[]", + "internalType": "bytes32[]", + "name": "validatorVotesHash", + "type": "bytes32[]" }, + { + "internalType": "bytes32[]", + "name": "validatorResultHash", + "type": "bytes32[]" + } ], - internalType: "struct ITransactions.RoundData", - name: "lastRound", - type: "tuple", + "internalType": "struct ITransactions.RoundData", + "name": "lastRound", + "type": "tuple" }, + { + "internalType": "address[]", + "name": "consumedValidators", + "type": "address[]" + } ], - internalType: "struct ConsensusData.TransactionData", - name: "txData", - type: "tuple", - }, + "internalType": "struct ConsensusData.TransactionData", + "name": "inputData", + "type": "tuple" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "uint256", - name: "startIndex", - type: "uint256", + "internalType": "uint256", + "name": "startIndex", + "type": "uint256" }, { - internalType: "uint256", - name: "pageSize", - type: "uint256", - }, + "internalType": "uint256", + "name": "pageSize", + "type": "uint256" + } ], - name: "getLatestFinalizedTransactions", - outputs: [ + "name": "getLatestFinalizedTransactions", + "outputs": [ { - components: [ + "components": [ { - internalType: "uint256", - name: "currentTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" }, { - internalType: "address", - name: "sender", - type: "address", + "internalType": "address", + "name": "sender", + "type": "address" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "uint256", - name: "numOfInitialValidators", - type: "uint256", + "internalType": "uint256", + "name": "initialRotations", + "type": "uint256" }, { - internalType: "uint256", - name: "txSlot", - type: "uint256", + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" }, { - internalType: "uint256", - name: "createdTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "createdTimestamp", + "type": "uint256" }, { - internalType: "uint256", - name: "lastVoteTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "lastVoteTimestamp", + "type": "uint256" }, { - internalType: "bytes32", - name: "randomSeed", - type: "bytes32", + "internalType": "bytes32", + "name": "randomSeed", + "type": "bytes32" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "bytes", - name: "txData", - type: "bytes", + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" }, { - internalType: "bytes", - name: "txReceipt", - type: "bytes", + "internalType": "bytes", + "name": "txCalldata", + "type": "bytes" }, { - components: [ + "internalType": "bytes", + "name": "eqBlocksOutputs", + "type": "bytes" + }, + { + "components": [ { - internalType: "enum IMessages.MessageType", - name: "messageType", - type: "uint8", + "internalType": "enum IMessages.MessageType", + "name": "messageType", + "type": "uint8" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "uint256", - name: "value", - type: "uint256", + "internalType": "uint256", + "name": "value", + "type": "uint256" }, { - internalType: "bytes", - name: "data", - type: "bytes", + "internalType": "bytes", + "name": "data", + "type": "bytes" }, { - internalType: "bool", - name: "onAcceptance", - type: "bool", + "internalType": "bool", + "name": "onAcceptance", + "type": "bool" }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + } ], - internalType: "struct IMessages.SubmittedMessage[]", - name: "messages", - type: "tuple[]", + "internalType": "struct IMessages.SubmittedMessage[]", + "name": "messages", + "type": "tuple[]" }, { - internalType: "enum IQueues.QueueType", - name: "queueType", - type: "uint8", + "internalType": "enum IQueues.QueueType", + "name": "queueType", + "type": "uint8" }, { - internalType: "uint256", - name: "queuePosition", - type: "uint256", + "internalType": "uint256", + "name": "queuePosition", + "type": "uint256" }, { - internalType: "address", - name: "activator", - type: "address", + "internalType": "address", + "name": "activator", + "type": "address" }, { - internalType: "address", - name: "lastLeader", - type: "address", + "internalType": "address", + "name": "lastLeader", + "type": "address" }, { - internalType: "enum ITransactions.TransactionStatus", - name: "status", - type: "uint8", + "internalType": "enum ITransactions.TransactionStatus", + "name": "status", + "type": "uint8" }, { - internalType: "bytes32", - name: "txId", - type: "bytes32", + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "activationBlock", - type: "uint256", + "internalType": "uint256", + "name": "activationBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "processingBlock", - type: "uint256", + "internalType": "uint256", + "name": "processingBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "proposalBlock", - type: "uint256", - }, + "internalType": "uint256", + "name": "proposalBlock", + "type": "uint256" + } ], - internalType: "struct ITransactions.ReadStateBlockRange", - name: "readStateBlockRange", - type: "tuple", + "internalType": "struct ITransactions.ReadStateBlockRange", + "name": "readStateBlockRange", + "type": "tuple" }, { - internalType: "uint256", - name: "numOfRounds", - type: "uint256", + "internalType": "uint256", + "name": "numOfRounds", + "type": "uint256" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "round", - type: "uint256", + "internalType": "uint256", + "name": "round", + "type": "uint256" }, { - internalType: "uint256", - name: "leaderIndex", - type: "uint256", + "internalType": "uint256", + "name": "leaderIndex", + "type": "uint256" }, { - internalType: "uint256", - name: "votesCommitted", - type: "uint256", + "internalType": "uint256", + "name": "votesCommitted", + "type": "uint256" }, { - internalType: "uint256", - name: "votesRevealed", - type: "uint256", + "internalType": "uint256", + "name": "votesRevealed", + "type": "uint256" }, { - internalType: "uint256", - name: "appealBond", - type: "uint256", + "internalType": "uint256", + "name": "appealBond", + "type": "uint256" }, { - internalType: "uint256", - name: "rotationsLeft", - type: "uint256", + "internalType": "uint256", + "name": "rotationsLeft", + "type": "uint256" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "address[]", - name: "roundValidators", - type: "address[]", + "internalType": "address[]", + "name": "roundValidators", + "type": "address[]" }, { - internalType: "bytes32[]", - name: "validatorVotesHash", - type: "bytes32[]", + "internalType": "enum ITransactions.VoteType[]", + "name": "validatorVotes", + "type": "uint8[]" }, { - internalType: "enum ITransactions.VoteType[]", - name: "validatorVotes", - type: "uint8[]", + "internalType": "bytes32[]", + "name": "validatorVotesHash", + "type": "bytes32[]" }, + { + "internalType": "bytes32[]", + "name": "validatorResultHash", + "type": "bytes32[]" + } ], - internalType: "struct ITransactions.RoundData", - name: "lastRound", - type: "tuple", + "internalType": "struct ITransactions.RoundData", + "name": "lastRound", + "type": "tuple" }, + { + "internalType": "address[]", + "name": "consumedValidators", + "type": "address[]" + } ], - internalType: "struct ConsensusData.TransactionData[]", - name: "", - type: "tuple[]", - }, + "internalType": "struct ConsensusData.TransactionData[]", + "name": "", + "type": "tuple[]" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "recipient", - type: "address", - }, + "internalType": "address", + "name": "recipient", + "type": "address" + } ], - name: "getLatestFinalizedTxCount", - outputs: [ + "name": "getLatestFinalizedTxCount", + "outputs": [ { - internalType: "uint256", - name: "", - type: "uint256", - }, + "internalType": "uint256", + "name": "", + "type": "uint256" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "recipient", - type: "address", - }, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } ], - name: "getLatestPendingTxCount", - outputs: [ + "name": "getRoleAdmin", + "outputs": [ { - internalType: "uint256", - name: "", - type: "uint256", - }, + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { - internalType: "address", - name: "recipient", - type: "address", - }, + "inputs": [ { - internalType: "uint256", - name: "slot", - type: "uint256", - }, + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } ], - name: "getLatestPendingTxId", - outputs: [ + "name": "getTransactionAllData", + "outputs": [ { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "recipient", - type: "address", - }, - ], - name: "getLatestUndeterminedTransaction", - outputs: [ - { - components: [ + "components": [ { - internalType: "uint256", - name: "currentTimestamp", - type: "uint256", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "address", - name: "sender", - type: "address", + "internalType": "enum ITransactions.VoteType", + "name": "txExecutionResult", + "type": "uint8" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "enum ITransactions.TransactionStatus", + "name": "previousStatus", + "type": "uint8" }, { - internalType: "uint256", - name: "numOfInitialValidators", - type: "uint256", + "internalType": "enum ITransactions.TransactionStatus", + "name": "status", + "type": "uint8" }, { - internalType: "uint256", - name: "txSlot", - type: "uint256", + "internalType": "address", + "name": "txOrigin", + "type": "address" }, { - internalType: "uint256", - name: "createdTimestamp", - type: "uint256", + "internalType": "address", + "name": "sender", + "type": "address" }, { - internalType: "uint256", - name: "lastVoteTimestamp", - type: "uint256", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "bytes32", - name: "randomSeed", - type: "bytes32", + "internalType": "address", + "name": "activator", + "type": "address" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" }, { - internalType: "bytes", - name: "txData", - type: "bytes", + "internalType": "uint256", + "name": "initialRotations", + "type": "uint256" }, { - internalType: "bytes", - name: "txReceipt", - type: "bytes", + "internalType": "uint256", + "name": "numOfInitialValidators", + "type": "uint256" }, { - components: [ - { - internalType: "enum IMessages.MessageType", - name: "messageType", - type: "uint8", - }, - { - internalType: "address", - name: "recipient", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "bool", - name: "onAcceptance", - type: "bool", - }, - ], - internalType: "struct IMessages.SubmittedMessage[]", - name: "messages", - type: "tuple[]", + "internalType": "uint256", + "name": "epoch", + "type": "uint256" }, { - internalType: "enum IQueues.QueueType", - name: "queueType", - type: "uint8", + "internalType": "bytes32", + "name": "id", + "type": "bytes32" }, { - internalType: "uint256", - name: "queuePosition", - type: "uint256", + "internalType": "bytes32", + "name": "randomSeed", + "type": "bytes32" }, { - internalType: "address", - name: "activator", - type: "address", + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" }, { - internalType: "address", - name: "lastLeader", - type: "address", + "internalType": "bytes32", + "name": "resultHash", + "type": "bytes32" }, { - internalType: "enum ITransactions.TransactionStatus", - name: "status", - type: "uint8", + "internalType": "bytes", + "name": "txCalldata", + "type": "bytes" }, { - internalType: "bytes32", - name: "txId", - type: "bytes32", + "internalType": "bytes", + "name": "eqBlocksOutputs", + "type": "bytes" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "activationBlock", - type: "uint256", + "internalType": "uint256", + "name": "activationBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "processingBlock", - type: "uint256", + "internalType": "uint256", + "name": "processingBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "proposalBlock", - type: "uint256", - }, + "internalType": "uint256", + "name": "proposalBlock", + "type": "uint256" + } ], - internalType: "struct ITransactions.ReadStateBlockRange", - name: "readStateBlockRange", - type: "tuple", + "internalType": "struct ITransactions.ReadStateBlockRange[]", + "name": "readStateBlockRanges", + "type": "tuple[]" }, { - internalType: "uint256", - name: "numOfRounds", - type: "uint256", + "internalType": "uint256", + "name": "validUntil", + "type": "uint256" }, { - components: [ - { - internalType: "uint256", - name: "round", - type: "uint256", - }, - { - internalType: "uint256", - name: "leaderIndex", - type: "uint256", - }, - { - internalType: "uint256", - name: "votesCommitted", - type: "uint256", - }, - { - internalType: "uint256", - name: "votesRevealed", - type: "uint256", - }, - { - internalType: "uint256", - name: "appealBond", - type: "uint256", - }, - { - internalType: "uint256", - name: "rotationsLeft", - type: "uint256", - }, - { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", - }, - { - internalType: "address[]", - name: "roundValidators", - type: "address[]", - }, - { - internalType: "bytes32[]", - name: "validatorVotesHash", - type: "bytes32[]", - }, - { - internalType: "enum ITransactions.VoteType[]", - name: "validatorVotes", - type: "uint8[]", - }, - ], - internalType: "struct ITransactions.RoundData", - name: "lastRound", - type: "tuple", - }, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } ], - internalType: "struct ConsensusData.TransactionData", - name: "txData", - type: "tuple", + "internalType": "struct ITransactions.Transaction", + "name": "transaction", + "type": "tuple" }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "recipient", - type: "address", - }, - ], - name: "getLatestUndeterminedTxCount", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ { - internalType: "bytes32", - name: "_tx_id", - type: "bytes32", - }, - ], - name: "getMessagesForTransaction", - outputs: [ - { - components: [ + "components": [ { - internalType: "enum IMessages.MessageType", - name: "messageType", - type: "uint8", + "internalType": "uint256", + "name": "round", + "type": "uint256" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "uint256", + "name": "leaderIndex", + "type": "uint256" }, { - internalType: "uint256", - name: "value", - type: "uint256", + "internalType": "uint256", + "name": "votesCommitted", + "type": "uint256" }, { - internalType: "bytes", - name: "data", - type: "bytes", + "internalType": "uint256", + "name": "votesRevealed", + "type": "uint256" }, { - internalType: "bool", - name: "onAcceptance", - type: "bool", + "internalType": "uint256", + "name": "appealBond", + "type": "uint256" }, - ], - internalType: "struct IMessages.SubmittedMessage[]", - name: "", - type: "tuple[]", - }, - { - internalType: "address", - name: "ghostAddress", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_tx_id", - type: "bytes32", - }, - ], - name: "getReadStateBlockRangeForTransaction", - outputs: [ - { - internalType: "uint256", - name: "activationBlock", - type: "uint256", - }, - { - internalType: "uint256", - name: "processingBlock", - type: "uint256", - }, - { - internalType: "uint256", - name: "proposalBlock", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "recipient", - type: "address", - }, - { - internalType: "uint256", - name: "startIndex", - type: "uint256", - }, - { - internalType: "uint256", - name: "endIndex", - type: "uint256", - }, - ], - name: "getRecipientQueues", - outputs: [ - { - components: [ { - components: [ - { - internalType: "uint256", - name: "head", - type: "uint256", - }, - { - internalType: "uint256", - name: "tail", - type: "uint256", - }, - { - internalType: "bytes32[]", - name: "txIds", - type: "bytes32[]", - }, - ], - internalType: "struct IQueues.QueueInfoView", - name: "pending", - type: "tuple", + "internalType": "uint256", + "name": "rotationsLeft", + "type": "uint256" }, { - components: [ - { - internalType: "uint256", - name: "head", - type: "uint256", - }, - { - internalType: "uint256", - name: "tail", - type: "uint256", - }, - { - internalType: "bytes32[]", - name: "txIds", - type: "bytes32[]", - }, - ], - internalType: "struct IQueues.QueueInfoView", - name: "accepted", - type: "tuple", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - components: [ - { - internalType: "uint256", - name: "head", - type: "uint256", - }, - { - internalType: "uint256", - name: "tail", - type: "uint256", - }, - { - internalType: "bytes32[]", - name: "txIds", - type: "bytes32[]", - }, - ], - internalType: "struct IQueues.QueueInfoView", - name: "undetermined", - type: "tuple", + "internalType": "address[]", + "name": "roundValidators", + "type": "address[]" }, { - internalType: "uint256", - name: "finalizedCount", - type: "uint256", + "internalType": "enum ITransactions.VoteType[]", + "name": "validatorVotes", + "type": "uint8[]" }, { - internalType: "uint256", - name: "issuedTxCount", - type: "uint256", + "internalType": "bytes32[]", + "name": "validatorVotesHash", + "type": "bytes32[]" }, + { + "internalType": "bytes32[]", + "name": "validatorResultHash", + "type": "bytes32[]" + } ], - internalType: "struct IQueues.RecipientQueuesView", - name: "", - type: "tuple", - }, + "internalType": "struct ITransactions.RoundData[]", + "name": "roundsData", + "type": "tuple[]" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "role", - type: "bytes32", + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" }, - ], - name: "getRoleAdmin", - outputs: [ { - internalType: "bytes32", - name: "", - type: "bytes32", - }, + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getTotalNumOfTransactions", - outputs: [ + "name": "getTransactionData", + "outputs": [ { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_tx_id", - type: "bytes32", - }, - ], - name: "getTransactionAllData", - outputs: [ - { - components: [ + "components": [ { - internalType: "bytes32", - name: "id", - type: "bytes32", + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" }, { - internalType: "address", - name: "sender", - type: "address", + "internalType": "address", + "name": "sender", + "type": "address" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "uint256", - name: "numOfInitialValidators", - type: "uint256", + "internalType": "uint256", + "name": "initialRotations", + "type": "uint256" }, { - internalType: "uint256", - name: "txSlot", - type: "uint256", + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" }, { - internalType: "address", - name: "activator", - type: "address", + "internalType": "uint256", + "name": "createdTimestamp", + "type": "uint256" }, { - internalType: "enum ITransactions.TransactionStatus", - name: "status", - type: "uint8", + "internalType": "uint256", + "name": "lastVoteTimestamp", + "type": "uint256" }, { - internalType: "enum ITransactions.TransactionStatus", - name: "previousStatus", - type: "uint8", + "internalType": "bytes32", + "name": "randomSeed", + "type": "bytes32" }, { - components: [ - { - internalType: "uint256", - name: "created", - type: "uint256", - }, - { - internalType: "uint256", - name: "pending", - type: "uint256", - }, - { - internalType: "uint256", - name: "activated", - type: "uint256", - }, - { - internalType: "uint256", - name: "proposed", - type: "uint256", - }, - { - internalType: "uint256", - name: "committed", - type: "uint256", - }, - { - internalType: "uint256", - name: "lastVote", - type: "uint256", - }, - { - internalType: "uint256", - name: "appealSubmitted", - type: "uint256", - }, - ], - internalType: "struct ITransactions.Timestamps", - name: "timestamps", - type: "tuple", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "bytes32", - name: "randomSeed", - type: "bytes32", + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" }, { - internalType: "bool", - name: "onAcceptanceMessages", - type: "bool", + "internalType": "bytes", + "name": "txCalldata", + "type": "bytes" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "bytes", + "name": "eqBlocksOutputs", + "type": "bytes" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "activationBlock", - type: "uint256", + "internalType": "enum IMessages.MessageType", + "name": "messageType", + "type": "uint8" }, { - internalType: "uint256", - name: "processingBlock", - type: "uint256", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "uint256", - name: "proposalBlock", - type: "uint256", - }, - ], - internalType: "struct ITransactions.ReadStateBlockRange", - name: "readStateBlockRange", - type: "tuple", - }, - { - internalType: "bytes", - name: "txData", - type: "bytes", - }, - { - internalType: "bytes", - name: "txReceipt", - type: "bytes", - }, - { - components: [ - { - internalType: "enum IMessages.MessageType", - name: "messageType", - type: "uint8", - }, - { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "uint256", + "name": "value", + "type": "uint256" }, { - internalType: "uint256", - name: "value", - type: "uint256", + "internalType": "bytes", + "name": "data", + "type": "bytes" }, { - internalType: "bytes", - name: "data", - type: "bytes", + "internalType": "bool", + "name": "onAcceptance", + "type": "bool" }, { - internalType: "bool", - name: "onAcceptance", - type: "bool", - }, + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + } ], - internalType: "struct IMessages.SubmittedMessage[]", - name: "messages", - type: "tuple[]", + "internalType": "struct IMessages.SubmittedMessage[]", + "name": "messages", + "type": "tuple[]" }, { - internalType: "address[]", - name: "consumedValidators", - type: "address[]", + "internalType": "enum IQueues.QueueType", + "name": "queueType", + "type": "uint8" }, { - components: [ - { - internalType: "uint256", - name: "round", - type: "uint256", - }, - { - internalType: "uint256", - name: "leaderIndex", - type: "uint256", - }, - { - internalType: "uint256", - name: "votesCommitted", - type: "uint256", - }, - { - internalType: "uint256", - name: "votesRevealed", - type: "uint256", - }, - { - internalType: "uint256", - name: "appealBond", - type: "uint256", - }, - { - internalType: "uint256", - name: "rotationsLeft", - type: "uint256", - }, - { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", - }, - { - internalType: "address[]", - name: "roundValidators", - type: "address[]", - }, - { - internalType: "bytes32[]", - name: "validatorVotesHash", - type: "bytes32[]", - }, - { - internalType: "enum ITransactions.VoteType[]", - name: "validatorVotes", - type: "uint8[]", - }, - ], - internalType: "struct ITransactions.RoundData[]", - name: "roundData", - type: "tuple[]", + "internalType": "uint256", + "name": "queuePosition", + "type": "uint256" }, - ], - internalType: "struct ITransactions.Transaction", - name: "transaction", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_tx_id", - type: "bytes32", - }, - { - internalType: "uint256", - name: "_timestamp", - type: "uint256", - }, - ], - name: "getTransactionData", - outputs: [ - { - components: [ { - internalType: "uint256", - name: "currentTimestamp", - type: "uint256", + "internalType": "address", + "name": "activator", + "type": "address" }, { - internalType: "address", - name: "sender", - type: "address", + "internalType": "address", + "name": "lastLeader", + "type": "address" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "enum ITransactions.TransactionStatus", + "name": "status", + "type": "uint8" }, { - internalType: "uint256", - name: "numOfInitialValidators", - type: "uint256", + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - internalType: "uint256", - name: "txSlot", - type: "uint256", - }, - { - internalType: "uint256", - name: "createdTimestamp", - type: "uint256", - }, - { - internalType: "uint256", - name: "lastVoteTimestamp", - type: "uint256", - }, - { - internalType: "bytes32", - name: "randomSeed", - type: "bytes32", - }, - { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", - }, - { - internalType: "bytes", - name: "txData", - type: "bytes", - }, - { - internalType: "bytes", - name: "txReceipt", - type: "bytes", - }, - { - components: [ - { - internalType: "enum IMessages.MessageType", - name: "messageType", - type: "uint8", - }, + "components": [ { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "uint256", + "name": "activationBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "value", - type: "uint256", + "internalType": "uint256", + "name": "processingBlock", + "type": "uint256" }, { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "bool", - name: "onAcceptance", - type: "bool", - }, + "internalType": "uint256", + "name": "proposalBlock", + "type": "uint256" + } ], - internalType: "struct IMessages.SubmittedMessage[]", - name: "messages", - type: "tuple[]", - }, - { - internalType: "enum IQueues.QueueType", - name: "queueType", - type: "uint8", - }, - { - internalType: "uint256", - name: "queuePosition", - type: "uint256", - }, - { - internalType: "address", - name: "activator", - type: "address", + "internalType": "struct ITransactions.ReadStateBlockRange", + "name": "readStateBlockRange", + "type": "tuple" }, { - internalType: "address", - name: "lastLeader", - type: "address", + "internalType": "uint256", + "name": "numOfRounds", + "type": "uint256" }, { - internalType: "enum ITransactions.TransactionStatus", - name: "status", - type: "uint8", - }, - { - internalType: "bytes32", - name: "txId", - type: "bytes32", - }, - { - components: [ + "components": [ { - internalType: "uint256", - name: "activationBlock", - type: "uint256", + "internalType": "uint256", + "name": "round", + "type": "uint256" }, { - internalType: "uint256", - name: "processingBlock", - type: "uint256", + "internalType": "uint256", + "name": "leaderIndex", + "type": "uint256" }, { - internalType: "uint256", - name: "proposalBlock", - type: "uint256", + "internalType": "uint256", + "name": "votesCommitted", + "type": "uint256" }, - ], - internalType: "struct ITransactions.ReadStateBlockRange", - name: "readStateBlockRange", - type: "tuple", - }, - { - internalType: "uint256", - name: "numOfRounds", - type: "uint256", - }, - { - components: [ { - internalType: "uint256", - name: "round", - type: "uint256", + "internalType": "uint256", + "name": "votesRevealed", + "type": "uint256" }, { - internalType: "uint256", - name: "leaderIndex", - type: "uint256", + "internalType": "uint256", + "name": "appealBond", + "type": "uint256" }, { - internalType: "uint256", - name: "votesCommitted", - type: "uint256", + "internalType": "uint256", + "name": "rotationsLeft", + "type": "uint256" }, { - internalType: "uint256", - name: "votesRevealed", - type: "uint256", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "uint256", - name: "appealBond", - type: "uint256", + "internalType": "address[]", + "name": "roundValidators", + "type": "address[]" }, { - internalType: "uint256", - name: "rotationsLeft", - type: "uint256", + "internalType": "enum ITransactions.VoteType[]", + "name": "validatorVotes", + "type": "uint8[]" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "bytes32[]", + "name": "validatorVotesHash", + "type": "bytes32[]" }, { - internalType: "address[]", - name: "roundValidators", - type: "address[]", - }, - { - internalType: "bytes32[]", - name: "validatorVotesHash", - type: "bytes32[]", - }, - { - internalType: "enum ITransactions.VoteType[]", - name: "validatorVotes", - type: "uint8[]", - }, + "internalType": "bytes32[]", + "name": "validatorResultHash", + "type": "bytes32[]" + } ], - internalType: "struct ITransactions.RoundData", - name: "lastRound", - type: "tuple", + "internalType": "struct ITransactions.RoundData", + "name": "lastRound", + "type": "tuple" }, + { + "internalType": "address[]", + "name": "consumedValidators", + "type": "address[]" + } ], - internalType: "struct ConsensusData.TransactionData", - name: "", - type: "tuple", - }, + "internalType": "struct ConsensusData.TransactionData", + "name": "", + "type": "tuple" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "uint256", - name: "startIndex", - type: "uint256", + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" }, { - internalType: "uint256", - name: "endIndex", - type: "uint256", - }, + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } ], - name: "getTransactionIndexToTxId", - outputs: [ + "name": "getTransactionStatus", + "outputs": [ { - internalType: "bytes32[]", - name: "", - type: "bytes32[]", - }, + "internalType": "enum ITransactions.TransactionStatus", + "name": "", + "type": "uint8" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { - internalType: "bytes32", - name: "_tx_id", - type: "bytes32", - }, + "inputs": [ { - internalType: "uint256", - name: "_timestamp", - type: "uint256", - }, + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } ], - name: "getTransactionStatus", - outputs: [ + "name": "getValidatorsForLastRound", + "outputs": [ { - internalType: "enum ITransactions.TransactionStatus", - name: "", - type: "uint8", - }, + "internalType": "address[]", + "name": "validators", + "type": "address[]" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "_tx_id", - type: "bytes32", + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, - ], - name: "getValidatorsForLastAppeal", - outputs: [ { - internalType: "address[]", - name: "", - type: "address[]", - }, + "internalType": "address", + "name": "account", + "type": "address" + } ], - stateMutability: "view", - type: "function", + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "_tx_id", - type: "bytes32", + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, - ], - name: "getValidatorsForLastRound", - outputs: [ { - internalType: "address[]", - name: "", - type: "address[]", - }, + "internalType": "address", + "name": "account", + "type": "address" + } ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, + "name": "hasRole", + "outputs": [ { - internalType: "address", - name: "account", - type: "address", - }, + "internalType": "bool", + "name": "", + "type": "bool" + } ], - name: "grantRole", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - { - internalType: "address", - name: "account", - type: "address", - }, + "internalType": "address", + "name": "_addressManager", + "type": "address" + } ], - name: "hasRole", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ - { - internalType: "bytes32", - name: "_tx_id", - type: "bytes32", - }, - ], - name: "hasTransactionOnAcceptanceMessages", - outputs: [ + "inputs": [], + "name": "owner", + "outputs": [ { - internalType: "bool", - name: "", - type: "bool", - }, + "internalType": "address", + "name": "", + "type": "address" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [], + "name": "pendingOwner", + "outputs": [ { - internalType: "bytes32", - name: "_tx_id", - type: "bytes32", - }, + "internalType": "address", + "name": "", + "type": "address" + } ], - name: "hasTransactionOnFinalizationMessages", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { - internalType: "address", - name: "_consensusMain", - type: "address", - }, - { - internalType: "address", - name: "_transactions", - type: "address", - }, - { - internalType: "address", - name: "_queues", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [], - name: "owner", - outputs: [ + "inputs": [ { - internalType: "address", - name: "", - type: "address", + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "pendingOwner", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "queues", - outputs: [ - { - internalType: "contract IQueues", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "renounceOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - { - internalType: "address", - name: "callerConfirmation", - type: "address", - }, - ], - name: "renounceRole", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - { - internalType: "address", - name: "account", - type: "address", - }, + "internalType": "address", + "name": "callerConfirmation", + "type": "address" + } ], - name: "revokeRole", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "_consensusMain", - type: "address", + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, - ], - name: "setConsensusMain", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ { - internalType: "address", - name: "_queues", - type: "address", - }, + "internalType": "address", + "name": "account", + "type": "address" + } ], - name: "setQueues", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "_transactions", - type: "address", - }, + "internalType": "address", + "name": "_addressManager", + "type": "address" + } ], - name: "setTransactions", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "setAddressManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes4", - name: "interfaceId", - type: "bytes4", - }, + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } ], - name: "supportsInterface", - outputs: [ + "name": "supportsInterface", + "outputs": [ { - internalType: "bool", - name: "", - type: "bool", - }, + "internalType": "bool", + "name": "", + "type": "bool" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: "transactions", - outputs: [ + "inputs": [ { - internalType: "contract ITransactions", - name: "", - type: "address", - }, + "internalType": "address", + "name": "newOwner", + "type": "address" + } ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } ], bytecode: "", }; diff --git a/src/chains/testnetAsimov.ts b/src/chains/testnetAsimov.ts index 59baec3..3cb20ad 100644 --- a/src/chains/testnetAsimov.ts +++ b/src/chains/testnetAsimov.ts @@ -15,1393 +15,1535 @@ const CONSENSUS_MAIN_CONTRACT = { address: "0x6CAFF6769d70824745AD895663409DC70aB5B28E" as Address, abi: [ { - inputs: [], - name: "AccessControlBadConfirmation", - type: "error", + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" }, { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - { - internalType: "bytes32", - name: "neededRole", - type: "bytes32", - }, - ], - name: "AccessControlUnauthorizedAccount", - type: "error", - }, - { - inputs: [], - name: "CallerNotMessages", - type: "error", + "inputs": [], + "name": "CallerNotMessages", + "type": "error" }, { - inputs: [], - name: "CanNotAppeal", - type: "error", + "inputs": [], + "name": "CanNotAppeal", + "type": "error" }, { - inputs: [], - name: "EmptyTransaction", - type: "error", + "inputs": [], + "name": "InsufficientFees", + "type": "error" }, { - inputs: [], - name: "FinalizationNotAllowed", - type: "error", + "inputs": [], + "name": "InvalidDeploymentWithSalt", + "type": "error" }, { - inputs: [], - name: "InvalidAddress", - type: "error", + "inputs": [], + "name": "InvalidGhostContract", + "type": "error" }, { - inputs: [], - name: "InvalidGhostContract", - type: "error", + "inputs": [], + "name": "InvalidInitialization", + "type": "error" }, { - inputs: [], - name: "InvalidInitialization", - type: "error", + "inputs": [], + "name": "InvalidRevealLeaderData", + "type": "error" }, { - inputs: [], - name: "InvalidVote", - type: "error", + "inputs": [], + "name": "InvalidVote", + "type": "error" }, { - inputs: [], - name: "MaxNumOfIterationsInPendingQueueReached", - type: "error", + "inputs": [], + "name": "NotInitializing", + "type": "error" }, { - inputs: [ - { - internalType: "uint256", - name: "numOfMessages", - type: "uint256", - }, + "inputs": [ { - internalType: "uint256", - name: "maxAllocatedMessages", - type: "uint256", - }, + "internalType": "address", + "name": "owner", + "type": "address" + } ], - name: "MaxNumOfMessagesExceeded", - type: "error", + "name": "OwnableInvalidOwner", + "type": "error" }, { - inputs: [], - name: "NonGenVMContract", - type: "error", + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" }, { - inputs: [], - name: "NotInitializing", - type: "error", + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" }, { - inputs: [ + "anonymous": false, + "inputs": [ { - internalType: "address", - name: "owner", - type: "address", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, - ], - name: "OwnableInvalidOwner", - type: "error", - }, - { - inputs: [ { - internalType: "address", - name: "account", - type: "address", + "indexed": true, + "internalType": "address", + "name": "oldActivator", + "type": "address" }, + { + "indexed": true, + "internalType": "address", + "name": "newActivator", + "type": "address" + } ], - name: "OwnableUnauthorizedAccount", - type: "error", + "name": "ActivatorReplaced", + "type": "event" }, { - inputs: [], - name: "ReentrancyGuardReentrantCall", - type: "error", - }, - { - inputs: [], - name: "TransactionNotAtPendingQueueHead", - type: "error", + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "addressManager", + "type": "address" + } + ], + "name": "AddressManagerSet", + "type": "event" }, { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", - }, - { - indexed: true, - internalType: "address", - name: "appealer", - type: "address", - }, + "anonymous": false, + "inputs": [ { - indexed: false, - internalType: "uint256", - name: "appealBond", - type: "uint256", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: false, - internalType: "address[]", - name: "appealValidators", - type: "address[]", - }, + "indexed": false, + "internalType": "enum ITransactions.TransactionStatus", + "name": "newStatus", + "type": "uint8" + } ], - name: "AppealStarted", - type: "event", + "name": "AllVotesCommitted", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "recipient", - type: "address", + "indexed": true, + "internalType": "address", + "name": "appellant", + "type": "address" }, { - indexed: false, - internalType: "bytes", - name: "data", - type: "bytes", + "indexed": false, + "internalType": "uint256", + "name": "bond", + "type": "uint256" }, + { + "indexed": false, + "internalType": "address[]", + "name": "validators", + "type": "address[]" + } ], - name: "ErrorMessage", - type: "event", + "name": "AppealStarted", + "type": "event" }, { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: "address", - name: "ghostFactory", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "genManager", - type: "address", - }, - { - indexed: false, - internalType: "address", - name: "genTransactions", - type: "address", - }, + "anonymous": false, + "inputs": [ { - indexed: false, - internalType: "address", - name: "genQueue", - type: "address", + "indexed": false, + "internalType": "uint256", + "name": "attempted", + "type": "uint256" }, { - indexed: false, - internalType: "address", - name: "genStaking", - type: "address", + "indexed": false, + "internalType": "uint256", + "name": "succeeded", + "type": "uint256" }, { - indexed: false, - internalType: "address", - name: "genMessages", - type: "address", - }, + "indexed": false, + "internalType": "uint256", + "name": "failed", + "type": "uint256" + } + ], + "name": "BatchFinalizationCompleted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - indexed: false, - internalType: "address", - name: "idleness", - type: "address", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: false, - internalType: "address", - name: "tribunalAppeal", - type: "address", - }, + "indexed": false, + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" + } ], - name: "ExternalContractsSet", - type: "event", + "name": "CreatedTransaction", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } ], - name: "Initialized", - type: "event", + "name": "Initialized", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "recipient", - type: "address", + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" }, { - indexed: true, - internalType: "address", - name: "activator", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "activator", + "type": "address" + } ], - name: "InternalMessageProcessed", - type: "event", + "name": "InternalMessageProcessed", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "recipient", - type: "address", + "indexed": true, + "internalType": "address", + "name": "oldLeader", + "type": "address" }, { - indexed: true, - internalType: "address", - name: "activator", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "newLeader", + "type": "address" + } ], - name: "NewTransaction", - type: "event", + "name": "LeaderIdlenessProcessed", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" }, + { + "indexed": true, + "internalType": "address", + "name": "activator", + "type": "address" + } ], - name: "OwnershipTransferStarted", - type: "event", + "name": "NewTransaction", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" }, { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } ], - name: "OwnershipTransferred", - type: "event", + "name": "OwnershipTransferStarted", + "type": "event" }, { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "role", - type: "bytes32", - }, + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "previousAdminRole", - type: "bytes32", + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" }, { - indexed: true, - internalType: "bytes32", - name: "newAdminRole", - type: "bytes32", - }, + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } ], - name: "RoleAdminChanged", - type: "event", + "name": "OwnershipTransferred", + "type": "event" }, { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } ], - name: "RoleGranted", - type: "event", + "name": "ProcessIdlenessAccepted", + "type": "event" }, { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "role", - type: "bytes32", - }, + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "account", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } ], - name: "RoleRevoked", - type: "event", + "name": "TransactionAccepted", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "leader", + "type": "address" + } ], - name: "SlashAppealSubmitted", - type: "event", + "name": "TransactionActivated", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "tx_id", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, + { + "indexed": true, + "internalType": "address", + "name": "cancelledBy", + "type": "address" + } ], - name: "TransactionAccepted", - type: "event", + "name": "TransactionCancelled", + "type": "event" }, { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", - }, + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "leader", - type: "address", - }, + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } ], - name: "TransactionActivated", - type: "event", + "name": "TransactionFinalizationFailed", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", - }, - { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } ], - name: "TransactionCancelled", - type: "event", + "name": "TransactionFinalized", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "tx_id", - type: "bytes32", - }, + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } ], - name: "TransactionFinalized", - type: "event", + "name": "TransactionLeaderRevealed", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "oldValidator", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "newValidator", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "newLeader", + "type": "address" + } ], - name: "TransactionIdleValidatorReplaced", - type: "event", + "name": "TransactionLeaderRotated", + "type": "event" }, { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", - }, + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "uint256", - name: "validatorIndex", - type: "uint256", - }, + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } ], - name: "TransactionIdleValidatorReplacementFailed", - type: "event", + "name": "TransactionLeaderTimeout", + "type": "event" }, { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", - }, + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "newLeader", - type: "address", - }, + "indexed": false, + "internalType": "bytes32[]", + "name": "txIds", + "type": "bytes32[]" + } ], - name: "TransactionLeaderRotated", - type: "event", + "name": "TransactionNeedsRecomputation", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "tx_id", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, + { + "indexed": false, + "internalType": "address[]", + "name": "validators", + "type": "address[]" + } ], - name: "TransactionLeaderTimeout", - type: "event", + "name": "TransactionReceiptProposed", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: false, - internalType: "bytes32[]", - name: "tx_ids", - type: "bytes32[]", - }, + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } ], - name: "TransactionNeedsRecomputation", - type: "event", + "name": "TransactionUndetermined", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "tx_id", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: false, - internalType: "address[]", - name: "validators", - type: "address[]", + "indexed": false, + "internalType": "uint256", + "name": "tribunalIndex", + "type": "uint256" }, + { + "indexed": true, + "internalType": "address", + "name": "validator", + "type": "address" + } ], - name: "TransactionReceiptProposed", - type: "event", + "name": "TribunalAppealVoteCommitted", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tribunalIndex", + "type": "uint256" + }, { - indexed: true, - internalType: "bytes32", - name: "tx_id", - type: "bytes32", + "indexed": true, + "internalType": "address", + "name": "validator", + "type": "address" }, + { + "indexed": false, + "internalType": "enum ITransactions.VoteType", + "name": "voteType", + "type": "uint8" + } ], - name: "TransactionUndetermined", - type: "event", + "name": "TribunalAppealVoteRevealed", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "validator", - type: "address", + "indexed": true, + "internalType": "address", + "name": "oldValidator", + "type": "address" }, { - indexed: false, - internalType: "bool", - name: "isLastVote", - type: "bool", + "indexed": true, + "internalType": "address", + "name": "newValidator", + "type": "address" }, + { + "indexed": false, + "internalType": "uint256", + "name": "validatorIndex", + "type": "uint256" + } ], - name: "TribunalAppealVoteCommitted", - type: "event", + "name": "ValidatorReplaced", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "validator", - type: "address", + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" }, { - indexed: false, - internalType: "bool", - name: "isLastVote", - type: "bool", - }, + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } ], - name: "TribunalAppealVoteRevealed", - type: "event", + "name": "ValueWithdrawalFailed", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "validator", - type: "address", + "indexed": true, + "internalType": "address", + "name": "validator", + "type": "address" }, { - indexed: false, - internalType: "bool", - name: "isLastVote", - type: "bool", - }, + "indexed": false, + "internalType": "bool", + "name": "isLastVote", + "type": "bool" + } ], - name: "VoteCommitted", - type: "event", + "name": "VoteCommitted", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "txId", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "validator", - type: "address", + "indexed": true, + "internalType": "address", + "name": "validator", + "type": "address" }, { - indexed: false, - internalType: "enum ITransactions.VoteType", - name: "voteType", - type: "uint8", + "indexed": false, + "internalType": "enum ITransactions.VoteType", + "name": "voteType", + "type": "uint8" }, { - indexed: false, - internalType: "bool", - name: "isLastVote", - type: "bool", + "indexed": false, + "internalType": "bool", + "name": "isLastVote", + "type": "bool" }, { - indexed: false, - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", - }, + "indexed": false, + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" + } ], - name: "VoteRevealed", - type: "event", + "name": "VoteRevealed", + "type": "event" }, { - inputs: [], - name: "DEFAULT_ADMIN_ROLE", - outputs: [ + "inputs": [], + "name": "EVENTS_BATCH_SIZE", + "outputs": [ { - internalType: "bytes32", - name: "", - type: "bytes32", - }, + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "VERSION", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: "acceptOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "_txId", - type: "bytes32", + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" }, { - internalType: "bytes", - name: "_vrfProof", - type: "bytes", + "internalType": "address", + "name": "_operator", + "type": "address" }, + { + "internalType": "bytes", + "name": "_vrfProof", + "type": "bytes" + } ], - name: "activateTransaction", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "activateTransaction", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "_sender", - type: "address", + "internalType": "address", + "name": "_sender", + "type": "address" }, { - internalType: "address", - name: "_recipient", - type: "address", + "internalType": "address", + "name": "_recipient", + "type": "address" }, { - internalType: "uint256", - name: "_numOfInitialValidators", - type: "uint256", + "internalType": "uint256", + "name": "_numOfInitialValidators", + "type": "uint256" }, { - internalType: "uint256", - name: "_maxRotations", - type: "uint256", + "internalType": "uint256", + "name": "_maxRotations", + "type": "uint256" }, { - internalType: "bytes", - name: "_calldata", - type: "bytes", + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" }, { - internalType: "uint256", - name: "_validUntil", - type: "uint256", + "components": [ + { + "internalType": "uint256", + "name": "leaderTimeoutFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "validatorsTimeoutFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "appealRounds", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rollupStorageFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rollupGenVMFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalMessageFees", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "rotations", + "type": "uint256[]" + } + ], + "internalType": "struct IFeeManager.FeesDistribution", + "name": "_feesDistribution", + "type": "tuple" }, + { + "internalType": "uint256", + "name": "_validUntil", + "type": "uint256" + } ], - name: "addTransaction", - outputs: [], - stateMutability: "payable", - type: "function", + "name": "addTransaction", + "outputs": [], + "stateMutability": "payable", + "type": "function" }, { - inputs: [ + "inputs": [], + "name": "addressManager", + "outputs": [ { - internalType: "bytes32", - name: "_txId", - type: "bytes32", - }, + "internalType": "contract IAddressManager", + "name": "", + "type": "address" + } ], - name: "cancelTransaction", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { - internalType: "bytes32", - name: "_txId", - type: "bytes32", - }, + "inputs": [ { - internalType: "bytes32", - name: "_commitHash", - type: "bytes32", - }, + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } ], - name: "commitTribunalAppealVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "cancelTransaction", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "_txId", - type: "bytes32", + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" }, { - internalType: "bytes32", - name: "_commitHash", - type: "bytes32", + "internalType": "uint256", + "name": "_tribunalIndex", + "type": "uint256" }, + { + "internalType": "bytes32", + "name": "_commitHash", + "type": "bytes32" + } ], - name: "commitVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "commitTribunalAppealVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [], - name: "contracts", - outputs: [ - { - internalType: "contract IGenManager", - name: "genManager", - type: "address", - }, - { - internalType: "contract ITransactions", - name: "genTransactions", - type: "address", - }, - { - internalType: "contract IQueues", - name: "genQueue", - type: "address", - }, - { - internalType: "contract IGhostFactory", - name: "ghostFactory", - type: "address", - }, - { - internalType: "contract IGenStaking", - name: "genStaking", - type: "address", - }, + "inputs": [ { - internalType: "contract IMessages", - name: "genMessages", - type: "address", + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" }, { - internalType: "contract IIdleness", - name: "idleness", - type: "address", + "internalType": "bytes32", + "name": "_commitHash", + "type": "bytes32" }, { - internalType: "contract ITribunalAppeal", - name: "tribunalAppeal", - type: "address", - }, + "internalType": "uint256", + "name": "_validatorIndex", + "type": "uint256" + } ], - stateMutability: "view", - type: "function", + "name": "commitVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ - { - internalType: "address", - name: "_recipient", - type: "address", - }, + "inputs": [ { - internalType: "uint256", - name: "_value", - type: "uint256", + "internalType": "address", + "name": "_sender", + "type": "address" }, { - internalType: "bytes", - name: "_data", - type: "bytes", + "internalType": "uint256", + "name": "_numOfInitialValidators", + "type": "uint256" }, - ], - name: "executeMessage", - outputs: [ { - internalType: "bool", - name: "success", - type: "bool", + "internalType": "uint256", + "name": "_maxRotations", + "type": "uint256" }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ { - internalType: "bytes32", - name: "_txId", - type: "bytes32", + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" }, - ], - name: "finalizeTransaction", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [], - name: "getContracts", - outputs: [ { - components: [ - { - internalType: "contract IGenManager", - name: "genManager", - type: "address", - }, + "components": [ { - internalType: "contract ITransactions", - name: "genTransactions", - type: "address", + "internalType": "uint256", + "name": "leaderTimeoutFee", + "type": "uint256" }, { - internalType: "contract IQueues", - name: "genQueue", - type: "address", + "internalType": "uint256", + "name": "validatorsTimeoutFee", + "type": "uint256" }, { - internalType: "contract IGhostFactory", - name: "ghostFactory", - type: "address", + "internalType": "uint256", + "name": "appealRounds", + "type": "uint256" }, { - internalType: "contract IGenStaking", - name: "genStaking", - type: "address", + "internalType": "uint256", + "name": "rollupStorageFee", + "type": "uint256" }, { - internalType: "contract IMessages", - name: "genMessages", - type: "address", + "internalType": "uint256", + "name": "rollupGenVMFee", + "type": "uint256" }, { - internalType: "contract IIdleness", - name: "idleness", - type: "address", + "internalType": "uint256", + "name": "totalMessageFees", + "type": "uint256" }, { - internalType: "contract ITribunalAppeal", - name: "tribunalAppeal", - type: "address", - }, + "internalType": "uint256[]", + "name": "rotations", + "type": "uint256[]" + } ], - internalType: "struct IConsensusMain.ExternalContracts", - name: "", - type: "tuple", + "internalType": "struct IFeeManager.FeesDistribution", + "name": "_feesDistribution", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "_saltNonce", + "type": "uint256" }, + { + "internalType": "uint256", + "name": "_validUntil", + "type": "uint256" + } ], - stateMutability: "view", - type: "function", + "name": "deploySalted", + "outputs": [], + "stateMutability": "payable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "role", - type: "bytes32", + "internalType": "address", + "name": "_recipient", + "type": "address" }, - ], - name: "getRoleAdmin", - outputs: [ { - internalType: "bytes32", - name: "", - type: "bytes32", + "internalType": "uint256", + "name": "_value", + "type": "uint256" }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "executeMessage", + "outputs": [ + { + "internalType": "bool", + "name": "success", + "type": "bool" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "addr", - type: "address", - }, + "internalType": "bytes32[]", + "name": "_txIds", + "type": "bytes32[]" + } ], - name: "ghostContracts", - outputs: [ + "name": "finalizeIdlenessTxs", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - internalType: "bool", - name: "isGhost", - type: "bool", - }, + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } ], - stateMutability: "view", - type: "function", + "name": "finalizeTransaction", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, + "inputs": [ { - internalType: "address", - name: "account", - type: "address", - }, + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } ], - name: "grantRole", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "flushExternalMessages", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [], + "name": "getAddressManager", + "outputs": [ { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, + "internalType": "contract IAddressManager", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ { - internalType: "address", - name: "account", - type: "address", - }, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } ], - name: "hasRole", - outputs: [ + "name": "getPendingTransactionValue", + "outputs": [ { - internalType: "bool", - name: "", - type: "bool", - }, + "internalType": "uint256", + "name": "", + "type": "uint256" + } ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: "owner", - outputs: [ + "inputs": [ { - internalType: "address", - name: "", - type: "address", - }, + "internalType": "address", + "name": "_addressManager", + "type": "address" + } ], - stateMutability: "view", - type: "function", + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [], - name: "pendingOwner", - outputs: [ + "inputs": [ { - internalType: "address", - name: "", - type: "address", - }, + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "isGhostContract", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "recipient", - type: "address", - }, + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } ], - name: "proceedPendingQueueProcessing", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "leaderIdleness", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ - { - internalType: "bytes32", - name: "_txId", - type: "bytes32", - }, - { - internalType: "bytes", - name: "_txReceipt", - type: "bytes", - }, - { - internalType: "uint256", - name: "_processingBlock", - type: "uint256", - }, + "inputs": [ { - components: [ + "components": [ + { + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, { - internalType: "enum IMessages.MessageType", - name: "messageType", - type: "uint8", + "internalType": "uint256", + "name": "saltAsAValidator", + "type": "uint256" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" }, { - internalType: "uint256", - name: "value", - type: "uint256", + "internalType": "bytes32", + "name": "messagesAndOtherFieldsHash", + "type": "bytes32" }, { - internalType: "bytes", - name: "data", - type: "bytes", + "internalType": "bytes32", + "name": "otherExecutionFieldsHash", + "type": "bytes32" }, { - internalType: "bool", - name: "onAcceptance", - type: "bool", + "internalType": "enum ITransactions.VoteType", + "name": "resultValue", + "type": "uint8" }, + { + "components": [ + { + "internalType": "enum IMessages.MessageType", + "name": "messageType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "onAcceptance", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + } + ], + "internalType": "struct IMessages.SubmittedMessage[]", + "name": "messages", + "type": "tuple[]" + } ], - internalType: "struct IMessages.SubmittedMessage[]", - name: "_messages", - type: "tuple[]", - }, - { - internalType: "bytes", - name: "_vrfProof", - type: "bytes", - }, + "internalType": "struct IConsensusMainWithFees.LeaderRevealVoteParams", + "name": "leaderRevealVoteParams", + "type": "tuple" + } ], - name: "proposeReceipt", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "leaderRevealVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [], - name: "renounceOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [], + "name": "pendingOwner", + "outputs": [ { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ { - internalType: "address", - name: "callerConfirmation", - type: "address", - }, + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } ], - name: "renounceRole", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "processIdleness", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "_txId", - type: "bytes32", + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" }, { - internalType: "bytes32", - name: "_voteHash", - type: "bytes32", + "internalType": "bytes32", + "name": "_txExecutionHash", + "type": "bytes32" }, { - internalType: "enum ITribunalAppeal.TribunalVoteType", - name: "_voteType", - type: "uint8", + "internalType": "uint256", + "name": "_processingBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "_nonce", - type: "uint256", + "internalType": "address", + "name": "_operator", + "type": "address" }, + { + "internalType": "bytes", + "name": "_eqBlocksOutputs", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "_vrfProof", + "type": "bytes" + } ], - name: "revealTribunalAppealVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "proposeReceipt", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "_txId", - type: "bytes32", - }, + "internalType": "address", + "name": "ghost", + "type": "address" + } + ], + "name": "registerGhostContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { - internalType: "bytes32", - name: "_voteHash", - type: "bytes32", + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" }, { - internalType: "enum ITransactions.VoteType", - name: "_voteType", - type: "uint8", + "internalType": "uint256", + "name": "_tribunalIndex", + "type": "uint256" }, { - internalType: "uint256", - name: "_nonce", - type: "uint256", + "internalType": "bytes32", + "name": "_voteHash", + "type": "bytes32" }, - ], - name: "revealVote", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ { - internalType: "bytes32", - name: "role", - type: "bytes32", + "internalType": "enum ITransactions.VoteType", + "name": "_voteType", + "type": "uint8" }, { - internalType: "address", - name: "account", - type: "address", + "internalType": "bytes32", + "name": "_otherExecutionFieldsHash", + "type": "bytes32" }, + { + "internalType": "uint256", + "name": "_nonce", + "type": "uint256" + } ], - name: "revokeRole", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "revealTribunalAppealVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ - { - internalType: "address", - name: "_ghostFactory", - type: "address", - }, - { - internalType: "address", - name: "_genManager", - type: "address", - }, + "inputs": [ { - internalType: "address", - name: "_genTransactions", - type: "address", + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" }, { - internalType: "address", - name: "_genQueue", - type: "address", + "internalType": "bytes32", + "name": "_voteHash", + "type": "bytes32" }, { - internalType: "address", - name: "_genStaking", - type: "address", + "internalType": "enum ITransactions.VoteType", + "name": "_voteType", + "type": "uint8" }, { - internalType: "address", - name: "_genMessages", - type: "address", + "internalType": "bytes32", + "name": "_otherExecutionFieldsHash", + "type": "bytes32" }, { - internalType: "address", - name: "_idleness", - type: "address", + "internalType": "uint256", + "name": "_nonce", + "type": "uint256" }, { - internalType: "address", - name: "_tribunalAppeal", - type: "address", - }, + "internalType": "uint256", + "name": "_validatorIndex", + "type": "uint256" + } ], - name: "setExternalContracts", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "revealVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "_txId", - type: "bytes32", - }, + "internalType": "address", + "name": "_addressManager", + "type": "address" + } ], - name: "submitAppeal", - outputs: [], - stateMutability: "payable", - type: "function", + "name": "setAddressManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "_txId", - type: "bytes32", - }, + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } ], - name: "submitSlashAppeal", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "submitAppeal", + "outputs": [], + "stateMutability": "payable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes4", - name: "interfaceId", - type: "bytes4", + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" }, + { + "components": [ + { + "internalType": "uint256", + "name": "leaderTimeoutFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "validatorsTimeoutFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "appealRounds", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rollupStorageFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rollupGenVMFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalMessageFees", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "rotations", + "type": "uint256[]" + } + ], + "internalType": "struct IFeeManager.FeesDistribution", + "name": "_feesDistribution", + "type": "tuple" + } ], - name: "supportsInterface", - outputs: [ + "name": "topUpAndSubmitAppeal", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ { - internalType: "bool", - name: "", - type: "bool", + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" }, + { + "components": [ + { + "internalType": "uint256", + "name": "leaderTimeoutFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "validatorsTimeoutFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "appealRounds", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rollupStorageFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rollupGenVMFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalMessageFees", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "rotations", + "type": "uint256[]" + } + ], + "internalType": "struct IFeeManager.FeesDistribution", + "name": "_feesDistribution", + "type": "tuple" + } ], - stateMutability: "view", - type: "function", + "name": "topUpFees", + "outputs": [], + "stateMutability": "payable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "newOwner", - type: "address", - }, + "internalType": "address", + "name": "newOwner", + "type": "address" + } ], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, + { + "stateMutability": "payable", + "type": "receive" + } ], bytecode: "", }; @@ -1410,2600 +1552,1965 @@ const CONSENSUS_DATA_CONTRACT = { address: "0x0D9d1d74d72Fa5eB94bcf746C8FCcb312a722c9B" as Address, abi: [ { - inputs: [], - name: "AccessControlBadConfirmation", - type: "error", + "inputs": [], + "name": "AccessControlBadConfirmation", + "type": "error" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "account", - type: "address", + "internalType": "address", + "name": "account", + "type": "address" }, { - internalType: "bytes32", - name: "neededRole", - type: "bytes32", - }, + "internalType": "bytes32", + "name": "neededRole", + "type": "bytes32" + } ], - name: "AccessControlUnauthorizedAccount", - type: "error", + "name": "AccessControlUnauthorizedAccount", + "type": "error" }, { - inputs: [], - name: "InvalidInitialization", - type: "error", + "inputs": [], + "name": "InvalidInitialization", + "type": "error" }, { - inputs: [], - name: "NotInitializing", - type: "error", + "inputs": [], + "name": "NotInitializing", + "type": "error" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "owner", - type: "address", - }, + "internalType": "address", + "name": "owner", + "type": "address" + } ], - name: "OwnableInvalidOwner", - type: "error", + "name": "OwnableInvalidOwner", + "type": "error" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "account", - type: "address", - }, + "internalType": "address", + "name": "account", + "type": "address" + } ], - name: "OwnableUnauthorizedAccount", - type: "error", + "name": "OwnableUnauthorizedAccount", + "type": "error" }, { - inputs: [], - name: "ReentrancyGuardReentrantCall", - type: "error", + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: false, - internalType: "uint64", - name: "version", - type: "uint64", - }, + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } ], - name: "Initialized", - type: "event", + "name": "Initialized", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" }, { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } ], - name: "OwnershipTransferStarted", - type: "event", + "name": "OwnershipTransferStarted", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" }, { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } ], - name: "OwnershipTransferred", - type: "event", + "name": "OwnershipTransferred", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "role", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - indexed: true, - internalType: "bytes32", - name: "previousAdminRole", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" }, { - indexed: true, - internalType: "bytes32", - name: "newAdminRole", - type: "bytes32", - }, + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } ], - name: "RoleAdminChanged", - type: "event", + "name": "RoleAdminChanged", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "role", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "account", - type: "address", + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" }, { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } ], - name: "RoleGranted", - type: "event", + "name": "RoleGranted", + "type": "event" }, { - anonymous: false, - inputs: [ + "anonymous": false, + "inputs": [ { - indexed: true, - internalType: "bytes32", - name: "role", - type: "bytes32", + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, { - indexed: true, - internalType: "address", - name: "account", - type: "address", + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" }, { - indexed: true, - internalType: "address", - name: "sender", - type: "address", - }, + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } ], - name: "RoleRevoked", - type: "event", + "name": "RoleRevoked", + "type": "event" }, { - inputs: [], - name: "DEFAULT_ADMIN_ROLE", - outputs: [ + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ { - internalType: "bytes32", - name: "", - type: "bytes32", - }, + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: "acceptOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [], + "name": "addressManager", + "outputs": [ { - internalType: "bytes32", - name: "_txId", - type: "bytes32", - }, - { - internalType: "uint256", - name: "_currentTimestamp", - type: "uint256", - }, - ], - name: "canFinalize", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, - { - internalType: "uint256", - name: "", - type: "uint256", - }, + "internalType": "contract IAddressManager", + "name": "", + "type": "address" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: "consensusMain", - outputs: [ + "inputs": [ { - internalType: "contract IConsensusMain", - name: "", - type: "address", + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" }, + { + "internalType": "uint256", + "name": "_currentTimestamp", + "type": "uint256" + } ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ + "name": "canFinalize", + "outputs": [ { - internalType: "bytes32", - name: "_tx_id", - type: "bytes32", + "internalType": "bool", + "name": "", + "type": "bool" }, - ], - name: "getLastAppealResult", - outputs: [ { - internalType: "enum ITransactions.ResultType", - name: "", - type: "uint8", + "internalType": "uint256", + "name": "", + "type": "uint256" }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "recipient", - type: "address", - }, + "internalType": "address", + "name": "recipient", + "type": "address" + } ], - name: "getLatestAcceptedTransaction", - outputs: [ + "name": "getLatestAcceptedTransaction", + "outputs": [ { - components: [ + "components": [ + { + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" + }, { - internalType: "uint256", - name: "currentTimestamp", - type: "uint256", + "internalType": "address", + "name": "sender", + "type": "address" }, { - internalType: "address", - name: "sender", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "uint256", + "name": "initialRotations", + "type": "uint256" }, { - internalType: "uint256", - name: "numOfInitialValidators", - type: "uint256", + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" }, { - internalType: "uint256", - name: "txSlot", - type: "uint256", + "internalType": "uint256", + "name": "createdTimestamp", + "type": "uint256" }, { - internalType: "uint256", - name: "createdTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "lastVoteTimestamp", + "type": "uint256" }, { - internalType: "uint256", - name: "lastVoteTimestamp", - type: "uint256", + "internalType": "bytes32", + "name": "randomSeed", + "type": "bytes32" }, { - internalType: "bytes32", - name: "randomSeed", - type: "bytes32", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" }, { - internalType: "bytes", - name: "txData", - type: "bytes", + "internalType": "bytes", + "name": "txCalldata", + "type": "bytes" }, { - internalType: "bytes", - name: "txReceipt", - type: "bytes", + "internalType": "bytes", + "name": "eqBlocksOutputs", + "type": "bytes" }, { - components: [ + "components": [ { - internalType: "enum IMessages.MessageType", - name: "messageType", - type: "uint8", + "internalType": "enum IMessages.MessageType", + "name": "messageType", + "type": "uint8" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "uint256", - name: "value", - type: "uint256", + "internalType": "uint256", + "name": "value", + "type": "uint256" }, { - internalType: "bytes", - name: "data", - type: "bytes", + "internalType": "bytes", + "name": "data", + "type": "bytes" }, { - internalType: "bool", - name: "onAcceptance", - type: "bool", + "internalType": "bool", + "name": "onAcceptance", + "type": "bool" }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + } ], - internalType: "struct IMessages.SubmittedMessage[]", - name: "messages", - type: "tuple[]", + "internalType": "struct IMessages.SubmittedMessage[]", + "name": "messages", + "type": "tuple[]" }, { - internalType: "enum IQueues.QueueType", - name: "queueType", - type: "uint8", + "internalType": "enum IQueues.QueueType", + "name": "queueType", + "type": "uint8" }, { - internalType: "uint256", - name: "queuePosition", - type: "uint256", + "internalType": "uint256", + "name": "queuePosition", + "type": "uint256" }, { - internalType: "address", - name: "activator", - type: "address", + "internalType": "address", + "name": "activator", + "type": "address" }, { - internalType: "address", - name: "lastLeader", - type: "address", + "internalType": "address", + "name": "lastLeader", + "type": "address" }, { - internalType: "enum ITransactions.TransactionStatus", - name: "status", - type: "uint8", + "internalType": "enum ITransactions.TransactionStatus", + "name": "status", + "type": "uint8" }, { - internalType: "bytes32", - name: "txId", - type: "bytes32", + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "activationBlock", - type: "uint256", + "internalType": "uint256", + "name": "activationBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "processingBlock", - type: "uint256", + "internalType": "uint256", + "name": "processingBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "proposalBlock", - type: "uint256", - }, + "internalType": "uint256", + "name": "proposalBlock", + "type": "uint256" + } ], - internalType: "struct ITransactions.ReadStateBlockRange", - name: "readStateBlockRange", - type: "tuple", + "internalType": "struct ITransactions.ReadStateBlockRange", + "name": "readStateBlockRange", + "type": "tuple" }, { - internalType: "uint256", - name: "numOfRounds", - type: "uint256", + "internalType": "uint256", + "name": "numOfRounds", + "type": "uint256" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "round", - type: "uint256", + "internalType": "uint256", + "name": "round", + "type": "uint256" }, { - internalType: "uint256", - name: "leaderIndex", - type: "uint256", + "internalType": "uint256", + "name": "leaderIndex", + "type": "uint256" }, { - internalType: "uint256", - name: "votesCommitted", - type: "uint256", + "internalType": "uint256", + "name": "votesCommitted", + "type": "uint256" }, { - internalType: "uint256", - name: "votesRevealed", - type: "uint256", + "internalType": "uint256", + "name": "votesRevealed", + "type": "uint256" }, { - internalType: "uint256", - name: "appealBond", - type: "uint256", + "internalType": "uint256", + "name": "appealBond", + "type": "uint256" }, { - internalType: "uint256", - name: "rotationsLeft", - type: "uint256", + "internalType": "uint256", + "name": "rotationsLeft", + "type": "uint256" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "address[]", - name: "roundValidators", - type: "address[]", + "internalType": "address[]", + "name": "roundValidators", + "type": "address[]" }, { - internalType: "bytes32[]", - name: "validatorVotesHash", - type: "bytes32[]", + "internalType": "enum ITransactions.VoteType[]", + "name": "validatorVotes", + "type": "uint8[]" }, { - internalType: "enum ITransactions.VoteType[]", - name: "validatorVotes", - type: "uint8[]", + "internalType": "bytes32[]", + "name": "validatorVotesHash", + "type": "bytes32[]" }, + { + "internalType": "bytes32[]", + "name": "validatorResultHash", + "type": "bytes32[]" + } ], - internalType: "struct ITransactions.RoundData", - name: "lastRound", - type: "tuple", + "internalType": "struct ITransactions.RoundData", + "name": "lastRound", + "type": "tuple" }, + { + "internalType": "address[]", + "name": "consumedValidators", + "type": "address[]" + } ], - internalType: "struct ConsensusData.TransactionData", - name: "txData", - type: "tuple", - }, + "internalType": "struct ConsensusData.TransactionData", + "name": "inputData", + "type": "tuple" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "uint256", - name: "startIndex", - type: "uint256", + "internalType": "uint256", + "name": "startIndex", + "type": "uint256" }, { - internalType: "uint256", - name: "pageSize", - type: "uint256", - }, + "internalType": "uint256", + "name": "pageSize", + "type": "uint256" + } ], - name: "getLatestAcceptedTransactions", - outputs: [ + "name": "getLatestAcceptedTransactions", + "outputs": [ { - components: [ + "components": [ + { + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" + }, { - internalType: "uint256", - name: "currentTimestamp", - type: "uint256", + "internalType": "address", + "name": "sender", + "type": "address" }, { - internalType: "address", - name: "sender", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "uint256", + "name": "initialRotations", + "type": "uint256" }, { - internalType: "uint256", - name: "numOfInitialValidators", - type: "uint256", + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" }, { - internalType: "uint256", - name: "txSlot", - type: "uint256", + "internalType": "uint256", + "name": "createdTimestamp", + "type": "uint256" }, { - internalType: "uint256", - name: "createdTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "lastVoteTimestamp", + "type": "uint256" }, { - internalType: "uint256", - name: "lastVoteTimestamp", - type: "uint256", + "internalType": "bytes32", + "name": "randomSeed", + "type": "bytes32" }, { - internalType: "bytes32", - name: "randomSeed", - type: "bytes32", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" }, { - internalType: "bytes", - name: "txData", - type: "bytes", + "internalType": "bytes", + "name": "txCalldata", + "type": "bytes" }, { - internalType: "bytes", - name: "txReceipt", - type: "bytes", + "internalType": "bytes", + "name": "eqBlocksOutputs", + "type": "bytes" }, { - components: [ + "components": [ { - internalType: "enum IMessages.MessageType", - name: "messageType", - type: "uint8", + "internalType": "enum IMessages.MessageType", + "name": "messageType", + "type": "uint8" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "uint256", - name: "value", - type: "uint256", + "internalType": "uint256", + "name": "value", + "type": "uint256" }, { - internalType: "bytes", - name: "data", - type: "bytes", + "internalType": "bytes", + "name": "data", + "type": "bytes" }, { - internalType: "bool", - name: "onAcceptance", - type: "bool", + "internalType": "bool", + "name": "onAcceptance", + "type": "bool" }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + } ], - internalType: "struct IMessages.SubmittedMessage[]", - name: "messages", - type: "tuple[]", + "internalType": "struct IMessages.SubmittedMessage[]", + "name": "messages", + "type": "tuple[]" }, { - internalType: "enum IQueues.QueueType", - name: "queueType", - type: "uint8", + "internalType": "enum IQueues.QueueType", + "name": "queueType", + "type": "uint8" }, { - internalType: "uint256", - name: "queuePosition", - type: "uint256", + "internalType": "uint256", + "name": "queuePosition", + "type": "uint256" }, { - internalType: "address", - name: "activator", - type: "address", + "internalType": "address", + "name": "activator", + "type": "address" }, { - internalType: "address", - name: "lastLeader", - type: "address", + "internalType": "address", + "name": "lastLeader", + "type": "address" }, { - internalType: "enum ITransactions.TransactionStatus", - name: "status", - type: "uint8", + "internalType": "enum ITransactions.TransactionStatus", + "name": "status", + "type": "uint8" }, { - internalType: "bytes32", - name: "txId", - type: "bytes32", + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "activationBlock", - type: "uint256", + "internalType": "uint256", + "name": "activationBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "processingBlock", - type: "uint256", + "internalType": "uint256", + "name": "processingBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "proposalBlock", - type: "uint256", - }, + "internalType": "uint256", + "name": "proposalBlock", + "type": "uint256" + } ], - internalType: "struct ITransactions.ReadStateBlockRange", - name: "readStateBlockRange", - type: "tuple", + "internalType": "struct ITransactions.ReadStateBlockRange", + "name": "readStateBlockRange", + "type": "tuple" }, { - internalType: "uint256", - name: "numOfRounds", - type: "uint256", + "internalType": "uint256", + "name": "numOfRounds", + "type": "uint256" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "round", - type: "uint256", + "internalType": "uint256", + "name": "round", + "type": "uint256" }, { - internalType: "uint256", - name: "leaderIndex", - type: "uint256", + "internalType": "uint256", + "name": "leaderIndex", + "type": "uint256" }, { - internalType: "uint256", - name: "votesCommitted", - type: "uint256", + "internalType": "uint256", + "name": "votesCommitted", + "type": "uint256" }, { - internalType: "uint256", - name: "votesRevealed", - type: "uint256", + "internalType": "uint256", + "name": "votesRevealed", + "type": "uint256" }, { - internalType: "uint256", - name: "appealBond", - type: "uint256", + "internalType": "uint256", + "name": "appealBond", + "type": "uint256" }, { - internalType: "uint256", - name: "rotationsLeft", - type: "uint256", + "internalType": "uint256", + "name": "rotationsLeft", + "type": "uint256" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "address[]", - name: "roundValidators", - type: "address[]", + "internalType": "address[]", + "name": "roundValidators", + "type": "address[]" }, { - internalType: "bytes32[]", - name: "validatorVotesHash", - type: "bytes32[]", + "internalType": "enum ITransactions.VoteType[]", + "name": "validatorVotes", + "type": "uint8[]" }, { - internalType: "enum ITransactions.VoteType[]", - name: "validatorVotes", - type: "uint8[]", + "internalType": "bytes32[]", + "name": "validatorVotesHash", + "type": "bytes32[]" }, + { + "internalType": "bytes32[]", + "name": "validatorResultHash", + "type": "bytes32[]" + } ], - internalType: "struct ITransactions.RoundData", - name: "lastRound", - type: "tuple", + "internalType": "struct ITransactions.RoundData", + "name": "lastRound", + "type": "tuple" }, + { + "internalType": "address[]", + "name": "consumedValidators", + "type": "address[]" + } ], - internalType: "struct ConsensusData.TransactionData[]", - name: "", - type: "tuple[]", - }, + "internalType": "struct ConsensusData.TransactionData[]", + "name": "", + "type": "tuple[]" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "recipient", - type: "address", - }, + "internalType": "address", + "name": "recipient", + "type": "address" + } ], - name: "getLatestAcceptedTxCount", - outputs: [ + "name": "getLatestAcceptedTxCount", + "outputs": [ { - internalType: "uint256", - name: "", - type: "uint256", - }, + "internalType": "uint256", + "name": "", + "type": "uint256" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "recipient", - type: "address", - }, + "internalType": "address", + "name": "recipient", + "type": "address" + } ], - name: "getLatestFinalizedTransaction", - outputs: [ + "name": "getLatestFinalizedTransaction", + "outputs": [ { - components: [ + "components": [ { - internalType: "uint256", - name: "currentTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" }, { - internalType: "address", - name: "sender", - type: "address", + "internalType": "address", + "name": "sender", + "type": "address" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "uint256", - name: "numOfInitialValidators", - type: "uint256", + "internalType": "uint256", + "name": "initialRotations", + "type": "uint256" }, { - internalType: "uint256", - name: "txSlot", - type: "uint256", + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" }, { - internalType: "uint256", - name: "createdTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "createdTimestamp", + "type": "uint256" }, { - internalType: "uint256", - name: "lastVoteTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "lastVoteTimestamp", + "type": "uint256" }, { - internalType: "bytes32", - name: "randomSeed", - type: "bytes32", + "internalType": "bytes32", + "name": "randomSeed", + "type": "bytes32" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "bytes", - name: "txData", - type: "bytes", + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" }, { - internalType: "bytes", - name: "txReceipt", - type: "bytes", + "internalType": "bytes", + "name": "txCalldata", + "type": "bytes" }, { - components: [ + "internalType": "bytes", + "name": "eqBlocksOutputs", + "type": "bytes" + }, + { + "components": [ { - internalType: "enum IMessages.MessageType", - name: "messageType", - type: "uint8", + "internalType": "enum IMessages.MessageType", + "name": "messageType", + "type": "uint8" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "uint256", - name: "value", - type: "uint256", + "internalType": "uint256", + "name": "value", + "type": "uint256" }, { - internalType: "bytes", - name: "data", - type: "bytes", + "internalType": "bytes", + "name": "data", + "type": "bytes" }, { - internalType: "bool", - name: "onAcceptance", - type: "bool", + "internalType": "bool", + "name": "onAcceptance", + "type": "bool" }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + } ], - internalType: "struct IMessages.SubmittedMessage[]", - name: "messages", - type: "tuple[]", + "internalType": "struct IMessages.SubmittedMessage[]", + "name": "messages", + "type": "tuple[]" }, { - internalType: "enum IQueues.QueueType", - name: "queueType", - type: "uint8", + "internalType": "enum IQueues.QueueType", + "name": "queueType", + "type": "uint8" }, { - internalType: "uint256", - name: "queuePosition", - type: "uint256", + "internalType": "uint256", + "name": "queuePosition", + "type": "uint256" }, { - internalType: "address", - name: "activator", - type: "address", + "internalType": "address", + "name": "activator", + "type": "address" }, { - internalType: "address", - name: "lastLeader", - type: "address", + "internalType": "address", + "name": "lastLeader", + "type": "address" }, { - internalType: "enum ITransactions.TransactionStatus", - name: "status", - type: "uint8", + "internalType": "enum ITransactions.TransactionStatus", + "name": "status", + "type": "uint8" }, { - internalType: "bytes32", - name: "txId", - type: "bytes32", + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "activationBlock", - type: "uint256", + "internalType": "uint256", + "name": "activationBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "processingBlock", - type: "uint256", + "internalType": "uint256", + "name": "processingBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "proposalBlock", - type: "uint256", - }, + "internalType": "uint256", + "name": "proposalBlock", + "type": "uint256" + } ], - internalType: "struct ITransactions.ReadStateBlockRange", - name: "readStateBlockRange", - type: "tuple", + "internalType": "struct ITransactions.ReadStateBlockRange", + "name": "readStateBlockRange", + "type": "tuple" }, { - internalType: "uint256", - name: "numOfRounds", - type: "uint256", + "internalType": "uint256", + "name": "numOfRounds", + "type": "uint256" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "round", - type: "uint256", + "internalType": "uint256", + "name": "round", + "type": "uint256" }, { - internalType: "uint256", - name: "leaderIndex", - type: "uint256", + "internalType": "uint256", + "name": "leaderIndex", + "type": "uint256" }, { - internalType: "uint256", - name: "votesCommitted", - type: "uint256", + "internalType": "uint256", + "name": "votesCommitted", + "type": "uint256" }, { - internalType: "uint256", - name: "votesRevealed", - type: "uint256", + "internalType": "uint256", + "name": "votesRevealed", + "type": "uint256" }, { - internalType: "uint256", - name: "appealBond", - type: "uint256", + "internalType": "uint256", + "name": "appealBond", + "type": "uint256" }, { - internalType: "uint256", - name: "rotationsLeft", - type: "uint256", + "internalType": "uint256", + "name": "rotationsLeft", + "type": "uint256" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "address[]", - name: "roundValidators", - type: "address[]", + "internalType": "address[]", + "name": "roundValidators", + "type": "address[]" }, { - internalType: "bytes32[]", - name: "validatorVotesHash", - type: "bytes32[]", + "internalType": "enum ITransactions.VoteType[]", + "name": "validatorVotes", + "type": "uint8[]" }, { - internalType: "enum ITransactions.VoteType[]", - name: "validatorVotes", - type: "uint8[]", + "internalType": "bytes32[]", + "name": "validatorVotesHash", + "type": "bytes32[]" }, + { + "internalType": "bytes32[]", + "name": "validatorResultHash", + "type": "bytes32[]" + } ], - internalType: "struct ITransactions.RoundData", - name: "lastRound", - type: "tuple", + "internalType": "struct ITransactions.RoundData", + "name": "lastRound", + "type": "tuple" }, + { + "internalType": "address[]", + "name": "consumedValidators", + "type": "address[]" + } ], - internalType: "struct ConsensusData.TransactionData", - name: "txData", - type: "tuple", - }, + "internalType": "struct ConsensusData.TransactionData", + "name": "inputData", + "type": "tuple" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "uint256", - name: "startIndex", - type: "uint256", + "internalType": "uint256", + "name": "startIndex", + "type": "uint256" }, { - internalType: "uint256", - name: "pageSize", - type: "uint256", - }, + "internalType": "uint256", + "name": "pageSize", + "type": "uint256" + } ], - name: "getLatestFinalizedTransactions", - outputs: [ + "name": "getLatestFinalizedTransactions", + "outputs": [ { - components: [ + "components": [ + { + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" + }, { - internalType: "uint256", - name: "currentTimestamp", - type: "uint256", + "internalType": "address", + "name": "sender", + "type": "address" }, { - internalType: "address", - name: "sender", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "uint256", + "name": "initialRotations", + "type": "uint256" }, { - internalType: "uint256", - name: "numOfInitialValidators", - type: "uint256", + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" }, { - internalType: "uint256", - name: "txSlot", - type: "uint256", + "internalType": "uint256", + "name": "createdTimestamp", + "type": "uint256" }, { - internalType: "uint256", - name: "createdTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "lastVoteTimestamp", + "type": "uint256" }, { - internalType: "uint256", - name: "lastVoteTimestamp", - type: "uint256", + "internalType": "bytes32", + "name": "randomSeed", + "type": "bytes32" }, { - internalType: "bytes32", - name: "randomSeed", - type: "bytes32", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" }, { - internalType: "bytes", - name: "txData", - type: "bytes", + "internalType": "bytes", + "name": "txCalldata", + "type": "bytes" }, { - internalType: "bytes", - name: "txReceipt", - type: "bytes", + "internalType": "bytes", + "name": "eqBlocksOutputs", + "type": "bytes" }, { - components: [ + "components": [ { - internalType: "enum IMessages.MessageType", - name: "messageType", - type: "uint8", + "internalType": "enum IMessages.MessageType", + "name": "messageType", + "type": "uint8" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "uint256", - name: "value", - type: "uint256", + "internalType": "uint256", + "name": "value", + "type": "uint256" }, { - internalType: "bytes", - name: "data", - type: "bytes", + "internalType": "bytes", + "name": "data", + "type": "bytes" }, { - internalType: "bool", - name: "onAcceptance", - type: "bool", + "internalType": "bool", + "name": "onAcceptance", + "type": "bool" }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + } ], - internalType: "struct IMessages.SubmittedMessage[]", - name: "messages", - type: "tuple[]", + "internalType": "struct IMessages.SubmittedMessage[]", + "name": "messages", + "type": "tuple[]" }, { - internalType: "enum IQueues.QueueType", - name: "queueType", - type: "uint8", + "internalType": "enum IQueues.QueueType", + "name": "queueType", + "type": "uint8" }, { - internalType: "uint256", - name: "queuePosition", - type: "uint256", + "internalType": "uint256", + "name": "queuePosition", + "type": "uint256" }, { - internalType: "address", - name: "activator", - type: "address", + "internalType": "address", + "name": "activator", + "type": "address" }, { - internalType: "address", - name: "lastLeader", - type: "address", + "internalType": "address", + "name": "lastLeader", + "type": "address" }, { - internalType: "enum ITransactions.TransactionStatus", - name: "status", - type: "uint8", + "internalType": "enum ITransactions.TransactionStatus", + "name": "status", + "type": "uint8" }, { - internalType: "bytes32", - name: "txId", - type: "bytes32", + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "activationBlock", - type: "uint256", + "internalType": "uint256", + "name": "activationBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "processingBlock", - type: "uint256", + "internalType": "uint256", + "name": "processingBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "proposalBlock", - type: "uint256", - }, + "internalType": "uint256", + "name": "proposalBlock", + "type": "uint256" + } ], - internalType: "struct ITransactions.ReadStateBlockRange", - name: "readStateBlockRange", - type: "tuple", + "internalType": "struct ITransactions.ReadStateBlockRange", + "name": "readStateBlockRange", + "type": "tuple" }, { - internalType: "uint256", - name: "numOfRounds", - type: "uint256", + "internalType": "uint256", + "name": "numOfRounds", + "type": "uint256" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "round", - type: "uint256", + "internalType": "uint256", + "name": "round", + "type": "uint256" }, { - internalType: "uint256", - name: "leaderIndex", - type: "uint256", + "internalType": "uint256", + "name": "leaderIndex", + "type": "uint256" }, { - internalType: "uint256", - name: "votesCommitted", - type: "uint256", + "internalType": "uint256", + "name": "votesCommitted", + "type": "uint256" }, { - internalType: "uint256", - name: "votesRevealed", - type: "uint256", + "internalType": "uint256", + "name": "votesRevealed", + "type": "uint256" }, { - internalType: "uint256", - name: "appealBond", - type: "uint256", + "internalType": "uint256", + "name": "appealBond", + "type": "uint256" }, { - internalType: "uint256", - name: "rotationsLeft", - type: "uint256", + "internalType": "uint256", + "name": "rotationsLeft", + "type": "uint256" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "address[]", - name: "roundValidators", - type: "address[]", + "internalType": "address[]", + "name": "roundValidators", + "type": "address[]" }, { - internalType: "bytes32[]", - name: "validatorVotesHash", - type: "bytes32[]", + "internalType": "enum ITransactions.VoteType[]", + "name": "validatorVotes", + "type": "uint8[]" }, { - internalType: "enum ITransactions.VoteType[]", - name: "validatorVotes", - type: "uint8[]", + "internalType": "bytes32[]", + "name": "validatorVotesHash", + "type": "bytes32[]" }, + { + "internalType": "bytes32[]", + "name": "validatorResultHash", + "type": "bytes32[]" + } ], - internalType: "struct ITransactions.RoundData", - name: "lastRound", - type: "tuple", + "internalType": "struct ITransactions.RoundData", + "name": "lastRound", + "type": "tuple" }, + { + "internalType": "address[]", + "name": "consumedValidators", + "type": "address[]" + } ], - internalType: "struct ConsensusData.TransactionData[]", - name: "", - type: "tuple[]", - }, + "internalType": "struct ConsensusData.TransactionData[]", + "name": "", + "type": "tuple[]" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "recipient", - type: "address", - }, + "internalType": "address", + "name": "recipient", + "type": "address" + } ], - name: "getLatestFinalizedTxCount", - outputs: [ + "name": "getLatestFinalizedTxCount", + "outputs": [ { - internalType: "uint256", - name: "", - type: "uint256", - }, + "internalType": "uint256", + "name": "", + "type": "uint256" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "recipient", - type: "address", - }, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } ], - name: "getLatestPendingTxCount", - outputs: [ + "name": "getRoleAdmin", + "outputs": [ { - internalType: "uint256", - name: "", - type: "uint256", - }, + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { - internalType: "address", - name: "recipient", - type: "address", - }, + "inputs": [ { - internalType: "uint256", - name: "slot", - type: "uint256", - }, + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } ], - name: "getLatestPendingTxId", - outputs: [ + "name": "getTransactionAllData", + "outputs": [ { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "recipient", - type: "address", - }, - ], - name: "getLatestUndeterminedTransaction", - outputs: [ - { - components: [ + "components": [ { - internalType: "uint256", - name: "currentTimestamp", - type: "uint256", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "address", - name: "sender", - type: "address", + "internalType": "enum ITransactions.VoteType", + "name": "txExecutionResult", + "type": "uint8" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "enum ITransactions.TransactionStatus", + "name": "previousStatus", + "type": "uint8" }, { - internalType: "uint256", - name: "numOfInitialValidators", - type: "uint256", + "internalType": "enum ITransactions.TransactionStatus", + "name": "status", + "type": "uint8" }, { - internalType: "uint256", - name: "txSlot", - type: "uint256", + "internalType": "address", + "name": "txOrigin", + "type": "address" }, { - internalType: "uint256", - name: "createdTimestamp", - type: "uint256", + "internalType": "address", + "name": "sender", + "type": "address" }, { - internalType: "uint256", - name: "lastVoteTimestamp", - type: "uint256", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "bytes32", - name: "randomSeed", - type: "bytes32", + "internalType": "address", + "name": "activator", + "type": "address" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" }, { - internalType: "bytes", - name: "txData", - type: "bytes", + "internalType": "uint256", + "name": "initialRotations", + "type": "uint256" }, { - internalType: "bytes", - name: "txReceipt", - type: "bytes", + "internalType": "uint256", + "name": "numOfInitialValidators", + "type": "uint256" }, { - components: [ - { - internalType: "enum IMessages.MessageType", - name: "messageType", - type: "uint8", - }, - { - internalType: "address", - name: "recipient", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "bool", - name: "onAcceptance", - type: "bool", - }, - ], - internalType: "struct IMessages.SubmittedMessage[]", - name: "messages", - type: "tuple[]", + "internalType": "uint256", + "name": "epoch", + "type": "uint256" }, { - internalType: "enum IQueues.QueueType", - name: "queueType", - type: "uint8", + "internalType": "bytes32", + "name": "id", + "type": "bytes32" }, { - internalType: "uint256", - name: "queuePosition", - type: "uint256", + "internalType": "bytes32", + "name": "randomSeed", + "type": "bytes32" }, { - internalType: "address", - name: "activator", - type: "address", + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" }, { - internalType: "address", - name: "lastLeader", - type: "address", + "internalType": "bytes32", + "name": "resultHash", + "type": "bytes32" }, { - internalType: "enum ITransactions.TransactionStatus", - name: "status", - type: "uint8", + "internalType": "bytes", + "name": "txCalldata", + "type": "bytes" }, { - internalType: "bytes32", - name: "txId", - type: "bytes32", + "internalType": "bytes", + "name": "eqBlocksOutputs", + "type": "bytes" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "activationBlock", - type: "uint256", + "internalType": "uint256", + "name": "activationBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "processingBlock", - type: "uint256", + "internalType": "uint256", + "name": "processingBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "proposalBlock", - type: "uint256", - }, + "internalType": "uint256", + "name": "proposalBlock", + "type": "uint256" + } ], - internalType: "struct ITransactions.ReadStateBlockRange", - name: "readStateBlockRange", - type: "tuple", + "internalType": "struct ITransactions.ReadStateBlockRange[]", + "name": "readStateBlockRanges", + "type": "tuple[]" }, { - internalType: "uint256", - name: "numOfRounds", - type: "uint256", + "internalType": "uint256", + "name": "validUntil", + "type": "uint256" }, { - components: [ - { - internalType: "uint256", - name: "round", - type: "uint256", - }, - { - internalType: "uint256", - name: "leaderIndex", - type: "uint256", - }, - { - internalType: "uint256", - name: "votesCommitted", - type: "uint256", - }, - { - internalType: "uint256", - name: "votesRevealed", - type: "uint256", - }, - { - internalType: "uint256", - name: "appealBond", - type: "uint256", - }, - { - internalType: "uint256", - name: "rotationsLeft", - type: "uint256", - }, - { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", - }, - { - internalType: "address[]", - name: "roundValidators", - type: "address[]", - }, - { - internalType: "bytes32[]", - name: "validatorVotesHash", - type: "bytes32[]", - }, - { - internalType: "enum ITransactions.VoteType[]", - name: "validatorVotes", - type: "uint8[]", - }, - ], - internalType: "struct ITransactions.RoundData", - name: "lastRound", - type: "tuple", - }, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } ], - internalType: "struct ConsensusData.TransactionData", - name: "txData", - type: "tuple", + "internalType": "struct ITransactions.Transaction", + "name": "transaction", + "type": "tuple" }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "recipient", - type: "address", - }, - ], - name: "getLatestUndeterminedTxCount", - outputs: [ { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_tx_id", - type: "bytes32", - }, - ], - name: "getMessagesForTransaction", - outputs: [ - { - components: [ + "components": [ { - internalType: "enum IMessages.MessageType", - name: "messageType", - type: "uint8", + "internalType": "uint256", + "name": "round", + "type": "uint256" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "uint256", + "name": "leaderIndex", + "type": "uint256" }, { - internalType: "uint256", - name: "value", - type: "uint256", + "internalType": "uint256", + "name": "votesCommitted", + "type": "uint256" }, { - internalType: "bytes", - name: "data", - type: "bytes", + "internalType": "uint256", + "name": "votesRevealed", + "type": "uint256" }, { - internalType: "bool", - name: "onAcceptance", - type: "bool", + "internalType": "uint256", + "name": "appealBond", + "type": "uint256" }, - ], - internalType: "struct IMessages.SubmittedMessage[]", - name: "", - type: "tuple[]", - }, - { - internalType: "address", - name: "ghostAddress", - type: "address", - }, - { - internalType: "uint256", - name: "numOfMessagesIssuedOnAcceptance", - type: "uint256", - }, - { - internalType: "uint256", - name: "numOfMessagesIssuedOnFinalization", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_tx_id", - type: "bytes32", - }, - ], - name: "getReadStateBlockRangeForTransaction", - outputs: [ - { - internalType: "uint256", - name: "activationBlock", - type: "uint256", - }, - { - internalType: "uint256", - name: "processingBlock", - type: "uint256", - }, - { - internalType: "uint256", - name: "proposalBlock", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "recipient", - type: "address", - }, - { - internalType: "uint256", - name: "startIndex", - type: "uint256", - }, - { - internalType: "uint256", - name: "endIndex", - type: "uint256", - }, - ], - name: "getRecipientQueues", - outputs: [ - { - components: [ { - components: [ - { - internalType: "uint256", - name: "head", - type: "uint256", - }, - { - internalType: "uint256", - name: "tail", - type: "uint256", - }, - { - internalType: "bytes32[]", - name: "txIds", - type: "bytes32[]", - }, - ], - internalType: "struct IQueues.QueueInfoView", - name: "pending", - type: "tuple", + "internalType": "uint256", + "name": "rotationsLeft", + "type": "uint256" }, { - components: [ - { - internalType: "uint256", - name: "head", - type: "uint256", - }, - { - internalType: "uint256", - name: "tail", - type: "uint256", - }, - { - internalType: "bytes32[]", - name: "txIds", - type: "bytes32[]", - }, - ], - internalType: "struct IQueues.QueueInfoView", - name: "accepted", - type: "tuple", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - components: [ - { - internalType: "uint256", - name: "head", - type: "uint256", - }, - { - internalType: "uint256", - name: "tail", - type: "uint256", - }, - { - internalType: "bytes32[]", - name: "txIds", - type: "bytes32[]", - }, - ], - internalType: "struct IQueues.QueueInfoView", - name: "undetermined", - type: "tuple", + "internalType": "address[]", + "name": "roundValidators", + "type": "address[]" }, { - internalType: "uint256", - name: "finalizedCount", - type: "uint256", + "internalType": "enum ITransactions.VoteType[]", + "name": "validatorVotes", + "type": "uint8[]" }, { - internalType: "uint256", - name: "issuedTxCount", - type: "uint256", - }, - ], - internalType: "struct IQueues.RecipientQueuesView", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - ], - name: "getRoleAdmin", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getTotalNumOfTransactions", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_tx_id", - type: "bytes32", - }, - ], - name: "getTransactionAllData", - outputs: [ - { - components: [ - { - internalType: "bytes32", - name: "id", - type: "bytes32", - }, - { - internalType: "address", - name: "sender", - type: "address", - }, - { - internalType: "address", - name: "recipient", - type: "address", - }, - { - internalType: "uint256", - name: "numOfInitialValidators", - type: "uint256", - }, - { - internalType: "uint256", - name: "txSlot", - type: "uint256", - }, - { - internalType: "address", - name: "activator", - type: "address", - }, - { - internalType: "enum ITransactions.TransactionStatus", - name: "status", - type: "uint8", - }, - { - internalType: "enum ITransactions.TransactionStatus", - name: "previousStatus", - type: "uint8", - }, - { - components: [ - { - internalType: "uint256", - name: "created", - type: "uint256", - }, - { - internalType: "uint256", - name: "pending", - type: "uint256", - }, - { - internalType: "uint256", - name: "activated", - type: "uint256", - }, - { - internalType: "uint256", - name: "proposed", - type: "uint256", - }, - { - internalType: "uint256", - name: "committed", - type: "uint256", - }, - { - internalType: "uint256", - name: "lastVote", - type: "uint256", - }, - { - internalType: "uint256", - name: "appealSubmitted", - type: "uint256", - }, - ], - internalType: "struct ITransactions.Timestamps", - name: "timestamps", - type: "tuple", - }, - { - internalType: "bytes32", - name: "randomSeed", - type: "bytes32", - }, - { - internalType: "bool", - name: "onAcceptanceMessages", - type: "bool", - }, - { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", - }, - { - components: [ - { - internalType: "uint256", - name: "activationBlock", - type: "uint256", - }, - { - internalType: "uint256", - name: "processingBlock", - type: "uint256", - }, - { - internalType: "uint256", - name: "proposalBlock", - type: "uint256", - }, - ], - internalType: "struct ITransactions.ReadStateBlockRange", - name: "readStateBlockRange", - type: "tuple", - }, - { - internalType: "bytes", - name: "txData", - type: "bytes", - }, - { - internalType: "bytes", - name: "txReceipt", - type: "bytes", - }, - { - components: [ - { - internalType: "enum IMessages.MessageType", - name: "messageType", - type: "uint8", - }, - { - internalType: "address", - name: "recipient", - type: "address", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes", - name: "data", - type: "bytes", - }, - { - internalType: "bool", - name: "onAcceptance", - type: "bool", - }, - ], - internalType: "struct IMessages.SubmittedMessage[]", - name: "messages", - type: "tuple[]", - }, - { - internalType: "address[]", - name: "consumedValidators", - type: "address[]", - }, - { - components: [ - { - internalType: "uint256", - name: "round", - type: "uint256", - }, - { - internalType: "uint256", - name: "leaderIndex", - type: "uint256", - }, - { - internalType: "uint256", - name: "votesCommitted", - type: "uint256", - }, - { - internalType: "uint256", - name: "votesRevealed", - type: "uint256", - }, - { - internalType: "uint256", - name: "appealBond", - type: "uint256", - }, - { - internalType: "uint256", - name: "rotationsLeft", - type: "uint256", - }, - { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", - }, - { - internalType: "address[]", - name: "roundValidators", - type: "address[]", - }, - { - internalType: "bytes32[]", - name: "validatorVotesHash", - type: "bytes32[]", - }, - { - internalType: "enum ITransactions.VoteType[]", - name: "validatorVotes", - type: "uint8[]", - }, - ], - internalType: "struct ITransactions.RoundData[]", - name: "roundData", - type: "tuple[]", - }, - { - internalType: "uint256", - name: "numOfMessagesIssuedOnAcceptance", - type: "uint256", - }, - { - internalType: "uint256", - name: "numOfMessagesIssuedOnFinalization", - type: "uint256", + "internalType": "bytes32[]", + "name": "validatorVotesHash", + "type": "bytes32[]" }, { - internalType: "address", - name: "txOrigin", - type: "address", - }, - { - internalType: "uint256", - name: "initialRotations", - type: "uint256", - }, + "internalType": "bytes32[]", + "name": "validatorResultHash", + "type": "bytes32[]" + } ], - internalType: "struct ITransactions.Transaction", - name: "transaction", - type: "tuple", - }, + "internalType": "struct ITransactions.RoundData[]", + "name": "roundsData", + "type": "tuple[]" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "_txId", - type: "bytes32", + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" }, { - internalType: "uint256", - name: "_timestamp", - type: "uint256", - }, + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } ], - name: "getTransactionData", - outputs: [ + "name": "getTransactionData", + "outputs": [ { - components: [ + "components": [ { - internalType: "uint256", - name: "currentTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" }, { - internalType: "address", - name: "sender", - type: "address", + "internalType": "address", + "name": "sender", + "type": "address" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "uint256", - name: "initialRotations", - type: "uint256", + "internalType": "uint256", + "name": "initialRotations", + "type": "uint256" }, { - internalType: "uint256", - name: "txSlot", - type: "uint256", + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" }, { - internalType: "uint256", - name: "createdTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "createdTimestamp", + "type": "uint256" }, { - internalType: "uint256", - name: "lastVoteTimestamp", - type: "uint256", + "internalType": "uint256", + "name": "lastVoteTimestamp", + "type": "uint256" }, { - internalType: "bytes32", - name: "randomSeed", - type: "bytes32", + "internalType": "bytes32", + "name": "randomSeed", + "type": "bytes32" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "bytes32", - name: "txExecutionHash", - type: "bytes32", + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" }, { - internalType: "bytes", - name: "txCalldata", - type: "bytes", + "internalType": "bytes", + "name": "txCalldata", + "type": "bytes" }, { - internalType: "bytes", - name: "eqBlocksOutputs", - type: "bytes", + "internalType": "bytes", + "name": "eqBlocksOutputs", + "type": "bytes" }, { - components: [ + "components": [ { - internalType: "enum IMessages.MessageType", - name: "messageType", - type: "uint8", + "internalType": "enum IMessages.MessageType", + "name": "messageType", + "type": "uint8" }, { - internalType: "address", - name: "recipient", - type: "address", + "internalType": "address", + "name": "recipient", + "type": "address" }, { - internalType: "uint256", - name: "value", - type: "uint256", + "internalType": "uint256", + "name": "value", + "type": "uint256" }, { - internalType: "bytes", - name: "data", - type: "bytes", + "internalType": "bytes", + "name": "data", + "type": "bytes" }, { - internalType: "bool", - name: "onAcceptance", - type: "bool", + "internalType": "bool", + "name": "onAcceptance", + "type": "bool" }, { - internalType: "uint256", - name: "saltNonce", - type: "uint256", - }, + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + } ], - internalType: "struct IMessages.SubmittedMessage[]", - name: "messages", - type: "tuple[]", + "internalType": "struct IMessages.SubmittedMessage[]", + "name": "messages", + "type": "tuple[]" }, { - internalType: "enum IQueues.QueueType", - name: "queueType", - type: "uint8", + "internalType": "enum IQueues.QueueType", + "name": "queueType", + "type": "uint8" }, { - internalType: "uint256", - name: "queuePosition", - type: "uint256", + "internalType": "uint256", + "name": "queuePosition", + "type": "uint256" }, { - internalType: "address", - name: "activator", - type: "address", + "internalType": "address", + "name": "activator", + "type": "address" }, { - internalType: "address", - name: "lastLeader", - type: "address", + "internalType": "address", + "name": "lastLeader", + "type": "address" }, { - internalType: "enum ITransactions.TransactionStatus", - name: "status", - type: "uint8", + "internalType": "enum ITransactions.TransactionStatus", + "name": "status", + "type": "uint8" }, { - internalType: "bytes32", - name: "txId", - type: "bytes32", + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "activationBlock", - type: "uint256", + "internalType": "uint256", + "name": "activationBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "processingBlock", - type: "uint256", + "internalType": "uint256", + "name": "processingBlock", + "type": "uint256" }, { - internalType: "uint256", - name: "proposalBlock", - type: "uint256", - }, + "internalType": "uint256", + "name": "proposalBlock", + "type": "uint256" + } ], - internalType: "struct ITransactions.ReadStateBlockRange", - name: "readStateBlockRange", - type: "tuple", + "internalType": "struct ITransactions.ReadStateBlockRange", + "name": "readStateBlockRange", + "type": "tuple" }, { - internalType: "uint256", - name: "numOfRounds", - type: "uint256", + "internalType": "uint256", + "name": "numOfRounds", + "type": "uint256" }, { - components: [ + "components": [ { - internalType: "uint256", - name: "round", - type: "uint256", + "internalType": "uint256", + "name": "round", + "type": "uint256" }, { - internalType: "uint256", - name: "leaderIndex", - type: "uint256", + "internalType": "uint256", + "name": "leaderIndex", + "type": "uint256" }, { - internalType: "uint256", - name: "votesCommitted", - type: "uint256", + "internalType": "uint256", + "name": "votesCommitted", + "type": "uint256" }, { - internalType: "uint256", - name: "votesRevealed", - type: "uint256", + "internalType": "uint256", + "name": "votesRevealed", + "type": "uint256" }, { - internalType: "uint256", - name: "appealBond", - type: "uint256", + "internalType": "uint256", + "name": "appealBond", + "type": "uint256" }, { - internalType: "uint256", - name: "rotationsLeft", - type: "uint256", + "internalType": "uint256", + "name": "rotationsLeft", + "type": "uint256" }, { - internalType: "enum ITransactions.ResultType", - name: "result", - type: "uint8", + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" }, { - internalType: "address[]", - name: "roundValidators", - type: "address[]", + "internalType": "address[]", + "name": "roundValidators", + "type": "address[]" }, { - internalType: "enum ITransactions.VoteType[]", - name: "validatorVotes", - type: "uint8[]", + "internalType": "enum ITransactions.VoteType[]", + "name": "validatorVotes", + "type": "uint8[]" }, { - internalType: "bytes32[]", - name: "validatorVotesHash", - type: "bytes32[]", + "internalType": "bytes32[]", + "name": "validatorVotesHash", + "type": "bytes32[]" }, { - internalType: "bytes32[]", - name: "validatorResultHash", - type: "bytes32[]", - }, + "internalType": "bytes32[]", + "name": "validatorResultHash", + "type": "bytes32[]" + } ], - internalType: "struct ITransactions.RoundData", - name: "lastRound", - type: "tuple", + "internalType": "struct ITransactions.RoundData", + "name": "lastRound", + "type": "tuple" }, { - internalType: "address[]", - name: "consumedValidators", - type: "address[]", - }, + "internalType": "address[]", + "name": "consumedValidators", + "type": "address[]" + } ], - internalType: "struct ConsensusData.TransactionData", - name: "", - type: "tuple", - }, + "internalType": "struct ConsensusData.TransactionData", + "name": "", + "type": "tuple" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "uint256", - name: "startIndex", - type: "uint256", + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" }, { - internalType: "uint256", - name: "endIndex", - type: "uint256", - }, + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } ], - name: "getTransactionIndexToTxId", - outputs: [ + "name": "getTransactionStatus", + "outputs": [ { - internalType: "bytes32[]", - name: "", - type: "bytes32[]", - }, + "internalType": "enum ITransactions.TransactionStatus", + "name": "", + "type": "uint8" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "_tx_id", - type: "bytes32", - }, - { - internalType: "uint256", - name: "_timestamp", - type: "uint256", - }, + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } ], - name: "getTransactionStatus", - outputs: [ + "name": "getValidatorsForLastRound", + "outputs": [ { - internalType: "enum ITransactions.TransactionStatus", - name: "", - type: "uint8", - }, + "internalType": "address[]", + "name": "validators", + "type": "address[]" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "_tx_id", - type: "bytes32", + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, - ], - name: "getValidatorsForLastAppeal", - outputs: [ { - internalType: "address[]", - name: "", - type: "address[]", - }, + "internalType": "address", + "name": "account", + "type": "address" + } ], - stateMutability: "view", - type: "function", + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "_tx_id", - type: "bytes32", + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, - ], - name: "getValidatorsForLastRound", - outputs: [ { - internalType: "address[]", - name: "", - type: "address[]", - }, + "internalType": "address", + "name": "account", + "type": "address" + } ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, + "name": "hasRole", + "outputs": [ { - internalType: "address", - name: "account", - type: "address", - }, + "internalType": "bool", + "name": "", + "type": "bool" + } ], - name: "grantRole", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, + "inputs": [ { - internalType: "address", - name: "account", - type: "address", - }, + "internalType": "address", + "name": "_addressManager", + "type": "address" + } ], - name: "hasRole", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ - { - internalType: "bytes32", - name: "_tx_id", - type: "bytes32", - }, - ], - name: "hasTransactionOnAcceptanceMessages", - outputs: [ + "inputs": [], + "name": "owner", + "outputs": [ { - internalType: "bool", - name: "", - type: "bool", - }, + "internalType": "address", + "name": "", + "type": "address" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ + "inputs": [], + "name": "pendingOwner", + "outputs": [ { - internalType: "bytes32", - name: "_tx_id", - type: "bytes32", - }, + "internalType": "address", + "name": "", + "type": "address" + } ], - name: "hasTransactionOnFinalizationMessages", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [ - { - internalType: "address", - name: "_consensusMain", - type: "address", - }, - { - internalType: "address", - name: "_transactions", - type: "address", - }, - { - internalType: "address", - name: "_queues", - type: "address", - }, - ], - name: "initialize", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [], - name: "owner", - outputs: [ + "inputs": [ { - internalType: "address", - name: "", - type: "address", + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "pendingOwner", - outputs: [ { - internalType: "address", - name: "", - type: "address", - }, + "internalType": "address", + "name": "callerConfirmation", + "type": "address" + } ], - stateMutability: "view", - type: "function", + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [], - name: "queues", - outputs: [ + "inputs": [ { - internalType: "contract IQueues", - name: "", - type: "address", + "internalType": "bytes32", + "name": "role", + "type": "bytes32" }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "renounceOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - { - internalType: "address", - name: "callerConfirmation", - type: "address", - }, + "internalType": "address", + "name": "account", + "type": "address" + } ], - name: "renounceRole", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "bytes32", - name: "role", - type: "bytes32", - }, - { - internalType: "address", - name: "account", - type: "address", - }, + "internalType": "address", + "name": "_addressManager", + "type": "address" + } ], - name: "revokeRole", - outputs: [], - stateMutability: "nonpayable", - type: "function", + "name": "setAddressManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - inputs: [ + "inputs": [ { - internalType: "address", - name: "_consensusMain", - type: "address", - }, + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } ], - name: "setConsensusMain", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_queues", - type: "address", - }, - ], - name: "setQueues", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_transactions", - type: "address", - }, - ], - name: "setTransactions", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ + "name": "supportsInterface", + "outputs": [ { - internalType: "bytes4", - name: "interfaceId", - type: "bytes4", - }, - ], - name: "supportsInterface", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, + "internalType": "bool", + "name": "", + "type": "bool" + } ], - stateMutability: "view", - type: "function", + "stateMutability": "view", + "type": "function" }, { - inputs: [], - name: "transactions", - outputs: [ + "inputs": [ { - internalType: "contract ITransactions", - name: "", - type: "address", - }, + "internalType": "address", + "name": "newOwner", + "type": "address" + } ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "transferOwnership", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } ], bytecode: "", }; diff --git a/src/contracts/actions.ts b/src/contracts/actions.ts index 745222a..e30a6ae 100644 --- a/src/contracts/actions.ts +++ b/src/contracts/actions.ts @@ -468,13 +468,14 @@ const _encodeAddTransactionData = ({ }): {primaryEncodedData: `0x${string}`; fallbackEncodedData: `0x${string}`} => { const validatedSenderAccount = validateAccount(senderAccount); - const addTransactionArgs: [ - Address, - `0x${string}` | undefined, - number, - number | undefined, - `0x${string}` | undefined, - ] = [ + // Detect if ABI has the WithFees variant (7 params including FeesDistribution tuple) + const abi = client.chain.consensusMainContract?.abi as any[]; + const addTxEntry = abi?.find( + (e: any) => e.type === "function" && e.name === "addTransaction", + ); + const hasFees = addTxEntry?.inputs?.length === 7; + + const args: unknown[] = [ validatedSenderAccount.address, recipient, client.chain.defaultNumberOfInitialValidators, @@ -482,28 +483,30 @@ const _encodeAddTransactionData = ({ data, ]; - const encodedDataV5 = encodeFunctionData({ - abi: ADD_TRANSACTION_ABI_V5 as any, - functionName: "addTransaction", - args: addTransactionArgs, - }); + if (hasFees) { + // Insert default FeesDistribution struct with zero values + args.push({ + leaderTimeoutFee: 0n, + validatorsTimeoutFee: 0n, + appealRounds: 0n, + rollupStorageFee: 0n, + rollupGenVMFee: 0n, + totalMessageFees: 0n, + rotations: [], + }); + } + + args.push(validUntil); - const encodedDataV6 = encodeFunctionData({ - abi: ADD_TRANSACTION_ABI_V6 as any, + const encoded = encodeFunctionData({ + abi: client.chain.consensusMainContract?.abi as any, functionName: "addTransaction", - args: [...addTransactionArgs, validUntil], + args, }); - if (getAddTransactionInputCount(client.chain.consensusMainContract?.abi) >= 6) { - return { - primaryEncodedData: encodedDataV6, - fallbackEncodedData: encodedDataV5, - }; - } - return { - primaryEncodedData: encodedDataV5, - fallbackEncodedData: encodedDataV6, + primaryEncodedData: encoded, + fallbackEncodedData: encoded, }; }; diff --git a/src/subscriptions/actions.ts b/src/subscriptions/actions.ts index 544f06a..3b437bc 100644 --- a/src/subscriptions/actions.ts +++ b/src/subscriptions/actions.ts @@ -18,6 +18,7 @@ import { TransactionActivatedEvent, TransactionUndeterminedEvent, TransactionLeaderTimeoutEvent, + TransactionFinalizedEvent, AppealStartedEvent, TransactionHash, Address, @@ -198,11 +199,9 @@ export function subscriptionActions(client: GenLayerClient) { }, subscribeToTransactionAccepted: (): ConsensusEventStream => { - return createEventStream(client, "TransactionAccepted", log => { - // ABI uses snake_case `tx_id` for this event - const decoded = decodeLog<{tx_id: `0x${string}`}>(log, "TransactionAccepted"); - return {txId: decoded.tx_id as TransactionHash}; - }); + return createEventStream(client, "TransactionAccepted", log => + decodeLog(log, "TransactionAccepted"), + ); }, subscribeToTransactionActivated: (): ConsensusEventStream => { @@ -212,34 +211,36 @@ export function subscriptionActions(client: GenLayerClient) { }, subscribeToTransactionUndetermined: (): ConsensusEventStream => { - return createEventStream(client, "TransactionUndetermined", log => { - // ABI uses snake_case `tx_id` for this event - const decoded = decodeLog<{tx_id: `0x${string}`}>(log, "TransactionUndetermined"); - return {txId: decoded.tx_id as TransactionHash}; - }); + return createEventStream(client, "TransactionUndetermined", log => + decodeLog(log, "TransactionUndetermined"), + ); }, subscribeToTransactionLeaderTimeout: (): ConsensusEventStream => { - return createEventStream(client, "TransactionLeaderTimeout", log => { - // ABI uses snake_case `tx_id` for this event - const decoded = decodeLog<{tx_id: `0x${string}`}>(log, "TransactionLeaderTimeout"); - return {txId: decoded.tx_id as TransactionHash}; - }); + return createEventStream(client, "TransactionLeaderTimeout", log => + decodeLog(log, "TransactionLeaderTimeout"), + ); + }, + + subscribeToTransactionFinalized: (): ConsensusEventStream => { + return createEventStream(client, "TransactionFinalized", log => + decodeLog(log, "TransactionFinalized"), + ); }, subscribeToAppealStarted: (): ConsensusEventStream => { return createEventStream(client, "AppealStarted", log => { const decoded = decodeLog<{ txId: `0x${string}`; - appealer: `0x${string}`; - appealBond: bigint; - appealValidators: `0x${string}`[]; + appellant: `0x${string}`; + bond: bigint; + validators: `0x${string}`[]; }>(log, "AppealStarted"); return { txId: decoded.txId as TransactionHash, - appealer: decoded.appealer as Address, - appealBond: decoded.appealBond, - appealValidators: decoded.appealValidators as Address[], + appellant: decoded.appellant as Address, + bond: decoded.bond, + validators: decoded.validators as Address[], }; }); }, diff --git a/src/types/chains.ts b/src/types/chains.ts index 71579a8..5e59fa4 100644 --- a/src/types/chains.ts +++ b/src/types/chains.ts @@ -3,6 +3,7 @@ import {Address} from "./accounts"; export type GenLayerChain = Chain & { isStudio: boolean; + addressManagerAddress?: Address; consensusMainContract: { address: Address; abi: readonly unknown[]; diff --git a/src/types/subscriptions.ts b/src/types/subscriptions.ts index ae53910..afc42ab 100644 --- a/src/types/subscriptions.ts +++ b/src/types/subscriptions.ts @@ -24,11 +24,15 @@ export type TransactionLeaderTimeoutEvent = { txId: TransactionHash; }; +export type TransactionFinalizedEvent = { + txId: TransactionHash; +}; + export type AppealStartedEvent = { txId: TransactionHash; - appealer: Address; - appealBond: bigint; - appealValidators: Address[]; + appellant: Address; + bond: bigint; + validators: Address[]; }; export type ConsensusEventName = @@ -37,6 +41,7 @@ export type ConsensusEventName = | "TransactionActivated" | "TransactionUndetermined" | "TransactionLeaderTimeout" + | "TransactionFinalized" | "AppealStarted"; export type ConsensusEventMap = { @@ -45,6 +50,7 @@ export type ConsensusEventMap = { TransactionActivated: TransactionActivatedEvent; TransactionUndetermined: TransactionUndeterminedEvent; TransactionLeaderTimeout: TransactionLeaderTimeoutEvent; + TransactionFinalized: TransactionFinalizedEvent; AppealStarted: AppealStartedEvent; }; From 9129972c5148cf4194f40adf7c8dd28b6cf6c106 Mon Sep 17 00:00:00 2001 From: Agustin Ramiro Diaz Date: Thu, 12 Feb 2026 16:34:40 -0300 Subject: [PATCH 10/15] feat: add subscribeToTransactionFinalized to client type Co-Authored-By: Claude Opus 4.6 --- src/types/clients.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/types/clients.ts b/src/types/clients.ts index 8adb402..b838703 100644 --- a/src/types/clients.ts +++ b/src/types/clients.ts @@ -15,6 +15,7 @@ import { TransactionActivatedEvent, TransactionUndeterminedEvent, TransactionLeaderTimeoutEvent, + TransactionFinalizedEvent, AppealStartedEvent, } from "@/types/subscriptions"; @@ -195,5 +196,6 @@ export type GenLayerClient = Omit< subscribeToTransactionActivated: () => ConsensusEventStream; subscribeToTransactionUndetermined: () => ConsensusEventStream; subscribeToTransactionLeaderTimeout: () => ConsensusEventStream; + subscribeToTransactionFinalized: () => ConsensusEventStream; subscribeToAppealStarted: () => ConsensusEventStream; } & StakingActions; From bf674065e31e32ee8a10d0f15b557d7574eece77 Mon Sep 17 00:00:00 2001 From: Agustin Ramiro Diaz Date: Fri, 13 Feb 2026 09:55:52 -0300 Subject: [PATCH 11/15] chore: update abis --- src/chains/actions.ts | 15 + src/chains/localnet.ts | 6414 +++++++++++++++++----------------- src/chains/testnetAsimov.ts | 6600 +++++++++++++++++------------------ 3 files changed, 6429 insertions(+), 6600 deletions(-) diff --git a/src/chains/actions.ts b/src/chains/actions.ts index 0568d38..b20ecbf 100644 --- a/src/chains/actions.ts +++ b/src/chains/actions.ts @@ -41,12 +41,27 @@ async function resolveFromAddressManager( throw new Error(`AddressManager.getAddress("${name}") failed: ${json.error.message}`); } + if (!json.result || json.result === "0x" || json.result === "0x0") { + throw new Error( + `AddressManager at ${addressManagerAddress} returned empty data for "${name}". ` + + `The AddressManager contract may not be deployed at this address.`, + ); + } + const result = decodeFunctionResult({ abi: ADDRESS_MANAGER_ABI, functionName: "getAddress", data: json.result as `0x${string}`, }); + const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000"; + if (result === ZERO_ADDRESS) { + throw new Error( + `AddressManager at ${addressManagerAddress} returned zero address for "${name}". ` + + `The contract name may not be registered.`, + ); + } + return result as Address; } diff --git a/src/chains/localnet.ts b/src/chains/localnet.ts index 7ab8a0b..e86ccce 100644 --- a/src/chains/localnet.ts +++ b/src/chains/localnet.ts @@ -6,3317 +6,3317 @@ const SIMULATOR_JSON_RPC_URL = "http://127.0.0.1:4000/api"; const CONSENSUS_MAIN_CONTRACT = { address: "0xb7278A61aa25c888815aFC32Ad3cC52fF24fE575" as Address, abi: [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "CallerNotMessages", - "type": "error" - }, - { - "inputs": [], - "name": "CanNotAppeal", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidDeploymentWithSalt", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidGhostContract", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidInitialization", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidRevealLeaderData", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidVote", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "OwnableInvalidOwner", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "OwnableUnauthorizedAccount", - "type": "error" - }, - { - "inputs": [], - "name": "ReentrancyGuardReentrantCall", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "oldActivator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newActivator", - "type": "address" - } - ], - "name": "ActivatorReplaced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "addressManager", - "type": "address" - } - ], - "name": "AddressManagerSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "enum ITransactions.TransactionStatus", - "name": "newStatus", - "type": "uint8" - } - ], - "name": "AllVotesCommitted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "appellant", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "bond", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "validators", - "type": "address[]" - } - ], - "name": "AppealStarted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "attempted", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "succeeded", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "failed", - "type": "uint256" - } - ], - "name": "BatchFinalizationCompleted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "txSlot", - "type": "uint256" - } - ], - "name": "CreatedTransaction", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "activator", - "type": "address" - } - ], - "name": "InternalMessageProcessed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "oldLeader", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newLeader", - "type": "address" - } - ], - "name": "LeaderIdlenessProcessed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "activator", - "type": "address" - } - ], - "name": "NewTransaction", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferStarted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - } - ], - "name": "ProcessIdlenessAccepted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - } - ], - "name": "TransactionAccepted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "leader", - "type": "address" - } - ], - "name": "TransactionActivated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "cancelledBy", - "type": "address" - } - ], - "name": "TransactionCancelled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - } - ], - "name": "TransactionFinalizationFailed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - } - ], - "name": "TransactionFinalized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - } - ], - "name": "TransactionLeaderRevealed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "newLeader", - "type": "address" - } - ], - "name": "TransactionLeaderRotated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - } - ], - "name": "TransactionLeaderTimeout", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32[]", - "name": "txIds", - "type": "bytes32[]" - } - ], - "name": "TransactionNeedsRecomputation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "validators", - "type": "address[]" - } - ], - "name": "TransactionReceiptProposed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - } - ], - "name": "TransactionUndetermined", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tribunalIndex", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "validator", - "type": "address" - } - ], - "name": "TribunalAppealVoteCommitted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tribunalIndex", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "validator", - "type": "address" - }, - { - "indexed": false, - "internalType": "enum ITransactions.VoteType", - "name": "voteType", - "type": "uint8" - } - ], - "name": "TribunalAppealVoteRevealed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "oldValidator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newValidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "validatorIndex", - "type": "uint256" - } - ], - "name": "ValidatorReplaced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "ValueWithdrawalFailed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "validator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "isLastVote", - "type": "bool" - } - ], - "name": "VoteCommitted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "validator", - "type": "address" - }, - { - "indexed": false, - "internalType": "enum ITransactions.VoteType", - "name": "voteType", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "bool", - "name": "isLastVote", - "type": "bool" - }, - { - "indexed": false, - "internalType": "enum ITransactions.ResultType", - "name": "result", - "type": "uint8" - } - ], - "name": "VoteRevealed", - "type": "event" - }, - { - "inputs": [], - "name": "EVENTS_BATCH_SIZE", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "VERSION", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "acceptOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "_operator", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_vrfProof", - "type": "bytes" - } - ], - "name": "activateTransaction", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_sender", - "type": "address" - }, - { - "internalType": "address", - "name": "_recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_numOfInitialValidators", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxRotations", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_calldata", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_validUntil", - "type": "uint256" - } - ], - "name": "addTransaction", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "addressManager", - "outputs": [ - { - "internalType": "contract IAddressManager", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - } - ], - "name": "cancelTransaction", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_tribunalIndex", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "_commitHash", - "type": "bytes32" - } - ], - "name": "commitTribunalAppealVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_commitHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_validatorIndex", - "type": "uint256" - } - ], - "name": "commitVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_numOfInitialValidators", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxRotations", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_calldata", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_saltNonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_validUntil", - "type": "uint256" - } - ], - "name": "deploySalted", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeMessage", - "outputs": [ - { - "internalType": "bool", - "name": "success", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "_txIds", - "type": "bytes32[]" - } - ], - "name": "finalizeIdlenessTxs", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - } - ], - "name": "finalizeTransaction", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - } - ], - "name": "flushExternalMessages", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getAddressManager", - "outputs": [ - { - "internalType": "contract IAddressManager", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - } - ], - "name": "getPendingTransactionValue", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_addressManager", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - } - ], - "name": "isGhostContract", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - } - ], - "name": "leaderIdleness", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "saltAsAValidator", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "txExecutionHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "messagesAndOtherFieldsHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "otherExecutionFieldsHash", - "type": "bytes32" - }, - { - "internalType": "enum ITransactions.VoteType", - "name": "resultValue", - "type": "uint8" - }, - { - "components": [ - { - "internalType": "enum IMessages.MessageType", - "name": "messageType", - "type": "uint8" - }, - { + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "CallerNotMessages", + "type": "error" + }, + { + "inputs": [], + "name": "CanNotAppeal", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidDeploymentWithSalt", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidGhostContract", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidRevealLeaderData", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidVote", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { "internalType": "address", - "name": "recipient", + "name": "owner", "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "bool", - "name": "onAcceptance", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "saltNonce", - "type": "uint256" - } - ], - "internalType": "struct IMessages.SubmittedMessage[]", - "name": "messages", - "type": "tuple[]" - } - ], - "internalType": "struct IConsensusMain.LeaderRevealVoteParams", - "name": "leaderRevealVoteParams", - "type": "tuple" - } - ], - "name": "leaderRevealVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pendingOwner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - } - ], - "name": "processIdleness", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_txExecutionHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_processingBlock", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_operator", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_eqBlocksOutputs", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "_vrfProof", - "type": "bytes" - } - ], - "name": "proposeReceipt", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "_txIds", - "type": "bytes32[]" - } - ], - "name": "redButtonFinalize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "ghost", - "type": "address" - } - ], - "name": "registerGhostContract", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_tribunalIndex", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "_voteHash", - "type": "bytes32" - }, - { - "internalType": "enum ITransactions.VoteType", - "name": "_voteType", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "_otherExecutionFieldsHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "revealTribunalAppealVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_voteHash", - "type": "bytes32" - }, - { - "internalType": "enum ITransactions.VoteType", - "name": "_voteType", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "_otherExecutionFieldsHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_validatorIndex", - "type": "uint256" - } - ], - "name": "revealVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_addressManager", - "type": "address" - } - ], - "name": "setAddressManager", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - } - ], - "name": "submitAppeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - bytecode: "", -}; - -const CONSENSUS_DATA_CONTRACT = { - address: "0x88B0F18613Db92Bf970FfE264E02496e20a74D16" as Address, - abi: [ - { - "inputs": [], - "name": "AccessControlBadConfirmation", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "neededRole", - "type": "bytes32" - } - ], - "name": "AccessControlUnauthorizedAccount", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidInitialization", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "OwnableInvalidOwner", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "OwnableUnauthorizedAccount", - "type": "error" - }, - { - "inputs": [], - "name": "ReentrancyGuardReentrantCall", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferStarted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "acceptOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "addressManager", - "outputs": [ - { - "internalType": "contract IAddressManager", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_currentTimestamp", - "type": "uint256" - } - ], - "name": "canFinalize", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "name": "getLatestAcceptedTransaction", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "currentTimestamp", - "type": "uint256" - }, - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialRotations", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "txSlot", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "createdTimestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lastVoteTimestamp", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "randomSeed", - "type": "bytes32" - }, - { - "internalType": "enum ITransactions.ResultType", - "name": "result", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "txExecutionHash", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "txCalldata", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "eqBlocksOutputs", - "type": "bytes" - }, - { - "components": [ - { - "internalType": "enum IMessages.MessageType", - "name": "messageType", + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "oldActivator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newActivator", + "type": "address" + } + ], + "name": "ActivatorReplaced", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "addressManager", + "type": "address" + } + ], + "name": "AddressManagerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "enum ITransactions.TransactionStatus", + "name": "newStatus", "type": "uint8" - }, - { + } + ], + "name": "AllVotesCommitted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": true, "internalType": "address", - "name": "recipient", + "name": "appellant", "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "bool", - "name": "onAcceptance", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "saltNonce", - "type": "uint256" - } - ], - "internalType": "struct IMessages.SubmittedMessage[]", - "name": "messages", - "type": "tuple[]" - }, - { - "internalType": "enum IQueues.QueueType", - "name": "queueType", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "queuePosition", - "type": "uint256" - }, - { - "internalType": "address", - "name": "activator", - "type": "address" - }, - { - "internalType": "address", - "name": "lastLeader", - "type": "address" - }, - { - "internalType": "enum ITransactions.TransactionStatus", - "name": "status", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "activationBlock", - "type": "uint256" - }, - { + }, + { + "indexed": false, "internalType": "uint256", - "name": "processingBlock", + "name": "bond", "type": "uint256" - }, - { + }, + { + "indexed": false, + "internalType": "address[]", + "name": "validators", + "type": "address[]" + } + ], + "name": "AppealStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, "internalType": "uint256", - "name": "proposalBlock", + "name": "attempted", "type": "uint256" - } - ], - "internalType": "struct ITransactions.ReadStateBlockRange", - "name": "readStateBlockRange", - "type": "tuple" - }, - { - "internalType": "uint256", - "name": "numOfRounds", - "type": "uint256" - }, - { - "components": [ - { + }, + { + "indexed": false, "internalType": "uint256", - "name": "round", + "name": "succeeded", "type": "uint256" - }, - { + }, + { + "indexed": false, "internalType": "uint256", - "name": "leaderIndex", + "name": "failed", "type": "uint256" - }, - { + } + ], + "name": "BatchFinalizationCompleted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": false, "internalType": "uint256", - "name": "votesCommitted", + "name": "txSlot", "type": "uint256" - }, - { + } + ], + "name": "CreatedTransaction", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "activator", + "type": "address" + } + ], + "name": "InternalMessageProcessed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "oldLeader", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newLeader", + "type": "address" + } + ], + "name": "LeaderIdlenessProcessed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "activator", + "type": "address" + } + ], + "name": "NewTransaction", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } + ], + "name": "ProcessIdlenessAccepted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } + ], + "name": "TransactionAccepted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "leader", + "type": "address" + } + ], + "name": "TransactionActivated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "cancelledBy", + "type": "address" + } + ], + "name": "TransactionCancelled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } + ], + "name": "TransactionFinalizationFailed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } + ], + "name": "TransactionFinalized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } + ], + "name": "TransactionLeaderRevealed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "newLeader", + "type": "address" + } + ], + "name": "TransactionLeaderRotated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } + ], + "name": "TransactionLeaderTimeout", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32[]", + "name": "txIds", + "type": "bytes32[]" + } + ], + "name": "TransactionNeedsRecomputation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "validators", + "type": "address[]" + } + ], + "name": "TransactionReceiptProposed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } + ], + "name": "TransactionUndetermined", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": false, "internalType": "uint256", - "name": "votesRevealed", + "name": "tribunalIndex", "type": "uint256" - }, - { + }, + { + "indexed": true, + "internalType": "address", + "name": "validator", + "type": "address" + } + ], + "name": "TribunalAppealVoteCommitted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": false, "internalType": "uint256", - "name": "appealBond", + "name": "tribunalIndex", "type": "uint256" - }, - { + }, + { + "indexed": true, + "internalType": "address", + "name": "validator", + "type": "address" + }, + { + "indexed": false, + "internalType": "enum ITransactions.VoteType", + "name": "voteType", + "type": "uint8" + } + ], + "name": "TribunalAppealVoteRevealed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "oldValidator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newValidator", + "type": "address" + }, + { + "indexed": false, "internalType": "uint256", - "name": "rotationsLeft", + "name": "validatorIndex", "type": "uint256" - }, - { - "internalType": "enum ITransactions.ResultType", - "name": "result", - "type": "uint8" - }, - { - "internalType": "address[]", - "name": "roundValidators", - "type": "address[]" - }, - { - "internalType": "enum ITransactions.VoteType[]", - "name": "validatorVotes", - "type": "uint8[]" - }, - { - "internalType": "bytes32[]", - "name": "validatorVotesHash", - "type": "bytes32[]" - }, - { - "internalType": "bytes32[]", - "name": "validatorResultHash", - "type": "bytes32[]" - } - ], - "internalType": "struct ITransactions.RoundData", - "name": "lastRound", - "type": "tuple" - }, - { - "internalType": "address[]", - "name": "consumedValidators", - "type": "address[]" - } - ], - "internalType": "struct ConsensusData.TransactionData", - "name": "inputData", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "startIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pageSize", - "type": "uint256" - } - ], - "name": "getLatestAcceptedTransactions", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "currentTimestamp", - "type": "uint256" - }, - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialRotations", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "txSlot", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "createdTimestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lastVoteTimestamp", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "randomSeed", - "type": "bytes32" - }, - { - "internalType": "enum ITransactions.ResultType", - "name": "result", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "txExecutionHash", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "txCalldata", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "eqBlocksOutputs", - "type": "bytes" - }, - { - "components": [ - { - "internalType": "enum IMessages.MessageType", - "name": "messageType", - "type": "uint8" - }, - { + } + ], + "name": "ValidatorReplaced", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": true, "internalType": "address", "name": "recipient", "type": "address" - }, - { + }, + { + "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { + } + ], + "name": "ValueWithdrawalFailed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "validator", + "type": "address" + }, + { + "indexed": false, "internalType": "bool", - "name": "onAcceptance", + "name": "isLastVote", "type": "bool" - }, - { - "internalType": "uint256", - "name": "saltNonce", - "type": "uint256" - } - ], - "internalType": "struct IMessages.SubmittedMessage[]", - "name": "messages", - "type": "tuple[]" - }, - { - "internalType": "enum IQueues.QueueType", - "name": "queueType", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "queuePosition", - "type": "uint256" - }, - { - "internalType": "address", - "name": "activator", - "type": "address" - }, - { - "internalType": "address", - "name": "lastLeader", - "type": "address" - }, - { - "internalType": "enum ITransactions.TransactionStatus", - "name": "status", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "activationBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "processingBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "proposalBlock", - "type": "uint256" - } - ], - "internalType": "struct ITransactions.ReadStateBlockRange", - "name": "readStateBlockRange", - "type": "tuple" - }, - { - "internalType": "uint256", - "name": "numOfRounds", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "round", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "leaderIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "votesCommitted", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "votesRevealed", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "appealBond", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "rotationsLeft", - "type": "uint256" - }, - { + } + ], + "name": "VoteCommitted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "validator", + "type": "address" + }, + { + "indexed": false, + "internalType": "enum ITransactions.VoteType", + "name": "voteType", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isLastVote", + "type": "bool" + }, + { + "indexed": false, "internalType": "enum ITransactions.ResultType", "name": "result", "type": "uint8" - }, - { - "internalType": "address[]", - "name": "roundValidators", - "type": "address[]" - }, - { - "internalType": "enum ITransactions.VoteType[]", - "name": "validatorVotes", - "type": "uint8[]" - }, - { - "internalType": "bytes32[]", - "name": "validatorVotesHash", - "type": "bytes32[]" - }, - { - "internalType": "bytes32[]", - "name": "validatorResultHash", - "type": "bytes32[]" - } - ], - "internalType": "struct ITransactions.RoundData", - "name": "lastRound", - "type": "tuple" - }, - { - "internalType": "address[]", - "name": "consumedValidators", - "type": "address[]" - } - ], - "internalType": "struct ConsensusData.TransactionData[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "name": "getLatestAcceptedTxCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "name": "getLatestFinalizedTransaction", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "currentTimestamp", - "type": "uint256" - }, - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialRotations", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "txSlot", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "createdTimestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lastVoteTimestamp", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "randomSeed", - "type": "bytes32" - }, - { - "internalType": "enum ITransactions.ResultType", - "name": "result", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "txExecutionHash", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "txCalldata", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "eqBlocksOutputs", - "type": "bytes" - }, - { - "components": [ - { - "internalType": "enum IMessages.MessageType", - "name": "messageType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { + } + ], + "name": "VoteRevealed", + "type": "event" + }, + { + "inputs": [], + "name": "EVENTS_BATCH_SIZE", + "outputs": [ + { "internalType": "uint256", - "name": "value", + "name": "", "type": "uint256" - }, - { + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "VERSION", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { "internalType": "bytes", - "name": "data", + "name": "_vrfProof", "type": "bytes" - }, - { - "internalType": "bool", - "name": "onAcceptance", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "saltNonce", - "type": "uint256" - } - ], - "internalType": "struct IMessages.SubmittedMessage[]", - "name": "messages", - "type": "tuple[]" - }, - { - "internalType": "enum IQueues.QueueType", - "name": "queueType", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "queuePosition", - "type": "uint256" - }, - { - "internalType": "address", - "name": "activator", - "type": "address" - }, - { - "internalType": "address", - "name": "lastLeader", - "type": "address" - }, - { - "internalType": "enum ITransactions.TransactionStatus", - "name": "status", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "components": [ - { + } + ], + "name": "activateTransaction", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_sender", + "type": "address" + }, + { + "internalType": "address", + "name": "_recipient", + "type": "address" + }, + { "internalType": "uint256", - "name": "activationBlock", + "name": "_numOfInitialValidators", "type": "uint256" - }, - { + }, + { "internalType": "uint256", - "name": "processingBlock", + "name": "_maxRotations", "type": "uint256" - }, - { + }, + { + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" + }, + { "internalType": "uint256", - "name": "proposalBlock", + "name": "_validUntil", "type": "uint256" - } - ], - "internalType": "struct ITransactions.ReadStateBlockRange", - "name": "readStateBlockRange", - "type": "tuple" - }, - { - "internalType": "uint256", - "name": "numOfRounds", - "type": "uint256" - }, - { - "components": [ - { + } + ], + "name": "addTransaction", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "addressManager", + "outputs": [ + { + "internalType": "contract IAddressManager", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } + ], + "name": "cancelTransaction", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + }, + { "internalType": "uint256", - "name": "round", + "name": "_tribunalIndex", "type": "uint256" - }, - { + }, + { + "internalType": "bytes32", + "name": "_commitHash", + "type": "bytes32" + } + ], + "name": "commitTribunalAppealVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_commitHash", + "type": "bytes32" + }, + { "internalType": "uint256", - "name": "leaderIndex", + "name": "_validatorIndex", "type": "uint256" - }, - { + } + ], + "name": "commitVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_sender", + "type": "address" + }, + { "internalType": "uint256", - "name": "votesCommitted", + "name": "_numOfInitialValidators", "type": "uint256" - }, - { + }, + { "internalType": "uint256", - "name": "votesRevealed", + "name": "_maxRotations", "type": "uint256" - }, - { + }, + { + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" + }, + { "internalType": "uint256", - "name": "appealBond", + "name": "_saltNonce", "type": "uint256" - }, - { + }, + { "internalType": "uint256", - "name": "rotationsLeft", + "name": "_validUntil", "type": "uint256" - }, - { - "internalType": "enum ITransactions.ResultType", - "name": "result", - "type": "uint8" - }, - { - "internalType": "address[]", - "name": "roundValidators", - "type": "address[]" - }, - { - "internalType": "enum ITransactions.VoteType[]", - "name": "validatorVotes", - "type": "uint8[]" - }, - { - "internalType": "bytes32[]", - "name": "validatorVotesHash", - "type": "bytes32[]" - }, - { - "internalType": "bytes32[]", - "name": "validatorResultHash", - "type": "bytes32[]" - } - ], - "internalType": "struct ITransactions.RoundData", - "name": "lastRound", - "type": "tuple" - }, - { - "internalType": "address[]", - "name": "consumedValidators", - "type": "address[]" - } - ], - "internalType": "struct ConsensusData.TransactionData", - "name": "inputData", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "startIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pageSize", - "type": "uint256" - } - ], - "name": "getLatestFinalizedTransactions", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "currentTimestamp", - "type": "uint256" - }, - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialRotations", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "txSlot", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "createdTimestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lastVoteTimestamp", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "randomSeed", - "type": "bytes32" - }, - { - "internalType": "enum ITransactions.ResultType", - "name": "result", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "txExecutionHash", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "txCalldata", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "eqBlocksOutputs", - "type": "bytes" - }, - { - "components": [ - { - "internalType": "enum IMessages.MessageType", - "name": "messageType", - "type": "uint8" - }, - { + } + ], + "name": "deploySalted", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", - "name": "recipient", + "name": "_recipient", "type": "address" - }, - { + }, + { "internalType": "uint256", - "name": "value", + "name": "_value", "type": "uint256" - }, - { + }, + { "internalType": "bytes", - "name": "data", + "name": "_data", "type": "bytes" - }, - { + } + ], + "name": "executeMessage", + "outputs": [ + { "internalType": "bool", - "name": "onAcceptance", + "name": "success", "type": "bool" - }, - { - "internalType": "uint256", - "name": "saltNonce", - "type": "uint256" - } - ], - "internalType": "struct IMessages.SubmittedMessage[]", - "name": "messages", - "type": "tuple[]" - }, - { - "internalType": "enum IQueues.QueueType", - "name": "queueType", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "queuePosition", - "type": "uint256" - }, - { - "internalType": "address", - "name": "activator", - "type": "address" - }, - { - "internalType": "address", - "name": "lastLeader", - "type": "address" - }, - { - "internalType": "enum ITransactions.TransactionStatus", - "name": "status", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "activationBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "processingBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "proposalBlock", - "type": "uint256" - } - ], - "internalType": "struct ITransactions.ReadStateBlockRange", - "name": "readStateBlockRange", - "type": "tuple" - }, - { - "internalType": "uint256", - "name": "numOfRounds", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "round", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "leaderIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "votesCommitted", - "type": "uint256" - }, - { + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32[]", + "name": "_txIds", + "type": "bytes32[]" + } + ], + "name": "finalizeIdlenessTxs", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } + ], + "name": "finalizeTransaction", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } + ], + "name": "flushExternalMessages", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getAddressManager", + "outputs": [ + { + "internalType": "contract IAddressManager", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } + ], + "name": "getPendingTransactionValue", + "outputs": [ + { "internalType": "uint256", - "name": "votesRevealed", + "name": "", "type": "uint256" - }, - { + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_addressManager", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "isGhostContract", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } + ], + "name": "leaderIdleness", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "saltAsAValidator", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "messagesAndOtherFieldsHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "otherExecutionFieldsHash", + "type": "bytes32" + }, + { + "internalType": "enum ITransactions.VoteType", + "name": "resultValue", + "type": "uint8" + }, + { + "components": [ + { + "internalType": "enum IMessages.MessageType", + "name": "messageType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "onAcceptance", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + } + ], + "internalType": "struct IMessages.SubmittedMessage[]", + "name": "messages", + "type": "tuple[]" + } + ], + "internalType": "struct IConsensusMain.LeaderRevealVoteParams", + "name": "leaderRevealVoteParams", + "type": "tuple" + } + ], + "name": "leaderRevealVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } + ], + "name": "processIdleness", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_txExecutionHash", + "type": "bytes32" + }, + { "internalType": "uint256", - "name": "appealBond", + "name": "_processingBlock", "type": "uint256" - }, - { + }, + { + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_eqBlocksOutputs", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "_vrfProof", + "type": "bytes" + } + ], + "name": "proposeReceipt", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32[]", + "name": "_txIds", + "type": "bytes32[]" + } + ], + "name": "redButtonFinalize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "ghost", + "type": "address" + } + ], + "name": "registerGhostContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + }, + { "internalType": "uint256", - "name": "rotationsLeft", + "name": "_tribunalIndex", "type": "uint256" - }, - { - "internalType": "enum ITransactions.ResultType", - "name": "result", + }, + { + "internalType": "bytes32", + "name": "_voteHash", + "type": "bytes32" + }, + { + "internalType": "enum ITransactions.VoteType", + "name": "_voteType", "type": "uint8" - }, - { - "internalType": "address[]", - "name": "roundValidators", - "type": "address[]" - }, - { - "internalType": "enum ITransactions.VoteType[]", - "name": "validatorVotes", - "type": "uint8[]" - }, - { - "internalType": "bytes32[]", - "name": "validatorVotesHash", - "type": "bytes32[]" - }, - { - "internalType": "bytes32[]", - "name": "validatorResultHash", - "type": "bytes32[]" - } - ], - "internalType": "struct ITransactions.RoundData", - "name": "lastRound", - "type": "tuple" - }, - { - "internalType": "address[]", - "name": "consumedValidators", - "type": "address[]" - } - ], - "internalType": "struct ConsensusData.TransactionData[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "name": "getLatestFinalizedTxCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - } - ], - "name": "getTransactionAllData", - "outputs": [ - { - "components": [ - { - "internalType": "enum ITransactions.ResultType", - "name": "result", - "type": "uint8" - }, - { - "internalType": "enum ITransactions.VoteType", - "name": "txExecutionResult", - "type": "uint8" - }, - { - "internalType": "enum ITransactions.TransactionStatus", - "name": "previousStatus", - "type": "uint8" - }, - { - "internalType": "enum ITransactions.TransactionStatus", - "name": "status", - "type": "uint8" - }, - { - "internalType": "address", - "name": "txOrigin", - "type": "address" - }, - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "address", - "name": "activator", - "type": "address" - }, - { - "internalType": "uint256", - "name": "txSlot", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "initialRotations", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "numOfInitialValidators", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "epoch", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "randomSeed", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "txExecutionHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "resultHash", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "txCalldata", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "eqBlocksOutputs", - "type": "bytes" - }, - { - "components": [ - { + }, + { + "internalType": "bytes32", + "name": "_otherExecutionFieldsHash", + "type": "bytes32" + }, + { "internalType": "uint256", - "name": "activationBlock", + "name": "_nonce", "type": "uint256" - }, - { + } + ], + "name": "revealTribunalAppealVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_voteHash", + "type": "bytes32" + }, + { + "internalType": "enum ITransactions.VoteType", + "name": "_voteType", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "_otherExecutionFieldsHash", + "type": "bytes32" + }, + { "internalType": "uint256", - "name": "processingBlock", + "name": "_nonce", "type": "uint256" - }, - { + }, + { "internalType": "uint256", - "name": "proposalBlock", + "name": "_validatorIndex", "type": "uint256" - } - ], - "internalType": "struct ITransactions.ReadStateBlockRange[]", - "name": "readStateBlockRanges", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "validUntil", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "internalType": "struct ITransactions.Transaction", - "name": "transaction", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "round", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "leaderIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "votesCommitted", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "votesRevealed", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "appealBond", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "rotationsLeft", - "type": "uint256" - }, - { - "internalType": "enum ITransactions.ResultType", - "name": "result", - "type": "uint8" - }, - { - "internalType": "address[]", - "name": "roundValidators", - "type": "address[]" - }, - { - "internalType": "enum ITransactions.VoteType[]", - "name": "validatorVotes", - "type": "uint8[]" - }, - { - "internalType": "bytes32[]", - "name": "validatorVotesHash", - "type": "bytes32[]" - }, - { - "internalType": "bytes32[]", - "name": "validatorResultHash", - "type": "bytes32[]" - } - ], - "internalType": "struct ITransactions.RoundData[]", - "name": "roundsData", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_timestamp", - "type": "uint256" - } - ], - "name": "getTransactionData", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "currentTimestamp", - "type": "uint256" - }, - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialRotations", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "txSlot", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "createdTimestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lastVoteTimestamp", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "randomSeed", - "type": "bytes32" - }, - { - "internalType": "enum ITransactions.ResultType", - "name": "result", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "txExecutionHash", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "txCalldata", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "eqBlocksOutputs", - "type": "bytes" - }, - { - "components": [ - { - "internalType": "enum IMessages.MessageType", - "name": "messageType", - "type": "uint8" - }, - { + } + ], + "name": "revealVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", - "name": "recipient", + "name": "_addressManager", + "type": "address" + } + ], + "name": "setAddressManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } + ], + "name": "submitAppeal", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + bytecode: "", +}; + +const CONSENSUS_DATA_CONTRACT = { + address: "0x88B0F18613Db92Bf970FfE264E02496e20a74D16" as Address, + abi: [ + { + "inputs": [], + "name": "AccessControlBadConfirmation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "neededRole", + "type": "bytes32" + } + ], + "name": "AccessControlUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", "type": "address" - }, - { + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "addressManager", + "outputs": [ + { + "internalType": "contract IAddressManager", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + }, + { "internalType": "uint256", - "name": "value", + "name": "_currentTimestamp", "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { + } + ], + "name": "canFinalize", + "outputs": [ + { "internalType": "bool", - "name": "onAcceptance", + "name": "", "type": "bool" - }, - { + }, + { "internalType": "uint256", - "name": "saltNonce", + "name": "", "type": "uint256" - } - ], - "internalType": "struct IMessages.SubmittedMessage[]", - "name": "messages", - "type": "tuple[]" - }, - { - "internalType": "enum IQueues.QueueType", - "name": "queueType", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "queuePosition", - "type": "uint256" - }, - { - "internalType": "address", - "name": "activator", - "type": "address" - }, - { - "internalType": "address", - "name": "lastLeader", - "type": "address" - }, - { - "internalType": "enum ITransactions.TransactionStatus", - "name": "status", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "components": [ - { + }, + { "internalType": "uint256", - "name": "activationBlock", + "name": "", "type": "uint256" - }, - { + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "getLatestAcceptedTransaction", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" + }, + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialRotations", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "createdTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastVoteTimestamp", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "randomSeed", + "type": "bytes32" + }, + { + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "txCalldata", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "eqBlocksOutputs", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum IMessages.MessageType", + "name": "messageType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "onAcceptance", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + } + ], + "internalType": "struct IMessages.SubmittedMessage[]", + "name": "messages", + "type": "tuple[]" + }, + { + "internalType": "enum IQueues.QueueType", + "name": "queueType", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "queuePosition", + "type": "uint256" + }, + { + "internalType": "address", + "name": "activator", + "type": "address" + }, + { + "internalType": "address", + "name": "lastLeader", + "type": "address" + }, + { + "internalType": "enum ITransactions.TransactionStatus", + "name": "status", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "activationBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "processingBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposalBlock", + "type": "uint256" + } + ], + "internalType": "struct ITransactions.ReadStateBlockRange", + "name": "readStateBlockRange", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "numOfRounds", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "round", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "leaderIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "votesCommitted", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "votesRevealed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "appealBond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rotationsLeft", + "type": "uint256" + }, + { + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" + }, + { + "internalType": "address[]", + "name": "roundValidators", + "type": "address[]" + }, + { + "internalType": "enum ITransactions.VoteType[]", + "name": "validatorVotes", + "type": "uint8[]" + }, + { + "internalType": "bytes32[]", + "name": "validatorVotesHash", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "validatorResultHash", + "type": "bytes32[]" + } + ], + "internalType": "struct ITransactions.RoundData", + "name": "lastRound", + "type": "tuple" + }, + { + "internalType": "address[]", + "name": "consumedValidators", + "type": "address[]" + } + ], + "internalType": "struct ConsensusData.TransactionData", + "name": "inputData", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { "internalType": "uint256", - "name": "processingBlock", + "name": "startIndex", "type": "uint256" - }, - { + }, + { "internalType": "uint256", - "name": "proposalBlock", + "name": "pageSize", "type": "uint256" - } - ], - "internalType": "struct ITransactions.ReadStateBlockRange", - "name": "readStateBlockRange", - "type": "tuple" - }, - { - "internalType": "uint256", - "name": "numOfRounds", - "type": "uint256" - }, - { - "components": [ - { + } + ], + "name": "getLatestAcceptedTransactions", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" + }, + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialRotations", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "createdTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastVoteTimestamp", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "randomSeed", + "type": "bytes32" + }, + { + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "txCalldata", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "eqBlocksOutputs", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum IMessages.MessageType", + "name": "messageType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "onAcceptance", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + } + ], + "internalType": "struct IMessages.SubmittedMessage[]", + "name": "messages", + "type": "tuple[]" + }, + { + "internalType": "enum IQueues.QueueType", + "name": "queueType", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "queuePosition", + "type": "uint256" + }, + { + "internalType": "address", + "name": "activator", + "type": "address" + }, + { + "internalType": "address", + "name": "lastLeader", + "type": "address" + }, + { + "internalType": "enum ITransactions.TransactionStatus", + "name": "status", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "activationBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "processingBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposalBlock", + "type": "uint256" + } + ], + "internalType": "struct ITransactions.ReadStateBlockRange", + "name": "readStateBlockRange", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "numOfRounds", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "round", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "leaderIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "votesCommitted", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "votesRevealed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "appealBond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rotationsLeft", + "type": "uint256" + }, + { + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" + }, + { + "internalType": "address[]", + "name": "roundValidators", + "type": "address[]" + }, + { + "internalType": "enum ITransactions.VoteType[]", + "name": "validatorVotes", + "type": "uint8[]" + }, + { + "internalType": "bytes32[]", + "name": "validatorVotesHash", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "validatorResultHash", + "type": "bytes32[]" + } + ], + "internalType": "struct ITransactions.RoundData", + "name": "lastRound", + "type": "tuple" + }, + { + "internalType": "address[]", + "name": "consumedValidators", + "type": "address[]" + } + ], + "internalType": "struct ConsensusData.TransactionData[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "getLatestAcceptedTxCount", + "outputs": [ + { "internalType": "uint256", - "name": "round", + "name": "", "type": "uint256" - }, - { + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "getLatestFinalizedTransaction", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" + }, + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialRotations", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "createdTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastVoteTimestamp", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "randomSeed", + "type": "bytes32" + }, + { + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "txCalldata", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "eqBlocksOutputs", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum IMessages.MessageType", + "name": "messageType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "onAcceptance", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + } + ], + "internalType": "struct IMessages.SubmittedMessage[]", + "name": "messages", + "type": "tuple[]" + }, + { + "internalType": "enum IQueues.QueueType", + "name": "queueType", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "queuePosition", + "type": "uint256" + }, + { + "internalType": "address", + "name": "activator", + "type": "address" + }, + { + "internalType": "address", + "name": "lastLeader", + "type": "address" + }, + { + "internalType": "enum ITransactions.TransactionStatus", + "name": "status", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "activationBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "processingBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposalBlock", + "type": "uint256" + } + ], + "internalType": "struct ITransactions.ReadStateBlockRange", + "name": "readStateBlockRange", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "numOfRounds", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "round", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "leaderIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "votesCommitted", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "votesRevealed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "appealBond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rotationsLeft", + "type": "uint256" + }, + { + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" + }, + { + "internalType": "address[]", + "name": "roundValidators", + "type": "address[]" + }, + { + "internalType": "enum ITransactions.VoteType[]", + "name": "validatorVotes", + "type": "uint8[]" + }, + { + "internalType": "bytes32[]", + "name": "validatorVotesHash", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "validatorResultHash", + "type": "bytes32[]" + } + ], + "internalType": "struct ITransactions.RoundData", + "name": "lastRound", + "type": "tuple" + }, + { + "internalType": "address[]", + "name": "consumedValidators", + "type": "address[]" + } + ], + "internalType": "struct ConsensusData.TransactionData", + "name": "inputData", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { "internalType": "uint256", - "name": "leaderIndex", + "name": "startIndex", "type": "uint256" - }, - { + }, + { "internalType": "uint256", - "name": "votesCommitted", + "name": "pageSize", "type": "uint256" - }, - { + } + ], + "name": "getLatestFinalizedTransactions", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" + }, + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialRotations", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "createdTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastVoteTimestamp", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "randomSeed", + "type": "bytes32" + }, + { + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "txCalldata", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "eqBlocksOutputs", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum IMessages.MessageType", + "name": "messageType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "onAcceptance", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + } + ], + "internalType": "struct IMessages.SubmittedMessage[]", + "name": "messages", + "type": "tuple[]" + }, + { + "internalType": "enum IQueues.QueueType", + "name": "queueType", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "queuePosition", + "type": "uint256" + }, + { + "internalType": "address", + "name": "activator", + "type": "address" + }, + { + "internalType": "address", + "name": "lastLeader", + "type": "address" + }, + { + "internalType": "enum ITransactions.TransactionStatus", + "name": "status", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "activationBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "processingBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposalBlock", + "type": "uint256" + } + ], + "internalType": "struct ITransactions.ReadStateBlockRange", + "name": "readStateBlockRange", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "numOfRounds", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "round", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "leaderIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "votesCommitted", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "votesRevealed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "appealBond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rotationsLeft", + "type": "uint256" + }, + { + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" + }, + { + "internalType": "address[]", + "name": "roundValidators", + "type": "address[]" + }, + { + "internalType": "enum ITransactions.VoteType[]", + "name": "validatorVotes", + "type": "uint8[]" + }, + { + "internalType": "bytes32[]", + "name": "validatorVotesHash", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "validatorResultHash", + "type": "bytes32[]" + } + ], + "internalType": "struct ITransactions.RoundData", + "name": "lastRound", + "type": "tuple" + }, + { + "internalType": "address[]", + "name": "consumedValidators", + "type": "address[]" + } + ], + "internalType": "struct ConsensusData.TransactionData[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "getLatestFinalizedTxCount", + "outputs": [ + { "internalType": "uint256", - "name": "votesRevealed", + "name": "", "type": "uint256" - }, - { + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } + ], + "name": "getTransactionAllData", + "outputs": [ + { + "components": [ + { + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" + }, + { + "internalType": "enum ITransactions.VoteType", + "name": "txExecutionResult", + "type": "uint8" + }, + { + "internalType": "enum ITransactions.TransactionStatus", + "name": "previousStatus", + "type": "uint8" + }, + { + "internalType": "enum ITransactions.TransactionStatus", + "name": "status", + "type": "uint8" + }, + { + "internalType": "address", + "name": "txOrigin", + "type": "address" + }, + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "address", + "name": "activator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "initialRotations", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "numOfInitialValidators", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "randomSeed", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "resultHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "txCalldata", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "eqBlocksOutputs", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "activationBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "processingBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposalBlock", + "type": "uint256" + } + ], + "internalType": "struct ITransactions.ReadStateBlockRange[]", + "name": "readStateBlockRanges", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "validUntil", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct ITransactions.Transaction", + "name": "transaction", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "round", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "leaderIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "votesCommitted", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "votesRevealed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "appealBond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rotationsLeft", + "type": "uint256" + }, + { + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" + }, + { + "internalType": "address[]", + "name": "roundValidators", + "type": "address[]" + }, + { + "internalType": "enum ITransactions.VoteType[]", + "name": "validatorVotes", + "type": "uint8[]" + }, + { + "internalType": "bytes32[]", + "name": "validatorVotesHash", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "validatorResultHash", + "type": "bytes32[]" + } + ], + "internalType": "struct ITransactions.RoundData[]", + "name": "roundsData", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + }, + { "internalType": "uint256", - "name": "appealBond", + "name": "_timestamp", "type": "uint256" - }, - { + } + ], + "name": "getTransactionData", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" + }, + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialRotations", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "createdTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastVoteTimestamp", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "randomSeed", + "type": "bytes32" + }, + { + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "txCalldata", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "eqBlocksOutputs", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum IMessages.MessageType", + "name": "messageType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "onAcceptance", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + } + ], + "internalType": "struct IMessages.SubmittedMessage[]", + "name": "messages", + "type": "tuple[]" + }, + { + "internalType": "enum IQueues.QueueType", + "name": "queueType", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "queuePosition", + "type": "uint256" + }, + { + "internalType": "address", + "name": "activator", + "type": "address" + }, + { + "internalType": "address", + "name": "lastLeader", + "type": "address" + }, + { + "internalType": "enum ITransactions.TransactionStatus", + "name": "status", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "activationBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "processingBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposalBlock", + "type": "uint256" + } + ], + "internalType": "struct ITransactions.ReadStateBlockRange", + "name": "readStateBlockRange", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "numOfRounds", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "round", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "leaderIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "votesCommitted", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "votesRevealed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "appealBond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rotationsLeft", + "type": "uint256" + }, + { + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" + }, + { + "internalType": "address[]", + "name": "roundValidators", + "type": "address[]" + }, + { + "internalType": "enum ITransactions.VoteType[]", + "name": "validatorVotes", + "type": "uint8[]" + }, + { + "internalType": "bytes32[]", + "name": "validatorVotesHash", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "validatorResultHash", + "type": "bytes32[]" + } + ], + "internalType": "struct ITransactions.RoundData", + "name": "lastRound", + "type": "tuple" + }, + { + "internalType": "address[]", + "name": "consumedValidators", + "type": "address[]" + } + ], + "internalType": "struct ConsensusData.TransactionData", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + }, + { "internalType": "uint256", - "name": "rotationsLeft", + "name": "_timestamp", "type": "uint256" - }, - { - "internalType": "enum ITransactions.ResultType", - "name": "result", + } + ], + "name": "getTransactionStatus", + "outputs": [ + { + "internalType": "enum ITransactions.TransactionStatus", + "name": "", "type": "uint8" - }, - { + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } + ], + "name": "getValidatorsForLastRound", + "outputs": [ + { "internalType": "address[]", - "name": "roundValidators", + "name": "validators", "type": "address[]" - }, - { - "internalType": "enum ITransactions.VoteType[]", - "name": "validatorVotes", - "type": "uint8[]" - }, - { - "internalType": "bytes32[]", - "name": "validatorVotesHash", - "type": "bytes32[]" - }, - { - "internalType": "bytes32[]", - "name": "validatorResultHash", - "type": "bytes32[]" - } - ], - "internalType": "struct ITransactions.RoundData", - "name": "lastRound", - "type": "tuple" - }, - { - "internalType": "address[]", - "name": "consumedValidators", - "type": "address[]" - } - ], - "internalType": "struct ConsensusData.TransactionData", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_timestamp", - "type": "uint256" - } - ], - "name": "getTransactionStatus", - "outputs": [ - { - "internalType": "enum ITransactions.TransactionStatus", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - } - ], - "name": "getValidatorsForLastRound", - "outputs": [ - { - "internalType": "address[]", - "name": "validators", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_addressManager", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pendingOwner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "callerConfirmation", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_addressManager", - "type": "address" - } - ], - "name": "setAddressManager", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_addressManager", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "callerConfirmation", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_addressManager", + "type": "address" + } + ], + "name": "setAddressManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } ], bytecode: "", }; diff --git a/src/chains/testnetAsimov.ts b/src/chains/testnetAsimov.ts index 3cb20ad..8c2a930 100644 --- a/src/chains/testnetAsimov.ts +++ b/src/chains/testnetAsimov.ts @@ -14,3503 +14,3317 @@ const EXPLORER_URL = "https://explorer-asimov.genlayer.com/"; const CONSENSUS_MAIN_CONTRACT = { address: "0x6CAFF6769d70824745AD895663409DC70aB5B28E" as Address, abi: [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "CallerNotMessages", - "type": "error" - }, - { - "inputs": [], - "name": "CanNotAppeal", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientFees", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidDeploymentWithSalt", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidGhostContract", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidInitialization", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidRevealLeaderData", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidVote", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "OwnableInvalidOwner", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "OwnableUnauthorizedAccount", - "type": "error" - }, - { - "inputs": [], - "name": "ReentrancyGuardReentrantCall", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "oldActivator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newActivator", - "type": "address" - } - ], - "name": "ActivatorReplaced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "addressManager", - "type": "address" - } - ], - "name": "AddressManagerSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "enum ITransactions.TransactionStatus", - "name": "newStatus", - "type": "uint8" - } - ], - "name": "AllVotesCommitted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "appellant", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "bond", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "validators", - "type": "address[]" - } - ], - "name": "AppealStarted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "attempted", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "succeeded", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "failed", - "type": "uint256" - } - ], - "name": "BatchFinalizationCompleted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "txSlot", - "type": "uint256" - } - ], - "name": "CreatedTransaction", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "activator", - "type": "address" - } - ], - "name": "InternalMessageProcessed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "oldLeader", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newLeader", - "type": "address" - } - ], - "name": "LeaderIdlenessProcessed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "activator", - "type": "address" - } - ], - "name": "NewTransaction", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferStarted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - } - ], - "name": "ProcessIdlenessAccepted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - } - ], - "name": "TransactionAccepted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "leader", - "type": "address" - } - ], - "name": "TransactionActivated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "cancelledBy", - "type": "address" - } - ], - "name": "TransactionCancelled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - } - ], - "name": "TransactionFinalizationFailed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - } - ], - "name": "TransactionFinalized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - } - ], - "name": "TransactionLeaderRevealed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "newLeader", - "type": "address" - } - ], - "name": "TransactionLeaderRotated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - } - ], - "name": "TransactionLeaderTimeout", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32[]", - "name": "txIds", - "type": "bytes32[]" - } - ], - "name": "TransactionNeedsRecomputation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "address[]", - "name": "validators", - "type": "address[]" - } - ], - "name": "TransactionReceiptProposed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - } - ], - "name": "TransactionUndetermined", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tribunalIndex", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "validator", - "type": "address" - } - ], - "name": "TribunalAppealVoteCommitted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tribunalIndex", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "validator", - "type": "address" - }, - { - "indexed": false, - "internalType": "enum ITransactions.VoteType", - "name": "voteType", - "type": "uint8" - } - ], - "name": "TribunalAppealVoteRevealed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "oldValidator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newValidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "validatorIndex", - "type": "uint256" - } - ], - "name": "ValidatorReplaced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "ValueWithdrawalFailed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "validator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "isLastVote", - "type": "bool" - } - ], - "name": "VoteCommitted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "validator", - "type": "address" - }, - { - "indexed": false, - "internalType": "enum ITransactions.VoteType", - "name": "voteType", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "bool", - "name": "isLastVote", - "type": "bool" - }, - { - "indexed": false, - "internalType": "enum ITransactions.ResultType", - "name": "result", - "type": "uint8" - } - ], - "name": "VoteRevealed", - "type": "event" - }, - { - "inputs": [], - "name": "EVENTS_BATCH_SIZE", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "VERSION", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "acceptOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "_operator", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_vrfProof", - "type": "bytes" - } - ], - "name": "activateTransaction", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_sender", - "type": "address" - }, - { - "internalType": "address", - "name": "_recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_numOfInitialValidators", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxRotations", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_calldata", - "type": "bytes" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "leaderTimeoutFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "validatorsTimeoutFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "appealRounds", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "rollupStorageFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "rollupGenVMFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalMessageFees", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "rotations", - "type": "uint256[]" - } - ], - "internalType": "struct IFeeManager.FeesDistribution", - "name": "_feesDistribution", - "type": "tuple" - }, - { - "internalType": "uint256", - "name": "_validUntil", - "type": "uint256" - } - ], - "name": "addTransaction", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "addressManager", - "outputs": [ - { - "internalType": "contract IAddressManager", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - } - ], - "name": "cancelTransaction", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_tribunalIndex", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "_commitHash", - "type": "bytes32" - } - ], - "name": "commitTribunalAppealVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_commitHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_validatorIndex", - "type": "uint256" - } - ], - "name": "commitVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_numOfInitialValidators", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxRotations", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_calldata", - "type": "bytes" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "leaderTimeoutFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "validatorsTimeoutFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "appealRounds", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "rollupStorageFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "rollupGenVMFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalMessageFees", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "rotations", - "type": "uint256[]" - } - ], - "internalType": "struct IFeeManager.FeesDistribution", - "name": "_feesDistribution", - "type": "tuple" - }, - { - "internalType": "uint256", - "name": "_saltNonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_validUntil", - "type": "uint256" - } - ], - "name": "deploySalted", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "executeMessage", - "outputs": [ - { - "internalType": "bool", - "name": "success", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "_txIds", - "type": "bytes32[]" - } - ], - "name": "finalizeIdlenessTxs", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - } - ], - "name": "finalizeTransaction", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - } - ], - "name": "flushExternalMessages", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getAddressManager", - "outputs": [ - { - "internalType": "contract IAddressManager", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - } - ], - "name": "getPendingTransactionValue", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_addressManager", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - } - ], - "name": "isGhostContract", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - } - ], - "name": "leaderIdleness", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "saltAsAValidator", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "txExecutionHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "messagesAndOtherFieldsHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "otherExecutionFieldsHash", - "type": "bytes32" - }, - { - "internalType": "enum ITransactions.VoteType", - "name": "resultValue", - "type": "uint8" - }, - { - "components": [ - { - "internalType": "enum IMessages.MessageType", - "name": "messageType", - "type": "uint8" - }, - { + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "CallerNotMessages", + "type": "error" + }, + { + "inputs": [], + "name": "CanNotAppeal", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidDeploymentWithSalt", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidGhostContract", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidRevealLeaderData", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidVote", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { "internalType": "address", - "name": "recipient", + "name": "owner", "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "bool", - "name": "onAcceptance", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "saltNonce", - "type": "uint256" - } - ], - "internalType": "struct IMessages.SubmittedMessage[]", - "name": "messages", - "type": "tuple[]" - } - ], - "internalType": "struct IConsensusMainWithFees.LeaderRevealVoteParams", - "name": "leaderRevealVoteParams", - "type": "tuple" - } - ], - "name": "leaderRevealVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pendingOwner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - } - ], - "name": "processIdleness", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_txExecutionHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_processingBlock", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_operator", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_eqBlocksOutputs", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "_vrfProof", - "type": "bytes" - } - ], - "name": "proposeReceipt", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "ghost", - "type": "address" - } - ], - "name": "registerGhostContract", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_tribunalIndex", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "_voteHash", - "type": "bytes32" - }, - { - "internalType": "enum ITransactions.VoteType", - "name": "_voteType", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "_otherExecutionFieldsHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "revealTribunalAppealVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_voteHash", - "type": "bytes32" - }, - { - "internalType": "enum ITransactions.VoteType", - "name": "_voteType", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "_otherExecutionFieldsHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_validatorIndex", - "type": "uint256" - } - ], - "name": "revealVote", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_addressManager", - "type": "address" - } - ], - "name": "setAddressManager", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - } - ], - "name": "submitAppeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "leaderTimeoutFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "validatorsTimeoutFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "appealRounds", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "rollupStorageFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "rollupGenVMFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalMessageFees", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "rotations", - "type": "uint256[]" - } - ], - "internalType": "struct IFeeManager.FeesDistribution", - "name": "_feesDistribution", - "type": "tuple" - } - ], - "name": "topUpAndSubmitAppeal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "leaderTimeoutFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "validatorsTimeoutFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "appealRounds", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "rollupStorageFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "rollupGenVMFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalMessageFees", - "type": "uint256" - }, - { - "internalType": "uint256[]", - "name": "rotations", - "type": "uint256[]" - } - ], - "internalType": "struct IFeeManager.FeesDistribution", - "name": "_feesDistribution", - "type": "tuple" - } - ], - "name": "topUpFees", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - bytecode: "", -}; - -const CONSENSUS_DATA_CONTRACT = { - address: "0x0D9d1d74d72Fa5eB94bcf746C8FCcb312a722c9B" as Address, - abi: [ - { - "inputs": [], - "name": "AccessControlBadConfirmation", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "neededRole", - "type": "bytes32" - } - ], - "name": "AccessControlUnauthorizedAccount", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidInitialization", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "OwnableInvalidOwner", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "OwnableUnauthorizedAccount", - "type": "error" - }, - { - "inputs": [], - "name": "ReentrancyGuardReentrantCall", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferStarted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "acceptOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "addressManager", - "outputs": [ - { - "internalType": "contract IAddressManager", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_currentTimestamp", - "type": "uint256" - } - ], - "name": "canFinalize", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "name": "getLatestAcceptedTransaction", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "currentTimestamp", - "type": "uint256" - }, - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialRotations", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "txSlot", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "createdTimestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lastVoteTimestamp", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "randomSeed", - "type": "bytes32" - }, - { - "internalType": "enum ITransactions.ResultType", - "name": "result", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "txExecutionHash", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "txCalldata", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "eqBlocksOutputs", - "type": "bytes" - }, - { - "components": [ - { - "internalType": "enum IMessages.MessageType", - "name": "messageType", + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "oldActivator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newActivator", + "type": "address" + } + ], + "name": "ActivatorReplaced", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "addressManager", + "type": "address" + } + ], + "name": "AddressManagerSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "enum ITransactions.TransactionStatus", + "name": "newStatus", "type": "uint8" - }, - { + } + ], + "name": "AllVotesCommitted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": true, "internalType": "address", - "name": "recipient", + "name": "appellant", "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "bool", - "name": "onAcceptance", - "type": "bool" - }, - { + }, + { + "indexed": false, "internalType": "uint256", - "name": "saltNonce", + "name": "bond", "type": "uint256" - } - ], - "internalType": "struct IMessages.SubmittedMessage[]", - "name": "messages", - "type": "tuple[]" - }, - { - "internalType": "enum IQueues.QueueType", - "name": "queueType", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "queuePosition", - "type": "uint256" - }, - { - "internalType": "address", - "name": "activator", - "type": "address" - }, - { - "internalType": "address", - "name": "lastLeader", - "type": "address" - }, - { - "internalType": "enum ITransactions.TransactionStatus", - "name": "status", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "activationBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "processingBlock", - "type": "uint256" - }, - { + }, + { + "indexed": false, + "internalType": "address[]", + "name": "validators", + "type": "address[]" + } + ], + "name": "AppealStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, "internalType": "uint256", - "name": "proposalBlock", + "name": "attempted", "type": "uint256" - } - ], - "internalType": "struct ITransactions.ReadStateBlockRange", - "name": "readStateBlockRange", - "type": "tuple" - }, - { - "internalType": "uint256", - "name": "numOfRounds", - "type": "uint256" - }, - { - "components": [ - { + }, + { + "indexed": false, "internalType": "uint256", - "name": "round", + "name": "succeeded", "type": "uint256" - }, - { + }, + { + "indexed": false, "internalType": "uint256", - "name": "leaderIndex", + "name": "failed", "type": "uint256" - }, - { + } + ], + "name": "BatchFinalizationCompleted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": false, "internalType": "uint256", - "name": "votesCommitted", + "name": "txSlot", "type": "uint256" - }, - { + } + ], + "name": "CreatedTransaction", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "activator", + "type": "address" + } + ], + "name": "InternalMessageProcessed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "oldLeader", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newLeader", + "type": "address" + } + ], + "name": "LeaderIdlenessProcessed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "activator", + "type": "address" + } + ], + "name": "NewTransaction", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } + ], + "name": "ProcessIdlenessAccepted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } + ], + "name": "TransactionAccepted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "leader", + "type": "address" + } + ], + "name": "TransactionActivated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "cancelledBy", + "type": "address" + } + ], + "name": "TransactionCancelled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } + ], + "name": "TransactionFinalizationFailed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } + ], + "name": "TransactionFinalized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } + ], + "name": "TransactionLeaderRevealed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "newLeader", + "type": "address" + } + ], + "name": "TransactionLeaderRotated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } + ], + "name": "TransactionLeaderTimeout", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32[]", + "name": "txIds", + "type": "bytes32[]" + } + ], + "name": "TransactionNeedsRecomputation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "validators", + "type": "address[]" + } + ], + "name": "TransactionReceiptProposed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } + ], + "name": "TransactionUndetermined", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": false, "internalType": "uint256", - "name": "votesRevealed", + "name": "tribunalIndex", "type": "uint256" - }, - { + }, + { + "indexed": true, + "internalType": "address", + "name": "validator", + "type": "address" + } + ], + "name": "TribunalAppealVoteCommitted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": false, "internalType": "uint256", - "name": "appealBond", + "name": "tribunalIndex", "type": "uint256" - }, - { + }, + { + "indexed": true, + "internalType": "address", + "name": "validator", + "type": "address" + }, + { + "indexed": false, + "internalType": "enum ITransactions.VoteType", + "name": "voteType", + "type": "uint8" + } + ], + "name": "TribunalAppealVoteRevealed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "oldValidator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newValidator", + "type": "address" + }, + { + "indexed": false, "internalType": "uint256", - "name": "rotationsLeft", + "name": "validatorIndex", "type": "uint256" - }, - { - "internalType": "enum ITransactions.ResultType", - "name": "result", - "type": "uint8" - }, - { - "internalType": "address[]", - "name": "roundValidators", - "type": "address[]" - }, - { - "internalType": "enum ITransactions.VoteType[]", - "name": "validatorVotes", - "type": "uint8[]" - }, - { - "internalType": "bytes32[]", - "name": "validatorVotesHash", - "type": "bytes32[]" - }, - { - "internalType": "bytes32[]", - "name": "validatorResultHash", - "type": "bytes32[]" - } - ], - "internalType": "struct ITransactions.RoundData", - "name": "lastRound", - "type": "tuple" - }, - { - "internalType": "address[]", - "name": "consumedValidators", - "type": "address[]" - } - ], - "internalType": "struct ConsensusData.TransactionData", - "name": "inputData", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "startIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pageSize", - "type": "uint256" - } - ], - "name": "getLatestAcceptedTransactions", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "currentTimestamp", - "type": "uint256" - }, - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialRotations", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "txSlot", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "createdTimestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lastVoteTimestamp", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "randomSeed", - "type": "bytes32" - }, - { - "internalType": "enum ITransactions.ResultType", - "name": "result", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "txExecutionHash", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "txCalldata", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "eqBlocksOutputs", - "type": "bytes" - }, - { - "components": [ - { - "internalType": "enum IMessages.MessageType", - "name": "messageType", - "type": "uint8" - }, - { + } + ], + "name": "ValidatorReplaced", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": true, "internalType": "address", "name": "recipient", "type": "address" - }, - { + }, + { + "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { + } + ], + "name": "ValueWithdrawalFailed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "validator", + "type": "address" + }, + { + "indexed": false, "internalType": "bool", - "name": "onAcceptance", + "name": "isLastVote", "type": "bool" - }, - { - "internalType": "uint256", - "name": "saltNonce", - "type": "uint256" - } - ], - "internalType": "struct IMessages.SubmittedMessage[]", - "name": "messages", - "type": "tuple[]" - }, - { - "internalType": "enum IQueues.QueueType", - "name": "queueType", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "queuePosition", - "type": "uint256" - }, - { - "internalType": "address", - "name": "activator", - "type": "address" - }, - { - "internalType": "address", - "name": "lastLeader", - "type": "address" - }, - { - "internalType": "enum ITransactions.TransactionStatus", - "name": "status", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "activationBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "processingBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "proposalBlock", - "type": "uint256" - } - ], - "internalType": "struct ITransactions.ReadStateBlockRange", - "name": "readStateBlockRange", - "type": "tuple" - }, - { - "internalType": "uint256", - "name": "numOfRounds", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "round", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "leaderIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "votesCommitted", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "votesRevealed", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "appealBond", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "rotationsLeft", - "type": "uint256" - }, - { + } + ], + "name": "VoteCommitted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "validator", + "type": "address" + }, + { + "indexed": false, + "internalType": "enum ITransactions.VoteType", + "name": "voteType", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isLastVote", + "type": "bool" + }, + { + "indexed": false, "internalType": "enum ITransactions.ResultType", "name": "result", "type": "uint8" - }, - { - "internalType": "address[]", - "name": "roundValidators", - "type": "address[]" - }, - { - "internalType": "enum ITransactions.VoteType[]", - "name": "validatorVotes", - "type": "uint8[]" - }, - { - "internalType": "bytes32[]", - "name": "validatorVotesHash", - "type": "bytes32[]" - }, - { - "internalType": "bytes32[]", - "name": "validatorResultHash", - "type": "bytes32[]" - } - ], - "internalType": "struct ITransactions.RoundData", - "name": "lastRound", - "type": "tuple" - }, - { - "internalType": "address[]", - "name": "consumedValidators", - "type": "address[]" - } - ], - "internalType": "struct ConsensusData.TransactionData[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "name": "getLatestAcceptedTxCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "name": "getLatestFinalizedTransaction", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "currentTimestamp", - "type": "uint256" - }, - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialRotations", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "txSlot", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "createdTimestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lastVoteTimestamp", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "randomSeed", - "type": "bytes32" - }, - { - "internalType": "enum ITransactions.ResultType", - "name": "result", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "txExecutionHash", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "txCalldata", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "eqBlocksOutputs", - "type": "bytes" - }, - { - "components": [ - { - "internalType": "enum IMessages.MessageType", - "name": "messageType", - "type": "uint8" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { + } + ], + "name": "VoteRevealed", + "type": "event" + }, + { + "inputs": [], + "name": "EVENTS_BATCH_SIZE", + "outputs": [ + { "internalType": "uint256", - "name": "value", + "name": "", "type": "uint256" - }, - { + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "VERSION", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { "internalType": "bytes", - "name": "data", + "name": "_vrfProof", "type": "bytes" - }, - { - "internalType": "bool", - "name": "onAcceptance", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "saltNonce", - "type": "uint256" - } - ], - "internalType": "struct IMessages.SubmittedMessage[]", - "name": "messages", - "type": "tuple[]" - }, - { - "internalType": "enum IQueues.QueueType", - "name": "queueType", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "queuePosition", - "type": "uint256" - }, - { - "internalType": "address", - "name": "activator", - "type": "address" - }, - { - "internalType": "address", - "name": "lastLeader", - "type": "address" - }, - { - "internalType": "enum ITransactions.TransactionStatus", - "name": "status", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "components": [ - { + } + ], + "name": "activateTransaction", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_sender", + "type": "address" + }, + { + "internalType": "address", + "name": "_recipient", + "type": "address" + }, + { "internalType": "uint256", - "name": "activationBlock", + "name": "_numOfInitialValidators", "type": "uint256" - }, - { + }, + { "internalType": "uint256", - "name": "processingBlock", + "name": "_maxRotations", "type": "uint256" - }, - { + }, + { + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" + }, + { "internalType": "uint256", - "name": "proposalBlock", + "name": "_validUntil", "type": "uint256" - } - ], - "internalType": "struct ITransactions.ReadStateBlockRange", - "name": "readStateBlockRange", - "type": "tuple" - }, - { - "internalType": "uint256", - "name": "numOfRounds", - "type": "uint256" - }, - { - "components": [ - { + } + ], + "name": "addTransaction", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "addressManager", + "outputs": [ + { + "internalType": "contract IAddressManager", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } + ], + "name": "cancelTransaction", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + }, + { "internalType": "uint256", - "name": "round", + "name": "_tribunalIndex", "type": "uint256" - }, - { + }, + { + "internalType": "bytes32", + "name": "_commitHash", + "type": "bytes32" + } + ], + "name": "commitTribunalAppealVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_commitHash", + "type": "bytes32" + }, + { "internalType": "uint256", - "name": "leaderIndex", + "name": "_validatorIndex", "type": "uint256" - }, - { + } + ], + "name": "commitVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_sender", + "type": "address" + }, + { "internalType": "uint256", - "name": "votesCommitted", + "name": "_numOfInitialValidators", "type": "uint256" - }, - { + }, + { "internalType": "uint256", - "name": "votesRevealed", + "name": "_maxRotations", "type": "uint256" - }, - { + }, + { + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" + }, + { "internalType": "uint256", - "name": "appealBond", + "name": "_saltNonce", "type": "uint256" - }, - { + }, + { "internalType": "uint256", - "name": "rotationsLeft", + "name": "_validUntil", "type": "uint256" - }, - { - "internalType": "enum ITransactions.ResultType", - "name": "result", - "type": "uint8" - }, - { - "internalType": "address[]", - "name": "roundValidators", - "type": "address[]" - }, - { - "internalType": "enum ITransactions.VoteType[]", - "name": "validatorVotes", - "type": "uint8[]" - }, - { - "internalType": "bytes32[]", - "name": "validatorVotesHash", - "type": "bytes32[]" - }, - { - "internalType": "bytes32[]", - "name": "validatorResultHash", - "type": "bytes32[]" - } - ], - "internalType": "struct ITransactions.RoundData", - "name": "lastRound", - "type": "tuple" - }, - { - "internalType": "address[]", - "name": "consumedValidators", - "type": "address[]" - } - ], - "internalType": "struct ConsensusData.TransactionData", - "name": "inputData", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "startIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "pageSize", - "type": "uint256" - } - ], - "name": "getLatestFinalizedTransactions", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "currentTimestamp", - "type": "uint256" - }, - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialRotations", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "txSlot", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "createdTimestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lastVoteTimestamp", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "randomSeed", - "type": "bytes32" - }, - { - "internalType": "enum ITransactions.ResultType", - "name": "result", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "txExecutionHash", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "txCalldata", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "eqBlocksOutputs", - "type": "bytes" - }, - { - "components": [ - { - "internalType": "enum IMessages.MessageType", - "name": "messageType", - "type": "uint8" - }, - { + } + ], + "name": "deploySalted", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", - "name": "recipient", + "name": "_recipient", "type": "address" - }, - { + }, + { "internalType": "uint256", - "name": "value", + "name": "_value", "type": "uint256" - }, - { + }, + { "internalType": "bytes", - "name": "data", + "name": "_data", "type": "bytes" - }, - { + } + ], + "name": "executeMessage", + "outputs": [ + { "internalType": "bool", - "name": "onAcceptance", + "name": "success", "type": "bool" - }, - { - "internalType": "uint256", - "name": "saltNonce", - "type": "uint256" - } - ], - "internalType": "struct IMessages.SubmittedMessage[]", - "name": "messages", - "type": "tuple[]" - }, - { - "internalType": "enum IQueues.QueueType", - "name": "queueType", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "queuePosition", - "type": "uint256" - }, - { - "internalType": "address", - "name": "activator", - "type": "address" - }, - { - "internalType": "address", - "name": "lastLeader", - "type": "address" - }, - { - "internalType": "enum ITransactions.TransactionStatus", - "name": "status", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "activationBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "processingBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "proposalBlock", - "type": "uint256" - } - ], - "internalType": "struct ITransactions.ReadStateBlockRange", - "name": "readStateBlockRange", - "type": "tuple" - }, - { - "internalType": "uint256", - "name": "numOfRounds", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "round", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "leaderIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "votesCommitted", - "type": "uint256" - }, - { + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32[]", + "name": "_txIds", + "type": "bytes32[]" + } + ], + "name": "finalizeIdlenessTxs", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } + ], + "name": "finalizeTransaction", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } + ], + "name": "flushExternalMessages", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getAddressManager", + "outputs": [ + { + "internalType": "contract IAddressManager", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + } + ], + "name": "getPendingTransactionValue", + "outputs": [ + { "internalType": "uint256", - "name": "votesRevealed", + "name": "", "type": "uint256" - }, - { + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_addressManager", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "isGhostContract", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } + ], + "name": "leaderIdleness", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "saltAsAValidator", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "messagesAndOtherFieldsHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "otherExecutionFieldsHash", + "type": "bytes32" + }, + { + "internalType": "enum ITransactions.VoteType", + "name": "resultValue", + "type": "uint8" + }, + { + "components": [ + { + "internalType": "enum IMessages.MessageType", + "name": "messageType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "onAcceptance", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + } + ], + "internalType": "struct IMessages.SubmittedMessage[]", + "name": "messages", + "type": "tuple[]" + } + ], + "internalType": "struct IConsensusMain.LeaderRevealVoteParams", + "name": "leaderRevealVoteParams", + "type": "tuple" + } + ], + "name": "leaderRevealVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } + ], + "name": "processIdleness", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_txExecutionHash", + "type": "bytes32" + }, + { "internalType": "uint256", - "name": "appealBond", + "name": "_processingBlock", "type": "uint256" - }, - { + }, + { + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_eqBlocksOutputs", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "_vrfProof", + "type": "bytes" + } + ], + "name": "proposeReceipt", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32[]", + "name": "_txIds", + "type": "bytes32[]" + } + ], + "name": "redButtonFinalize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "ghost", + "type": "address" + } + ], + "name": "registerGhostContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + }, + { "internalType": "uint256", - "name": "rotationsLeft", + "name": "_tribunalIndex", "type": "uint256" - }, - { - "internalType": "enum ITransactions.ResultType", - "name": "result", + }, + { + "internalType": "bytes32", + "name": "_voteHash", + "type": "bytes32" + }, + { + "internalType": "enum ITransactions.VoteType", + "name": "_voteType", "type": "uint8" - }, - { - "internalType": "address[]", - "name": "roundValidators", - "type": "address[]" - }, - { - "internalType": "enum ITransactions.VoteType[]", - "name": "validatorVotes", - "type": "uint8[]" - }, - { - "internalType": "bytes32[]", - "name": "validatorVotesHash", - "type": "bytes32[]" - }, - { - "internalType": "bytes32[]", - "name": "validatorResultHash", - "type": "bytes32[]" - } - ], - "internalType": "struct ITransactions.RoundData", - "name": "lastRound", - "type": "tuple" - }, - { - "internalType": "address[]", - "name": "consumedValidators", - "type": "address[]" - } - ], - "internalType": "struct ConsensusData.TransactionData[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - } - ], - "name": "getLatestFinalizedTxCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - } - ], - "name": "getTransactionAllData", - "outputs": [ - { - "components": [ - { - "internalType": "enum ITransactions.ResultType", - "name": "result", - "type": "uint8" - }, - { - "internalType": "enum ITransactions.VoteType", - "name": "txExecutionResult", - "type": "uint8" - }, - { - "internalType": "enum ITransactions.TransactionStatus", - "name": "previousStatus", - "type": "uint8" - }, - { - "internalType": "enum ITransactions.TransactionStatus", - "name": "status", - "type": "uint8" - }, - { - "internalType": "address", - "name": "txOrigin", - "type": "address" - }, - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "address", - "name": "activator", - "type": "address" - }, - { - "internalType": "uint256", - "name": "txSlot", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "initialRotations", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "numOfInitialValidators", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "epoch", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "id", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "randomSeed", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "txExecutionHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "resultHash", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "txCalldata", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "eqBlocksOutputs", - "type": "bytes" - }, - { - "components": [ - { + }, + { + "internalType": "bytes32", + "name": "_otherExecutionFieldsHash", + "type": "bytes32" + }, + { "internalType": "uint256", - "name": "activationBlock", + "name": "_nonce", "type": "uint256" - }, - { + } + ], + "name": "revealTribunalAppealVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_voteHash", + "type": "bytes32" + }, + { + "internalType": "enum ITransactions.VoteType", + "name": "_voteType", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "_otherExecutionFieldsHash", + "type": "bytes32" + }, + { "internalType": "uint256", - "name": "processingBlock", + "name": "_nonce", "type": "uint256" - }, - { + }, + { "internalType": "uint256", - "name": "proposalBlock", + "name": "_validatorIndex", "type": "uint256" - } - ], - "internalType": "struct ITransactions.ReadStateBlockRange[]", - "name": "readStateBlockRanges", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "validUntil", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "internalType": "struct ITransactions.Transaction", - "name": "transaction", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "round", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "leaderIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "votesCommitted", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "votesRevealed", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "appealBond", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "rotationsLeft", - "type": "uint256" - }, - { - "internalType": "enum ITransactions.ResultType", - "name": "result", - "type": "uint8" - }, - { - "internalType": "address[]", - "name": "roundValidators", - "type": "address[]" - }, - { - "internalType": "enum ITransactions.VoteType[]", - "name": "validatorVotes", - "type": "uint8[]" - }, - { - "internalType": "bytes32[]", - "name": "validatorVotesHash", - "type": "bytes32[]" - }, - { - "internalType": "bytes32[]", - "name": "validatorResultHash", - "type": "bytes32[]" - } - ], - "internalType": "struct ITransactions.RoundData[]", - "name": "roundsData", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_timestamp", - "type": "uint256" - } - ], - "name": "getTransactionData", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "currentTimestamp", - "type": "uint256" - }, - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "initialRotations", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "txSlot", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "createdTimestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "lastVoteTimestamp", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "randomSeed", - "type": "bytes32" - }, - { - "internalType": "enum ITransactions.ResultType", - "name": "result", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "txExecutionHash", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "txCalldata", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "eqBlocksOutputs", - "type": "bytes" - }, - { - "components": [ - { - "internalType": "enum IMessages.MessageType", - "name": "messageType", - "type": "uint8" - }, - { + } + ], + "name": "revealVote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", - "name": "recipient", + "name": "_addressManager", + "type": "address" + } + ], + "name": "setAddressManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } + ], + "name": "submitAppeal", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + bytecode: "", +}; + +const CONSENSUS_DATA_CONTRACT = { + address: "0x0D9d1d74d72Fa5eB94bcf746C8FCcb312a722c9B" as Address, + abi: [ + { + "inputs": [], + "name": "AccessControlBadConfirmation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "neededRole", + "type": "bytes32" + } + ], + "name": "AccessControlUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "ReentrancyGuardReentrantCall", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", "type": "address" - }, - { + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "addressManager", + "outputs": [ + { + "internalType": "contract IAddressManager", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + }, + { "internalType": "uint256", - "name": "value", + "name": "_currentTimestamp", "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { + } + ], + "name": "canFinalize", + "outputs": [ + { "internalType": "bool", - "name": "onAcceptance", + "name": "", "type": "bool" - }, - { + }, + { "internalType": "uint256", - "name": "saltNonce", + "name": "", "type": "uint256" - } - ], - "internalType": "struct IMessages.SubmittedMessage[]", - "name": "messages", - "type": "tuple[]" - }, - { - "internalType": "enum IQueues.QueueType", - "name": "queueType", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "queuePosition", - "type": "uint256" - }, - { - "internalType": "address", - "name": "activator", - "type": "address" - }, - { - "internalType": "address", - "name": "lastLeader", - "type": "address" - }, - { - "internalType": "enum ITransactions.TransactionStatus", - "name": "status", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "txId", - "type": "bytes32" - }, - { - "components": [ - { + }, + { "internalType": "uint256", - "name": "activationBlock", + "name": "", "type": "uint256" - }, - { + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "getLatestAcceptedTransaction", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" + }, + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialRotations", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "createdTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastVoteTimestamp", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "randomSeed", + "type": "bytes32" + }, + { + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "txCalldata", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "eqBlocksOutputs", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum IMessages.MessageType", + "name": "messageType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "onAcceptance", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + } + ], + "internalType": "struct IMessages.SubmittedMessage[]", + "name": "messages", + "type": "tuple[]" + }, + { + "internalType": "enum IQueues.QueueType", + "name": "queueType", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "queuePosition", + "type": "uint256" + }, + { + "internalType": "address", + "name": "activator", + "type": "address" + }, + { + "internalType": "address", + "name": "lastLeader", + "type": "address" + }, + { + "internalType": "enum ITransactions.TransactionStatus", + "name": "status", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "activationBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "processingBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposalBlock", + "type": "uint256" + } + ], + "internalType": "struct ITransactions.ReadStateBlockRange", + "name": "readStateBlockRange", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "numOfRounds", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "round", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "leaderIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "votesCommitted", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "votesRevealed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "appealBond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rotationsLeft", + "type": "uint256" + }, + { + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" + }, + { + "internalType": "address[]", + "name": "roundValidators", + "type": "address[]" + }, + { + "internalType": "enum ITransactions.VoteType[]", + "name": "validatorVotes", + "type": "uint8[]" + }, + { + "internalType": "bytes32[]", + "name": "validatorVotesHash", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "validatorResultHash", + "type": "bytes32[]" + } + ], + "internalType": "struct ITransactions.RoundData", + "name": "lastRound", + "type": "tuple" + }, + { + "internalType": "address[]", + "name": "consumedValidators", + "type": "address[]" + } + ], + "internalType": "struct ConsensusData.TransactionData", + "name": "inputData", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { "internalType": "uint256", - "name": "processingBlock", + "name": "startIndex", "type": "uint256" - }, - { + }, + { "internalType": "uint256", - "name": "proposalBlock", + "name": "pageSize", "type": "uint256" - } - ], - "internalType": "struct ITransactions.ReadStateBlockRange", - "name": "readStateBlockRange", - "type": "tuple" - }, - { - "internalType": "uint256", - "name": "numOfRounds", - "type": "uint256" - }, - { - "components": [ - { + } + ], + "name": "getLatestAcceptedTransactions", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" + }, + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialRotations", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "createdTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastVoteTimestamp", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "randomSeed", + "type": "bytes32" + }, + { + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "txCalldata", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "eqBlocksOutputs", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum IMessages.MessageType", + "name": "messageType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "onAcceptance", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + } + ], + "internalType": "struct IMessages.SubmittedMessage[]", + "name": "messages", + "type": "tuple[]" + }, + { + "internalType": "enum IQueues.QueueType", + "name": "queueType", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "queuePosition", + "type": "uint256" + }, + { + "internalType": "address", + "name": "activator", + "type": "address" + }, + { + "internalType": "address", + "name": "lastLeader", + "type": "address" + }, + { + "internalType": "enum ITransactions.TransactionStatus", + "name": "status", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "activationBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "processingBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposalBlock", + "type": "uint256" + } + ], + "internalType": "struct ITransactions.ReadStateBlockRange", + "name": "readStateBlockRange", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "numOfRounds", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "round", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "leaderIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "votesCommitted", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "votesRevealed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "appealBond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rotationsLeft", + "type": "uint256" + }, + { + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" + }, + { + "internalType": "address[]", + "name": "roundValidators", + "type": "address[]" + }, + { + "internalType": "enum ITransactions.VoteType[]", + "name": "validatorVotes", + "type": "uint8[]" + }, + { + "internalType": "bytes32[]", + "name": "validatorVotesHash", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "validatorResultHash", + "type": "bytes32[]" + } + ], + "internalType": "struct ITransactions.RoundData", + "name": "lastRound", + "type": "tuple" + }, + { + "internalType": "address[]", + "name": "consumedValidators", + "type": "address[]" + } + ], + "internalType": "struct ConsensusData.TransactionData[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "getLatestAcceptedTxCount", + "outputs": [ + { "internalType": "uint256", - "name": "round", + "name": "", "type": "uint256" - }, - { + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "getLatestFinalizedTransaction", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" + }, + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialRotations", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "createdTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastVoteTimestamp", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "randomSeed", + "type": "bytes32" + }, + { + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "txCalldata", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "eqBlocksOutputs", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum IMessages.MessageType", + "name": "messageType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "onAcceptance", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + } + ], + "internalType": "struct IMessages.SubmittedMessage[]", + "name": "messages", + "type": "tuple[]" + }, + { + "internalType": "enum IQueues.QueueType", + "name": "queueType", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "queuePosition", + "type": "uint256" + }, + { + "internalType": "address", + "name": "activator", + "type": "address" + }, + { + "internalType": "address", + "name": "lastLeader", + "type": "address" + }, + { + "internalType": "enum ITransactions.TransactionStatus", + "name": "status", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "activationBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "processingBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposalBlock", + "type": "uint256" + } + ], + "internalType": "struct ITransactions.ReadStateBlockRange", + "name": "readStateBlockRange", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "numOfRounds", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "round", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "leaderIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "votesCommitted", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "votesRevealed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "appealBond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rotationsLeft", + "type": "uint256" + }, + { + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" + }, + { + "internalType": "address[]", + "name": "roundValidators", + "type": "address[]" + }, + { + "internalType": "enum ITransactions.VoteType[]", + "name": "validatorVotes", + "type": "uint8[]" + }, + { + "internalType": "bytes32[]", + "name": "validatorVotesHash", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "validatorResultHash", + "type": "bytes32[]" + } + ], + "internalType": "struct ITransactions.RoundData", + "name": "lastRound", + "type": "tuple" + }, + { + "internalType": "address[]", + "name": "consumedValidators", + "type": "address[]" + } + ], + "internalType": "struct ConsensusData.TransactionData", + "name": "inputData", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { "internalType": "uint256", - "name": "leaderIndex", + "name": "startIndex", "type": "uint256" - }, - { + }, + { "internalType": "uint256", - "name": "votesCommitted", + "name": "pageSize", "type": "uint256" - }, - { + } + ], + "name": "getLatestFinalizedTransactions", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" + }, + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialRotations", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "createdTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastVoteTimestamp", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "randomSeed", + "type": "bytes32" + }, + { + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "txCalldata", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "eqBlocksOutputs", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum IMessages.MessageType", + "name": "messageType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "onAcceptance", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + } + ], + "internalType": "struct IMessages.SubmittedMessage[]", + "name": "messages", + "type": "tuple[]" + }, + { + "internalType": "enum IQueues.QueueType", + "name": "queueType", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "queuePosition", + "type": "uint256" + }, + { + "internalType": "address", + "name": "activator", + "type": "address" + }, + { + "internalType": "address", + "name": "lastLeader", + "type": "address" + }, + { + "internalType": "enum ITransactions.TransactionStatus", + "name": "status", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "activationBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "processingBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposalBlock", + "type": "uint256" + } + ], + "internalType": "struct ITransactions.ReadStateBlockRange", + "name": "readStateBlockRange", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "numOfRounds", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "round", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "leaderIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "votesCommitted", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "votesRevealed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "appealBond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rotationsLeft", + "type": "uint256" + }, + { + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" + }, + { + "internalType": "address[]", + "name": "roundValidators", + "type": "address[]" + }, + { + "internalType": "enum ITransactions.VoteType[]", + "name": "validatorVotes", + "type": "uint8[]" + }, + { + "internalType": "bytes32[]", + "name": "validatorVotesHash", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "validatorResultHash", + "type": "bytes32[]" + } + ], + "internalType": "struct ITransactions.RoundData", + "name": "lastRound", + "type": "tuple" + }, + { + "internalType": "address[]", + "name": "consumedValidators", + "type": "address[]" + } + ], + "internalType": "struct ConsensusData.TransactionData[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "getLatestFinalizedTxCount", + "outputs": [ + { "internalType": "uint256", - "name": "votesRevealed", + "name": "", "type": "uint256" - }, - { + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } + ], + "name": "getTransactionAllData", + "outputs": [ + { + "components": [ + { + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" + }, + { + "internalType": "enum ITransactions.VoteType", + "name": "txExecutionResult", + "type": "uint8" + }, + { + "internalType": "enum ITransactions.TransactionStatus", + "name": "previousStatus", + "type": "uint8" + }, + { + "internalType": "enum ITransactions.TransactionStatus", + "name": "status", + "type": "uint8" + }, + { + "internalType": "address", + "name": "txOrigin", + "type": "address" + }, + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "address", + "name": "activator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "initialRotations", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "numOfInitialValidators", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "randomSeed", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "resultHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "txCalldata", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "eqBlocksOutputs", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "activationBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "processingBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposalBlock", + "type": "uint256" + } + ], + "internalType": "struct ITransactions.ReadStateBlockRange[]", + "name": "readStateBlockRanges", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "validUntil", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct ITransactions.Transaction", + "name": "transaction", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "round", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "leaderIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "votesCommitted", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "votesRevealed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "appealBond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rotationsLeft", + "type": "uint256" + }, + { + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" + }, + { + "internalType": "address[]", + "name": "roundValidators", + "type": "address[]" + }, + { + "internalType": "enum ITransactions.VoteType[]", + "name": "validatorVotes", + "type": "uint8[]" + }, + { + "internalType": "bytes32[]", + "name": "validatorVotesHash", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "validatorResultHash", + "type": "bytes32[]" + } + ], + "internalType": "struct ITransactions.RoundData[]", + "name": "roundsData", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + }, + { "internalType": "uint256", - "name": "appealBond", + "name": "_timestamp", "type": "uint256" - }, - { + } + ], + "name": "getTransactionData", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" + }, + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialRotations", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "txSlot", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "createdTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastVoteTimestamp", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "randomSeed", + "type": "bytes32" + }, + { + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "txExecutionHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "txCalldata", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "eqBlocksOutputs", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "enum IMessages.MessageType", + "name": "messageType", + "type": "uint8" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "onAcceptance", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "saltNonce", + "type": "uint256" + } + ], + "internalType": "struct IMessages.SubmittedMessage[]", + "name": "messages", + "type": "tuple[]" + }, + { + "internalType": "enum IQueues.QueueType", + "name": "queueType", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "queuePosition", + "type": "uint256" + }, + { + "internalType": "address", + "name": "activator", + "type": "address" + }, + { + "internalType": "address", + "name": "lastLeader", + "type": "address" + }, + { + "internalType": "enum ITransactions.TransactionStatus", + "name": "status", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "txId", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "activationBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "processingBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "proposalBlock", + "type": "uint256" + } + ], + "internalType": "struct ITransactions.ReadStateBlockRange", + "name": "readStateBlockRange", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "numOfRounds", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "round", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "leaderIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "votesCommitted", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "votesRevealed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "appealBond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rotationsLeft", + "type": "uint256" + }, + { + "internalType": "enum ITransactions.ResultType", + "name": "result", + "type": "uint8" + }, + { + "internalType": "address[]", + "name": "roundValidators", + "type": "address[]" + }, + { + "internalType": "enum ITransactions.VoteType[]", + "name": "validatorVotes", + "type": "uint8[]" + }, + { + "internalType": "bytes32[]", + "name": "validatorVotesHash", + "type": "bytes32[]" + }, + { + "internalType": "bytes32[]", + "name": "validatorResultHash", + "type": "bytes32[]" + } + ], + "internalType": "struct ITransactions.RoundData", + "name": "lastRound", + "type": "tuple" + }, + { + "internalType": "address[]", + "name": "consumedValidators", + "type": "address[]" + } + ], + "internalType": "struct ConsensusData.TransactionData", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + }, + { "internalType": "uint256", - "name": "rotationsLeft", + "name": "_timestamp", "type": "uint256" - }, - { - "internalType": "enum ITransactions.ResultType", - "name": "result", + } + ], + "name": "getTransactionStatus", + "outputs": [ + { + "internalType": "enum ITransactions.TransactionStatus", + "name": "", "type": "uint8" - }, - { + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_txId", + "type": "bytes32" + } + ], + "name": "getValidatorsForLastRound", + "outputs": [ + { "internalType": "address[]", - "name": "roundValidators", + "name": "validators", "type": "address[]" - }, - { - "internalType": "enum ITransactions.VoteType[]", - "name": "validatorVotes", - "type": "uint8[]" - }, - { - "internalType": "bytes32[]", - "name": "validatorVotesHash", - "type": "bytes32[]" - }, - { - "internalType": "bytes32[]", - "name": "validatorResultHash", - "type": "bytes32[]" - } - ], - "internalType": "struct ITransactions.RoundData", - "name": "lastRound", - "type": "tuple" - }, - { - "internalType": "address[]", - "name": "consumedValidators", - "type": "address[]" - } - ], - "internalType": "struct ConsensusData.TransactionData", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_timestamp", - "type": "uint256" - } - ], - "name": "getTransactionStatus", - "outputs": [ - { - "internalType": "enum ITransactions.TransactionStatus", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_txId", - "type": "bytes32" - } - ], - "name": "getValidatorsForLastRound", - "outputs": [ - { - "internalType": "address[]", - "name": "validators", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_addressManager", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pendingOwner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "callerConfirmation", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_addressManager", - "type": "address" - } - ], - "name": "setAddressManager", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_addressManager", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "callerConfirmation", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_addressManager", + "type": "address" + } + ], + "name": "setAddressManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } ], bytecode: "", }; From 6250c0252723fe1c1195ebc8baf6410c75925f1c Mon Sep 17 00:00:00 2001 From: Agustin Ramiro Diaz Date: Fri, 13 Feb 2026 10:03:37 -0300 Subject: [PATCH 12/15] fix: address CodeRabbit review comments - Add AppealStarted and TransactionFinalized events to mock ABI in subscription tests - Add missing subscribeToAppealStarted and subscribeToTransactionFinalized assertions in all subscription method tests - Default genCall missing status to INTERNAL_ERROR instead of SUCCESS to avoid masking errors Co-Authored-By: Claude Opus 4.6 --- src/contracts/actions.ts | 6 +++++- tests/genCall.test.ts | 2 +- tests/subscriptions.test.ts | 19 +++++++++++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/contracts/actions.ts b/src/contracts/actions.ts index e30a6ae..2efe8be 100644 --- a/src/contracts/actions.ts +++ b/src/contracts/actions.ts @@ -378,10 +378,14 @@ export const contractActions = (client: GenLayerClient, publicCli const dataStr = resp.data ?? ""; const prefixedData = dataStr.startsWith("0x") ? dataStr as `0x${string}` : `0x${dataStr}` as `0x${string}`; + if (!resp.status) { + console.warn("[genlayer-js] genCall response missing status field, defaulting to INTERNAL_ERROR"); + } + return { data: prefixedData, eqOutputs: resp.eqOutputs ?? [], - status: resp.status ?? {code: GenCallStatusCode.SUCCESS, message: "success"}, + status: resp.status ?? {code: GenCallStatusCode.INTERNAL_ERROR, message: "missing status from RPC response"}, stdout: resp.stdout ?? "", stderr: resp.stderr ?? "", logs: resp.logs ?? [], diff --git a/tests/genCall.test.ts b/tests/genCall.test.ts index 8bdf6a7..cdb9333 100644 --- a/tests/genCall.test.ts +++ b/tests/genCall.test.ts @@ -222,7 +222,7 @@ describe("genCall", () => { }); expect(result.data).toBe("0x"); - expect(result.status).toEqual({code: GenCallStatusCode.SUCCESS, message: "success"}); + expect(result.status).toEqual({code: GenCallStatusCode.INTERNAL_ERROR, message: "missing status from RPC response"}); expect(result.stdout).toBe(""); expect(result.stderr).toBe(""); expect(result.logs).toEqual([]); diff --git a/tests/subscriptions.test.ts b/tests/subscriptions.test.ts index 29d0ca6..8c6e5c9 100644 --- a/tests/subscriptions.test.ts +++ b/tests/subscriptions.test.ts @@ -77,6 +77,21 @@ function createMockClient(options: { type: "event", inputs: [{indexed: true, name: "tx_id", type: "bytes32"}], }, + { + name: "TransactionFinalized", + type: "event", + inputs: [{indexed: true, name: "txId", type: "bytes32"}], + }, + { + name: "AppealStarted", + type: "event", + inputs: [ + {indexed: true, name: "txId", type: "bytes32"}, + {indexed: true, name: "appellant", type: "address"}, + {indexed: false, name: "bond", type: "uint256"}, + {indexed: false, name: "validators", type: "address[]"}, + ], + }, ], bytecode: "", }; @@ -131,6 +146,8 @@ describe("Subscription Actions", () => { expect(() => actions.subscribeToTransactionActivated()).toThrow(WebSocketNotConfiguredError); expect(() => actions.subscribeToTransactionUndetermined()).toThrow(WebSocketNotConfiguredError); expect(() => actions.subscribeToTransactionLeaderTimeout()).toThrow(WebSocketNotConfiguredError); + expect(() => actions.subscribeToTransactionFinalized()).toThrow(WebSocketNotConfiguredError); + expect(() => actions.subscribeToAppealStarted()).toThrow(WebSocketNotConfiguredError); }); it("should not throw WebSocketNotConfiguredError when webSocket URL is provided", () => { @@ -205,6 +222,8 @@ describe("ConsensusEventStream interface", () => { expect(typeof actions.subscribeToTransactionActivated).toBe("function"); expect(typeof actions.subscribeToTransactionUndetermined).toBe("function"); expect(typeof actions.subscribeToTransactionLeaderTimeout).toBe("function"); + expect(typeof actions.subscribeToTransactionFinalized).toBe("function"); + expect(typeof actions.subscribeToAppealStarted).toBe("function"); }); }); From 5ac2be59d64d94e8d5246511e5d67ff404990b6f Mon Sep 17 00:00:00 2001 From: Agustin Ramiro Diaz Date: Fri, 13 Feb 2026 14:32:19 -0300 Subject: [PATCH 13/15] chore: more gas --- src/contracts/actions.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/contracts/actions.ts b/src/contracts/actions.ts index 2efe8be..f8ea1e9 100644 --- a/src/contracts/actions.ts +++ b/src/contracts/actions.ts @@ -603,6 +603,8 @@ const _sendTransaction = async ({ console.error("Gas estimation failed, using default 200_000:", err); estimatedGas = 200_000n; } + // Add 50% buffer to gas estimate to account for estimation inaccuracies + estimatedGas = (estimatedGas * 150n) / 100n; // For local accounts, build transaction request directly to avoid viem's // prepareTransactionRequest which calls eth_fillTransaction (unsupported by GenLayer RPC) From 58fd4bc897de1be44d85ec25100192c445645a97 Mon Sep 17 00:00:00 2001 From: Agustin Ramiro Diaz Date: Mon, 23 Feb 2026 10:54:18 -0300 Subject: [PATCH 14/15] fix: update tests for dynamic chain ABI encoding and gas buffer Remove obsolete V5/V6 dual ABI fallback tests (replaced by dynamic chain ABI approach), add WithFees (7-input) ABI test, fix gas expectations for 50% buffer, and remove dead V5/V6 constants. Co-Authored-By: Claude Opus 4.6 --- src/contracts/actions.ts | 50 -------- tests/contracts-actions.test.ts | 210 +++++++++++--------------------- 2 files changed, 71 insertions(+), 189 deletions(-) diff --git a/src/contracts/actions.ts b/src/contracts/actions.ts index f8ea1e9..2d48be4 100644 --- a/src/contracts/actions.ts +++ b/src/contracts/actions.ts @@ -405,56 +405,6 @@ const validateAccount = (Account?: Account): Account => { return Account; }; -const ADD_TRANSACTION_ABI_V5 = [ - { - type: "function", - name: "addTransaction", - stateMutability: "nonpayable", - inputs: [ - {name: "_sender", type: "address"}, - {name: "_recipient", type: "address"}, - {name: "_numOfInitialValidators", type: "uint256"}, - {name: "_maxRotations", type: "uint256"}, - {name: "_txData", type: "bytes"}, - ], - outputs: [], - }, -] as const; - -const ADD_TRANSACTION_ABI_V6 = [ - { - type: "function", - name: "addTransaction", - stateMutability: "nonpayable", - inputs: [ - {name: "_sender", type: "address"}, - {name: "_recipient", type: "address"}, - {name: "_numOfInitialValidators", type: "uint256"}, - {name: "_maxRotations", type: "uint256"}, - {name: "_txData", type: "bytes"}, - {name: "_validUntil", type: "uint256"}, - ], - outputs: [], - }, -] as const; - -const getAddTransactionInputCount = (abi: readonly unknown[] | undefined): number => { - if (!abi || !Array.isArray(abi)) { - return 0; - } - - const addTransactionFunction = abi.find(item => { - if (!item || typeof item !== "object") { - return false; - } - - const candidate = item as {type?: string; name?: string}; - return candidate.type === "function" && candidate.name === "addTransaction"; - }) as {inputs?: readonly unknown[]} | undefined; - - return Array.isArray(addTransactionFunction?.inputs) ? addTransactionFunction.inputs.length : 0; -}; - const _encodeAddTransactionData = ({ client, senderAccount, diff --git a/tests/contracts-actions.test.ts b/tests/contracts-actions.test.ts index c421269..1adabba 100644 --- a/tests/contracts-actions.test.ts +++ b/tests/contracts-actions.test.ts @@ -6,7 +6,7 @@ const MAIN_CONTRACT_ADDRESS = "0x0000000000000000000000000000000000000001"; const SENDER_ADDRESS = "0x0000000000000000000000000000000000000002"; const RECIPIENT_ADDRESS = "0x0000000000000000000000000000000000000003"; -const ADD_TRANSACTION_ABI_V5 = [ +const ADD_TRANSACTION_ABI_V6 = [ { type: "function", name: "addTransaction", @@ -17,12 +17,13 @@ const ADD_TRANSACTION_ABI_V5 = [ {name: "_numOfInitialValidators", type: "uint256"}, {name: "_maxRotations", type: "uint256"}, {name: "_txData", type: "bytes"}, + {name: "_validUntil", type: "uint256"}, ], outputs: [], }, ] as const; -const ADD_TRANSACTION_ABI_V6 = [ +const ADD_TRANSACTION_ABI_V7 = [ { type: "function", name: "addTransaction", @@ -33,24 +34,53 @@ const ADD_TRANSACTION_ABI_V6 = [ {name: "_numOfInitialValidators", type: "uint256"}, {name: "_maxRotations", type: "uint256"}, {name: "_txData", type: "bytes"}, + { + name: "_feesDistribution", + type: "tuple", + components: [ + {name: "leaderTimeoutFee", type: "uint256"}, + {name: "validatorsTimeoutFee", type: "uint256"}, + {name: "appealRounds", type: "uint256"}, + {name: "rollupStorageFee", type: "uint256"}, + {name: "rollupGenVMFee", type: "uint256"}, + {name: "totalMessageFees", type: "uint256"}, + {name: "rotations", type: "uint256[]"}, + ], + }, {name: "_validUntil", type: "uint256"}, ], outputs: [], }, ] as const; -const selectorForV5 = encodeFunctionData({ - abi: ADD_TRANSACTION_ABI_V5 as any, - functionName: "addTransaction", - args: [SENDER_ADDRESS, RECIPIENT_ADDRESS, 5, 3, "0x"], -}).slice(0, 10); - const selectorForV6 = encodeFunctionData({ abi: ADD_TRANSACTION_ABI_V6 as any, functionName: "addTransaction", args: [SENDER_ADDRESS, RECIPIENT_ADDRESS, 5, 3, "0x", 0n], }).slice(0, 10); +const selectorForV7 = encodeFunctionData({ + abi: ADD_TRANSACTION_ABI_V7 as any, + functionName: "addTransaction", + args: [ + SENDER_ADDRESS, + RECIPIENT_ADDRESS, + 5, + 3, + "0x", + { + leaderTimeoutFee: 0n, + validatorsTimeoutFee: 0n, + appealRounds: 0n, + rollupStorageFee: 0n, + rollupGenVMFee: 0n, + totalMessageFees: 0n, + rotations: [], + }, + 0n, + ], +}).slice(0, 10); + const setupWriteContractHarness = ({ initialAbi, signTransactionMock, @@ -94,23 +124,6 @@ const setupWriteContractHarness = ({ }; describe("contractActions addTransaction ABI compatibility", () => { - it("encodes addTransaction with 5 args when ABI has 5 inputs", async () => { - const {actions, estimateTransactionGas} = setupWriteContractHarness({ - initialAbi: ADD_TRANSACTION_ABI_V5, - }); - - await expect( - actions.writeContract({ - address: RECIPIENT_ADDRESS, - functionName: "ping", - value: 0n, - }), - ).rejects.toThrow("stop_after_encoding"); - - const encodedData = estimateTransactionGas.mock.calls[0][0].data as `0x${string}`; - expect(encodedData.slice(0, 10)).toBe(selectorForV5); - }); - it("encodes addTransaction with 6 args when ABI has 6 inputs", async () => { const {actions, estimateTransactionGas} = setupWriteContractHarness({ initialAbi: ADD_TRANSACTION_ABI_V6, @@ -128,14 +141,9 @@ describe("contractActions addTransaction ABI compatibility", () => { expect(encodedData.slice(0, 10)).toBe(selectorForV6); }); - it("retries with v6 signature when v5 signature fails with ABI mismatch", async () => { - const signTransaction = vi - .fn() - .mockRejectedValueOnce(new Error("Invalid pointer in tuple at location 128 in payload")) - .mockRejectedValueOnce(new Error("stop_after_retry")); + it("encodes addTransaction with 7 args when ABI has WithFees variant", async () => { const {actions, estimateTransactionGas} = setupWriteContractHarness({ - initialAbi: ADD_TRANSACTION_ABI_V5, - signTransactionMock: signTransaction, + initialAbi: ADD_TRANSACTION_ABI_V7, }); await expect( @@ -144,52 +152,20 @@ describe("contractActions addTransaction ABI compatibility", () => { functionName: "ping", value: 0n, }), - ).rejects.toThrow("stop_after_retry"); + ).rejects.toThrow("stop_after_encoding"); - expect(signTransaction).toHaveBeenCalledTimes(2); - const firstEncodedData = signTransaction.mock.calls[0][0].data as `0x${string}`; - const secondEncodedData = signTransaction.mock.calls[1][0].data as `0x${string}`; - expect(firstEncodedData.slice(0, 10)).toBe(selectorForV5); - expect(secondEncodedData.slice(0, 10)).toBe(selectorForV6); - expect(estimateTransactionGas).toHaveBeenCalledTimes(2); + const encodedData = estimateTransactionGas.mock.calls[0][0].data as `0x${string}`; + expect(encodedData.slice(0, 10)).toBe(selectorForV7); }); - it("retries when ABI mismatch details are on error.details (viem InternalRpcError shape)", async () => { - const signTransaction = vi - .fn() - .mockRejectedValueOnce({ - shortMessage: "An internal error was received.", - details: "Invalid pointer in tuple at location 128 in payload", - }) - .mockRejectedValueOnce(new Error("stop_after_retry")); - const {actions} = setupWriteContractHarness({ - initialAbi: ADD_TRANSACTION_ABI_V5, - signTransactionMock: signTransaction as any, + it("uses refreshed ABI from initializeConsensusSmartContract before write encoding", async () => { + const {actions, estimateTransactionGas, client} = setupWriteContractHarness({ + initialAbi: ADD_TRANSACTION_ABI_V6, }); - await expect( - actions.writeContract({ - address: RECIPIENT_ADDRESS, - functionName: "ping", - value: 0n, - }), - ).rejects.toThrow("stop_after_retry"); - - expect(signTransaction).toHaveBeenCalledTimes(2); - const firstEncodedData = signTransaction.mock.calls[0][0].data as `0x${string}`; - const secondEncodedData = signTransaction.mock.calls[1][0].data as `0x${string}`; - expect(firstEncodedData.slice(0, 10)).toBe(selectorForV5); - expect(secondEncodedData.slice(0, 10)).toBe(selectorForV6); - }); - - it("retries with v5 signature when v6 signature fails with ABI mismatch", async () => { - const signTransaction = vi - .fn() - .mockRejectedValueOnce(new Error("Invalid pointer in tuple at location 128 in payload")) - .mockRejectedValueOnce(new Error("stop_after_retry")); - const {actions, estimateTransactionGas} = setupWriteContractHarness({ - initialAbi: ADD_TRANSACTION_ABI_V6, - signTransactionMock: signTransaction, + // Simulate initializeConsensusSmartContract updating the ABI + client.initializeConsensusSmartContract.mockImplementation(async () => { + client.chain.consensusMainContract.abi = [...ADD_TRANSACTION_ABI_V7]; }); await expect( @@ -198,14 +174,11 @@ describe("contractActions addTransaction ABI compatibility", () => { functionName: "ping", value: 0n, }), - ).rejects.toThrow("stop_after_retry"); + ).rejects.toThrow("stop_after_encoding"); - expect(signTransaction).toHaveBeenCalledTimes(2); - const firstEncodedData = signTransaction.mock.calls[0][0].data as `0x${string}`; - const secondEncodedData = signTransaction.mock.calls[1][0].data as `0x${string}`; - expect(firstEncodedData.slice(0, 10)).toBe(selectorForV6); - expect(secondEncodedData.slice(0, 10)).toBe(selectorForV5); - expect(estimateTransactionGas).toHaveBeenCalledTimes(2); + const encodedData = estimateTransactionGas.mock.calls[0][0].data as `0x${string}`; + expect(encodedData.slice(0, 10)).toBe(selectorForV7); + expect(client.initializeConsensusSmartContract).toHaveBeenCalledTimes(1); }); it("uses direct eth_sendTransaction for non-local accounts without prepareTransactionRequest", async () => { @@ -257,11 +230,12 @@ describe("contractActions addTransaction ABI compatibility", () => { expect(sendTxCall).toBeDefined(); const sendTxParams = sendTxCall?.[0]?.params?.[0]; + // Gas is 21000 * 1.5 (50% buffer) = 31500 = 0x7b0c expect(sendTxParams).toMatchObject({ from: SENDER_ADDRESS, to: MAIN_CONTRACT_ADDRESS, value: "0x0", - gas: "0x5208", + gas: "0x7b0c", nonce: "0x0", type: "0x0", chainId: "0xeec7", @@ -269,66 +243,24 @@ describe("contractActions addTransaction ABI compatibility", () => { }); }); - it("retries alternate ABI for injected-wallet errors with nested invalid pointer details", async () => { - const sentPayloads: `0x${string}`[] = []; - const request = vi.fn().mockImplementation(async ({method, params}: {method: string; params?: any[]}) => { - if (method === "eth_gasPrice") { - return "0x1"; - } - - if (method === "eth_sendTransaction") { - const payload = params?.[0]; - sentPayloads.push(payload?.data); - - if (sentPayloads.length === 1) { - throw { - code: -32603, - message: "Internal JSON-RPC error.", - data: { - originalError: { - message: "Invalid pointer in tuple at location 128 in payload", - }, - }, - }; - } - - return "0x1234"; - } - - throw new Error(`Unexpected RPC method: ${method}`); + it("applies 50% gas buffer to estimated gas", async () => { + const signTransaction = vi.fn().mockRejectedValue(new Error("stop_after_gas")); + const {actions, estimateTransactionGas} = setupWriteContractHarness({ + initialAbi: ADD_TRANSACTION_ABI_V6, + signTransactionMock: signTransaction, }); - const client = { - chain: { - id: 61_127, - defaultNumberOfInitialValidators: 5, - defaultConsensusMaxRotations: 3, - consensusMainContract: { - address: MAIN_CONTRACT_ADDRESS, - abi: [...ADD_TRANSACTION_ABI_V5], - bytecode: "0x", - }, - }, - account: { - address: SENDER_ADDRESS, - type: "json-rpc", - }, - initializeConsensusSmartContract: vi.fn().mockResolvedValue(undefined), - getCurrentNonce: vi.fn().mockResolvedValue(0n), - estimateTransactionGas: vi.fn().mockResolvedValue(21_000n), - request, - }; - - const actions = contractActions(client as any, {} as any); - const txHash = await actions.writeContract({ - address: RECIPIENT_ADDRESS, - functionName: "ping", - value: 0n, - }); + await expect( + actions.writeContract({ + address: RECIPIENT_ADDRESS, + functionName: "ping", + value: 0n, + }), + ).rejects.toThrow("stop_after_gas"); - expect(txHash).toBe("0x1234"); - expect(sentPayloads).toHaveLength(2); - expect(sentPayloads[0].slice(0, 10)).toBe(selectorForV5); - expect(sentPayloads[1].slice(0, 10)).toBe(selectorForV6); + expect(estimateTransactionGas).toHaveBeenCalledTimes(1); + // The gas value passed to signTransaction should be 21000 * 1.5 = 31500 + const txRequest = signTransaction.mock.calls[0][0]; + expect(txRequest.gas).toBe(31_500n); }); }); From a5e0a08aa426a14a6c4c6069763c5fbdf923b8c3 Mon Sep 17 00:00:00 2001 From: Agustin Ramiro Diaz Date: Mon, 9 Mar 2026 10:15:47 -0300 Subject: [PATCH 15/15] fix: update tests to match rebase conflict resolutions - Update chains-actions test to check early-return instead of removed deprecation warning - Fix contracts-actions test to mutate ABI directly instead of expecting initializeConsensusSmartContract call --- tests/chains-actions.test.ts | 10 +++------- tests/contracts-actions.test.ts | 9 +++------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/tests/chains-actions.test.ts b/tests/chains-actions.test.ts index 2ba4399..c0e35e8 100644 --- a/tests/chains-actions.test.ts +++ b/tests/chains-actions.test.ts @@ -1,7 +1,7 @@ import {describe, expect, it, vi} from "vitest"; import {chainActions} from "../src/chains/actions"; -const makeClient = (chainId: number) => +const makeClient = (chainId: number, overrides: Record = {}) => ({ chain: { id: chainId, @@ -15,12 +15,12 @@ const makeClient = (chainId: number) => abi: [{type: "function", name: "addTransaction", inputs: [], outputs: []}], bytecode: "0x", }, + ...overrides, }, }) as any; describe("chainActions.initializeConsensusSmartContract", () => { - it("emits a deprecation warning and makes no network calls", async () => { - const warnSpy = vi.spyOn(console, "warn").mockImplementation(() => {}); + it("returns early without network calls when chain has static consensus contract", async () => { const fetchSpy = vi.spyOn(globalThis, "fetch"); const client = makeClient(1); @@ -28,12 +28,8 @@ describe("chainActions.initializeConsensusSmartContract", () => { await actions.initializeConsensusSmartContract(); - expect(warnSpy).toHaveBeenCalledWith( - expect.stringContaining("deprecated"), - ); expect(fetchSpy).not.toHaveBeenCalled(); - warnSpy.mockRestore(); fetchSpy.mockRestore(); }); }); diff --git a/tests/contracts-actions.test.ts b/tests/contracts-actions.test.ts index 1adabba..a6f0eaa 100644 --- a/tests/contracts-actions.test.ts +++ b/tests/contracts-actions.test.ts @@ -158,15 +158,13 @@ describe("contractActions addTransaction ABI compatibility", () => { expect(encodedData.slice(0, 10)).toBe(selectorForV7); }); - it("uses refreshed ABI from initializeConsensusSmartContract before write encoding", async () => { + it("uses current ABI at call time for encoding", async () => { const {actions, estimateTransactionGas, client} = setupWriteContractHarness({ initialAbi: ADD_TRANSACTION_ABI_V6, }); - // Simulate initializeConsensusSmartContract updating the ABI - client.initializeConsensusSmartContract.mockImplementation(async () => { - client.chain.consensusMainContract.abi = [...ADD_TRANSACTION_ABI_V7]; - }); + // Mutate the ABI on the client before calling writeContract + client.chain.consensusMainContract.abi = [...ADD_TRANSACTION_ABI_V7]; await expect( actions.writeContract({ @@ -178,7 +176,6 @@ describe("contractActions addTransaction ABI compatibility", () => { const encodedData = estimateTransactionGas.mock.calls[0][0].data as `0x${string}`; expect(encodedData.slice(0, 10)).toBe(selectorForV7); - expect(client.initializeConsensusSmartContract).toHaveBeenCalledTimes(1); }); it("uses direct eth_sendTransaction for non-local accounts without prepareTransactionRequest", async () => {