Skip to content

Commit

Permalink
Merge branch 'main' into reorganize
Browse files Browse the repository at this point in the history
  • Loading branch information
gator-boi authored Feb 26, 2024
2 parents 9a6bdd1 + a784c1b commit 8fa3bc4
Show file tree
Hide file tree
Showing 301 changed files with 147,512 additions and 1 deletion.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/node_modules
46 changes: 46 additions & 0 deletions .github/workflows/sdk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: SDK CI

on:
workflow_dispatch:
pull_request:
push:
branches:
- main

env:
FOUNDRY_PROFILE: prod

jobs:
check:
strategy:
fail-fast: true

name: typechain match
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Run Forge build
run: |
cd evm
forge build
id: build

- name: Run Typechain
run: |
cd ci_tests
npm i -g typechain@8.3.2 @typechain/ethers-v5@11.1.2
npx typechain@8.3.2 --target ethers-v5 --out-dir evm_binding/ '../evm/out/*/*.json'
id: generate

- name: Diff
run: |
git diff --name-only --exit-code && echo "✅ Generated typechain matches committed typechain" || (echo "❌ Generated typechain differs from committed typechain, run \`cd ci_tests && npx typechain@8.3.2 --target ethers-v5 --out-dir evm_binding/ '../evm/out/*/*.json'\` and commit the result" >&2 && exit 1)
id: check
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,10 @@ docs/
.vscode

# Misc
.private
.private

# Node
node_modules

# Tilt
.wormhole
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM node:20.11.1-alpine@sha256:f4c96a28c0b2d8981664e03f461c2677152cd9a756012ffa8e2c6727427c2bda

COPY ci_tests/package.json ci_tests/package-lock.json ./ci_tests/
RUN --mount=type=cache,uid=1000,gid=1000,target=/home/node/.npm \
npm ci --prefix ci_tests
COPY ci_tests ./ci_tests
21 changes: 21 additions & 0 deletions Tiltfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
load('ext://namespace', 'namespace_create')
load('ext://git_resource', 'git_checkout')

git_checkout('https://github.com/wormhole-foundation/wormhole.git#main', '.wormhole/')

load(".wormhole/Tiltfile", "namespace", "k8s_yaml_with_ns")

docker_build(
ref = "ntt-ci",
context = ".",
only = ["./ci_tests"],
dockerfile = "Dockerfile",
)

k8s_yaml_with_ns("ci.yaml")

k8s_resource(
"ntt-ci-tests",
labels = ["ntt"],
resource_deps = ["eth-devnet2", "guardian"],
)
26 changes: 26 additions & 0 deletions ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
kind: Job
apiVersion: batch/v1
metadata:
name: ntt-ci-tests
spec:
backoffLimit: 0
template:
spec:
restartPolicy: Never
containers:
- name: ntt-ci-tests
image: ntt-ci
command:
- /bin/sh
- -c
- 'npm run go --prefix ci_tests && echo "done!" && touch /success'
readinessProbe:
exec:
command:
- test
- -e
- "/success"
initialDelaySeconds: 5
periodSeconds: 5
---

147 changes: 147 additions & 0 deletions ci_tests/evm_binding/Base.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
BaseContract,
BigNumber,
BigNumberish,
BytesLike,
CallOverrides,
ContractTransaction,
Overrides,
PopulatedTransaction,
Signer,
utils,
} from "ethers";
import type { FunctionFragment, Result } from "@ethersproject/abi";
import type { Listener, Provider } from "@ethersproject/providers";
import type {
TypedEventFilter,
TypedEvent,
TypedListener,
OnEvent,
} from "./common";

export interface BaseInterface extends utils.Interface {
functions: {
"setRegisteredSender(uint16,bytes32)": FunctionFragment;
"wormhole()": FunctionFragment;
"wormholeRelayer()": FunctionFragment;
};

getFunction(
nameOrSignatureOrTopic:
| "setRegisteredSender"
| "wormhole"
| "wormholeRelayer"
): FunctionFragment;

encodeFunctionData(
functionFragment: "setRegisteredSender",
values: [BigNumberish, BytesLike]
): string;
encodeFunctionData(functionFragment: "wormhole", values?: undefined): string;
encodeFunctionData(
functionFragment: "wormholeRelayer",
values?: undefined
): string;

decodeFunctionResult(
functionFragment: "setRegisteredSender",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "wormhole", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "wormholeRelayer",
data: BytesLike
): Result;

events: {};
}

export interface Base extends BaseContract {
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;

interface: BaseInterface;

queryFilter<TEvent extends TypedEvent>(
event: TypedEventFilter<TEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TEvent>>;

listeners<TEvent extends TypedEvent>(
eventFilter?: TypedEventFilter<TEvent>
): Array<TypedListener<TEvent>>;
listeners(eventName?: string): Array<Listener>;
removeAllListeners<TEvent extends TypedEvent>(
eventFilter: TypedEventFilter<TEvent>
): this;
removeAllListeners(eventName?: string): this;
off: OnEvent<this>;
on: OnEvent<this>;
once: OnEvent<this>;
removeListener: OnEvent<this>;

functions: {
setRegisteredSender(
sourceChain: BigNumberish,
sourceAddress: BytesLike,
overrides?: Overrides & { from?: string }
): Promise<ContractTransaction>;

wormhole(overrides?: CallOverrides): Promise<[string]>;

wormholeRelayer(overrides?: CallOverrides): Promise<[string]>;
};

setRegisteredSender(
sourceChain: BigNumberish,
sourceAddress: BytesLike,
overrides?: Overrides & { from?: string }
): Promise<ContractTransaction>;

wormhole(overrides?: CallOverrides): Promise<string>;

wormholeRelayer(overrides?: CallOverrides): Promise<string>;

callStatic: {
setRegisteredSender(
sourceChain: BigNumberish,
sourceAddress: BytesLike,
overrides?: CallOverrides
): Promise<void>;

wormhole(overrides?: CallOverrides): Promise<string>;

wormholeRelayer(overrides?: CallOverrides): Promise<string>;
};

filters: {};

estimateGas: {
setRegisteredSender(
sourceChain: BigNumberish,
sourceAddress: BytesLike,
overrides?: Overrides & { from?: string }
): Promise<BigNumber>;

wormhole(overrides?: CallOverrides): Promise<BigNumber>;

wormholeRelayer(overrides?: CallOverrides): Promise<BigNumber>;
};

populateTransaction: {
setRegisteredSender(
sourceChain: BigNumberish,
sourceAddress: BytesLike,
overrides?: Overrides & { from?: string }
): Promise<PopulatedTransaction>;

wormhole(overrides?: CallOverrides): Promise<PopulatedTransaction>;

wormholeRelayer(overrides?: CallOverrides): Promise<PopulatedTransaction>;
};
}
55 changes: 55 additions & 0 deletions ci_tests/evm_binding/BytesParsing.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type { BaseContract, Signer, utils } from "ethers";

import type { Listener, Provider } from "@ethersproject/providers";
import type {
TypedEventFilter,
TypedEvent,
TypedListener,
OnEvent,
} from "./common";

export interface BytesParsingInterface extends utils.Interface {
functions: {};

events: {};
}

export interface BytesParsing extends BaseContract {
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;

interface: BytesParsingInterface;

queryFilter<TEvent extends TypedEvent>(
event: TypedEventFilter<TEvent>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TEvent>>;

listeners<TEvent extends TypedEvent>(
eventFilter?: TypedEventFilter<TEvent>
): Array<TypedListener<TEvent>>;
listeners(eventName?: string): Array<Listener>;
removeAllListeners<TEvent extends TypedEvent>(
eventFilter: TypedEventFilter<TEvent>
): this;
removeAllListeners(eventName?: string): this;
off: OnEvent<this>;
on: OnEvent<this>;
once: OnEvent<this>;
removeListener: OnEvent<this>;

functions: {};

callStatic: {};

filters: {};

estimateGas: {};

populateTransaction: {};
}
Loading

0 comments on commit 8fa3bc4

Please sign in to comment.