Skip to content

Commit

Permalink
update bindings to include include sequencer client
Browse files Browse the repository at this point in the history
  • Loading branch information
RnkSngh committed Sep 30, 2024
1 parent 79c24cb commit b5890ce
Show file tree
Hide file tree
Showing 11 changed files with 1,925 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ CONTRACT_NAMES = channel \
Moon \
OptimisticLightClient \
OptimisticProofVerifier \
SequencerSoloClient \
SequencerSignatureVerifier \
UniversalChannelHandler

# Create the pattern for each contract
Expand Down
350 changes: 350 additions & 0 deletions bindings/go/sequencersignatureverifier/SequencerSignatureVerifier.go

Large diffs are not rendered by default.

404 changes: 404 additions & 0 deletions bindings/go/sequencersoloclient/SequencerSoloClient.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@open-ibc/vibc-core-smart-contracts",
"version": "4.0.1",
"version": "4.0.2",
"main": "dist/index.js",
"bin": {
"verify-vibc-core-smart-contracts": "./dist/scripts/verify-contract-script.js",
Expand Down
15 changes: 15 additions & 0 deletions specs/update.spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,21 @@
- 0
- '{{OptimisticProofVerifier}}'
- '{{L1BlockAddress}}'

- name: SequencerSigVerifier
description: 'SequencerSignatureVerifier'
factoryName: 'SequencerSignatureVerifier'
deployer: 'KEY_DEPLOYER'
deployArgs:
- '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'
- '0x4440000000000000000000000000000000000000000000000000000000000000'

- name: SequencerSoloClient
description: 'SequencerSoloClient'
factoryName: 'SequencerSoloClient'
deployer: 'KEY_DEPLOYER'
deployArgs:
- '{{SequencerSigVerifier}}'

- name: DummyLightClient
description: 'DummyLightClient'
Expand Down
218 changes: 218 additions & 0 deletions src/evm/contracts/SequencerSignatureVerifier.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
BaseContract,
BigNumberish,
BytesLike,
FunctionFragment,
Result,
Interface,
ContractRunner,
ContractMethod,
Listener,
} from "ethers";
import type {
TypedContractEvent,
TypedDeferredTopicFilter,
TypedEventLog,
TypedListener,
TypedContractMethod,
} from "./common";

export type OpIcs23ProofPathStruct = { prefix: BytesLike; suffix: BytesLike };

export type OpIcs23ProofPathStructOutput = [prefix: string, suffix: string] & {
prefix: string;
suffix: string;
};

export type OpIcs23ProofStruct = {
path: OpIcs23ProofPathStruct[];
key: BytesLike;
value: BytesLike;
prefix: BytesLike;
};

export type OpIcs23ProofStructOutput = [
path: OpIcs23ProofPathStructOutput[],
key: string,
value: string,
prefix: string
] & {
path: OpIcs23ProofPathStructOutput[];
key: string;
value: string;
prefix: string;
};

export type Ics23ProofStruct = {
proof: OpIcs23ProofStruct[];
height: BigNumberish;
};

export type Ics23ProofStructOutput = [
proof: OpIcs23ProofStructOutput[],
height: bigint
] & { proof: OpIcs23ProofStructOutput[]; height: bigint };

export interface SequencerSignatureVerifierInterface extends Interface {
getFunction(
nameOrSignature:
| "CHAIN_ID"
| "SEQUENCER"
| "verifyMembership"
| "verifyNonMembership"
| "verifyStateUpdate"
): FunctionFragment;

encodeFunctionData(functionFragment: "CHAIN_ID", values?: undefined): string;
encodeFunctionData(functionFragment: "SEQUENCER", values?: undefined): string;
encodeFunctionData(
functionFragment: "verifyMembership",
values: [BytesLike, BytesLike, BytesLike, Ics23ProofStruct]
): string;
encodeFunctionData(
functionFragment: "verifyNonMembership",
values: [BytesLike, BytesLike, Ics23ProofStruct]
): string;
encodeFunctionData(
functionFragment: "verifyStateUpdate",
values: [BigNumberish, BytesLike, BytesLike, BytesLike]
): string;

decodeFunctionResult(functionFragment: "CHAIN_ID", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "SEQUENCER", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "verifyMembership",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "verifyNonMembership",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "verifyStateUpdate",
data: BytesLike
): Result;
}

export interface SequencerSignatureVerifier extends BaseContract {
connect(runner?: ContractRunner | null): SequencerSignatureVerifier;
waitForDeployment(): Promise<this>;

interface: SequencerSignatureVerifierInterface;

queryFilter<TCEvent extends TypedContractEvent>(
event: TCEvent,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;
queryFilter<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEventLog<TCEvent>>>;

on<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
on<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;

once<TCEvent extends TypedContractEvent>(
event: TCEvent,
listener: TypedListener<TCEvent>
): Promise<this>;
once<TCEvent extends TypedContractEvent>(
filter: TypedDeferredTopicFilter<TCEvent>,
listener: TypedListener<TCEvent>
): Promise<this>;

listeners<TCEvent extends TypedContractEvent>(
event: TCEvent
): Promise<Array<TypedListener<TCEvent>>>;
listeners(eventName?: string): Promise<Array<Listener>>;
removeAllListeners<TCEvent extends TypedContractEvent>(
event?: TCEvent
): Promise<this>;

CHAIN_ID: TypedContractMethod<[], [string], "view">;

SEQUENCER: TypedContractMethod<[], [string], "view">;

verifyMembership: TypedContractMethod<
[
appHash: BytesLike,
key: BytesLike,
value: BytesLike,
proofs: Ics23ProofStruct
],
[void],
"view"
>;

verifyNonMembership: TypedContractMethod<
[arg0: BytesLike, arg1: BytesLike, arg2: Ics23ProofStruct],
[void],
"view"
>;

verifyStateUpdate: TypedContractMethod<
[
l2BlockNumber: BigNumberish,
appHash: BytesLike,
l1BlockHash: BytesLike,
signature: BytesLike
],
[void],
"view"
>;

getFunction<T extends ContractMethod = ContractMethod>(
key: string | FunctionFragment
): T;

getFunction(
nameOrSignature: "CHAIN_ID"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "SEQUENCER"
): TypedContractMethod<[], [string], "view">;
getFunction(
nameOrSignature: "verifyMembership"
): TypedContractMethod<
[
appHash: BytesLike,
key: BytesLike,
value: BytesLike,
proofs: Ics23ProofStruct
],
[void],
"view"
>;
getFunction(
nameOrSignature: "verifyNonMembership"
): TypedContractMethod<
[arg0: BytesLike, arg1: BytesLike, arg2: Ics23ProofStruct],
[void],
"view"
>;
getFunction(
nameOrSignature: "verifyStateUpdate"
): TypedContractMethod<
[
l2BlockNumber: BigNumberish,
appHash: BytesLike,
l1BlockHash: BytesLike,
signature: BytesLike
],
[void],
"view"
>;

filters: {};
}
Loading

0 comments on commit b5890ce

Please sign in to comment.