Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ntt normalizer #200

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ jobs:

- 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)
git diff --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
16 changes: 8 additions & 8 deletions ci_tests/evm_binding/IRateLimiter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,36 +20,36 @@ import type {
OnEvent,
} from "./common";

export type NormalizedAmountStruct = {
export type TrimmedAmountStruct = {
amount: BigNumberish;
decimals: BigNumberish;
};

export type NormalizedAmountStructOutput = [BigNumber, number] & {
export type TrimmedAmountStructOutput = [BigNumber, number] & {
amount: BigNumber;
decimals: number;
};

export declare namespace IRateLimiter {
export type InboundQueuedTransferStruct = {
amount: NormalizedAmountStruct;
amount: TrimmedAmountStruct;
txTimestamp: BigNumberish;
recipient: string;
};

export type InboundQueuedTransferStructOutput = [
NormalizedAmountStructOutput,
TrimmedAmountStructOutput,
BigNumber,
string
] & {
amount: NormalizedAmountStructOutput;
amount: TrimmedAmountStructOutput;
txTimestamp: BigNumber;
recipient: string;
};

export type OutboundQueuedTransferStruct = {
recipient: BytesLike;
amount: NormalizedAmountStruct;
amount: TrimmedAmountStruct;
txTimestamp: BigNumberish;
recipientChain: BigNumberish;
sender: string;
Expand All @@ -58,14 +58,14 @@ export declare namespace IRateLimiter {

export type OutboundQueuedTransferStructOutput = [
string,
NormalizedAmountStructOutput,
TrimmedAmountStructOutput,
BigNumber,
number,
string,
string
] & {
recipient: string;
amount: NormalizedAmountStructOutput;
amount: TrimmedAmountStructOutput;
txTimestamp: BigNumber;
recipientChain: number;
sender: string;
Expand Down
28 changes: 14 additions & 14 deletions ci_tests/evm_binding/MockNttManager.sol/MockNttManagerContract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ import type {
OnEvent,
} from "../common";

export type NormalizedAmountStruct = {
export type TrimmedAmountStruct = {
amount: BigNumberish;
decimals: BigNumberish;
};

export type NormalizedAmountStructOutput = [BigNumber, number] & {
export type TrimmedAmountStructOutput = [BigNumber, number] & {
amount: BigNumber;
decimals: number;
};
Expand Down Expand Up @@ -63,40 +63,40 @@ export declare namespace TransceiverStructs {

export declare namespace IRateLimiter {
export type RateLimitParamsStruct = {
limit: NormalizedAmountStruct;
currentCapacity: NormalizedAmountStruct;
limit: TrimmedAmountStruct;
currentCapacity: TrimmedAmountStruct;
lastTxTimestamp: BigNumberish;
};

export type RateLimitParamsStructOutput = [
NormalizedAmountStructOutput,
NormalizedAmountStructOutput,
TrimmedAmountStructOutput,
TrimmedAmountStructOutput,
BigNumber
] & {
limit: NormalizedAmountStructOutput;
currentCapacity: NormalizedAmountStructOutput;
limit: TrimmedAmountStructOutput;
currentCapacity: TrimmedAmountStructOutput;
lastTxTimestamp: BigNumber;
};

export type InboundQueuedTransferStruct = {
amount: NormalizedAmountStruct;
amount: TrimmedAmountStruct;
txTimestamp: BigNumberish;
recipient: string;
};

export type InboundQueuedTransferStructOutput = [
NormalizedAmountStructOutput,
TrimmedAmountStructOutput,
BigNumber,
string
] & {
amount: NormalizedAmountStructOutput;
amount: TrimmedAmountStructOutput;
txTimestamp: BigNumber;
recipient: string;
};

export type OutboundQueuedTransferStruct = {
recipient: BytesLike;
amount: NormalizedAmountStruct;
amount: TrimmedAmountStruct;
txTimestamp: BigNumberish;
recipientChain: BigNumberish;
sender: string;
Expand All @@ -105,14 +105,14 @@ export declare namespace IRateLimiter {

export type OutboundQueuedTransferStructOutput = [
string,
NormalizedAmountStructOutput,
TrimmedAmountStructOutput,
BigNumber,
number,
string,
string
] & {
recipient: string;
amount: NormalizedAmountStructOutput;
amount: TrimmedAmountStructOutput;
txTimestamp: BigNumber;
recipientChain: number;
sender: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ import type {
OnEvent,
} from "../common";

export type NormalizedAmountStruct = {
export type TrimmedAmountStruct = {
amount: BigNumberish;
decimals: BigNumberish;
};

export type NormalizedAmountStructOutput = [BigNumber, number] & {
export type TrimmedAmountStructOutput = [BigNumber, number] & {
amount: BigNumber;
decimals: number;
};
Expand Down Expand Up @@ -63,24 +63,24 @@ export declare namespace TransceiverStructs {

export declare namespace IRateLimiter {
export type InboundQueuedTransferStruct = {
amount: NormalizedAmountStruct;
amount: TrimmedAmountStruct;
txTimestamp: BigNumberish;
recipient: string;
};

export type InboundQueuedTransferStructOutput = [
NormalizedAmountStructOutput,
TrimmedAmountStructOutput,
BigNumber,
string
] & {
amount: NormalizedAmountStructOutput;
amount: TrimmedAmountStructOutput;
txTimestamp: BigNumber;
recipient: string;
};

export type OutboundQueuedTransferStruct = {
recipient: BytesLike;
amount: NormalizedAmountStruct;
amount: TrimmedAmountStruct;
txTimestamp: BigNumberish;
recipientChain: BigNumberish;
sender: string;
Expand All @@ -89,14 +89,14 @@ export declare namespace IRateLimiter {

export type OutboundQueuedTransferStructOutput = [
string,
NormalizedAmountStructOutput,
TrimmedAmountStructOutput,
BigNumber,
number,
string,
string
] & {
recipient: string;
amount: NormalizedAmountStructOutput;
amount: TrimmedAmountStructOutput;
txTimestamp: BigNumber;
recipientChain: number;
sender: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ import type {
OnEvent,
} from "../common";

export type NormalizedAmountStruct = {
export type TrimmedAmountStruct = {
amount: BigNumberish;
decimals: BigNumberish;
};

export type NormalizedAmountStructOutput = [BigNumber, number] & {
export type TrimmedAmountStructOutput = [BigNumber, number] & {
amount: BigNumber;
decimals: number;
};
Expand Down Expand Up @@ -63,24 +63,24 @@ export declare namespace TransceiverStructs {

export declare namespace IRateLimiter {
export type InboundQueuedTransferStruct = {
amount: NormalizedAmountStruct;
amount: TrimmedAmountStruct;
txTimestamp: BigNumberish;
recipient: string;
};

export type InboundQueuedTransferStructOutput = [
NormalizedAmountStructOutput,
TrimmedAmountStructOutput,
BigNumber,
string
] & {
amount: NormalizedAmountStructOutput;
amount: TrimmedAmountStructOutput;
txTimestamp: BigNumber;
recipient: string;
};

export type OutboundQueuedTransferStruct = {
recipient: BytesLike;
amount: NormalizedAmountStruct;
amount: TrimmedAmountStruct;
txTimestamp: BigNumberish;
recipientChain: BigNumberish;
sender: string;
Expand All @@ -89,14 +89,14 @@ export declare namespace IRateLimiter {

export type OutboundQueuedTransferStructOutput = [
string,
NormalizedAmountStructOutput,
TrimmedAmountStructOutput,
BigNumber,
number,
string,
string
] & {
recipient: string;
amount: NormalizedAmountStructOutput;
amount: TrimmedAmountStructOutput;
txTimestamp: BigNumber;
recipientChain: number;
sender: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ import type {
OnEvent,
} from "../common";

export type NormalizedAmountStruct = {
export type TrimmedAmountStruct = {
amount: BigNumberish;
decimals: BigNumberish;
};

export type NormalizedAmountStructOutput = [BigNumber, number] & {
export type TrimmedAmountStructOutput = [BigNumber, number] & {
amount: BigNumber;
decimals: number;
};
Expand Down Expand Up @@ -63,24 +63,24 @@ export declare namespace TransceiverStructs {

export declare namespace IRateLimiter {
export type InboundQueuedTransferStruct = {
amount: NormalizedAmountStruct;
amount: TrimmedAmountStruct;
txTimestamp: BigNumberish;
recipient: string;
};

export type InboundQueuedTransferStructOutput = [
NormalizedAmountStructOutput,
TrimmedAmountStructOutput,
BigNumber,
string
] & {
amount: NormalizedAmountStructOutput;
amount: TrimmedAmountStructOutput;
txTimestamp: BigNumber;
recipient: string;
};

export type OutboundQueuedTransferStruct = {
recipient: BytesLike;
amount: NormalizedAmountStruct;
amount: TrimmedAmountStruct;
txTimestamp: BigNumberish;
recipientChain: BigNumberish;
sender: string;
Expand All @@ -89,14 +89,14 @@ export declare namespace IRateLimiter {

export type OutboundQueuedTransferStructOutput = [
string,
NormalizedAmountStructOutput,
TrimmedAmountStructOutput,
BigNumber,
number,
string,
string
] & {
recipient: string;
amount: NormalizedAmountStructOutput;
amount: TrimmedAmountStructOutput;
txTimestamp: BigNumber;
recipientChain: number;
sender: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ import type {
OnEvent,
} from "../common";

export type NormalizedAmountStruct = {
export type TrimmedAmountStruct = {
amount: BigNumberish;
decimals: BigNumberish;
};

export type NormalizedAmountStructOutput = [BigNumber, number] & {
export type TrimmedAmountStructOutput = [BigNumber, number] & {
amount: BigNumber;
decimals: number;
};
Expand Down Expand Up @@ -63,24 +63,24 @@ export declare namespace TransceiverStructs {

export declare namespace IRateLimiter {
export type InboundQueuedTransferStruct = {
amount: NormalizedAmountStruct;
amount: TrimmedAmountStruct;
txTimestamp: BigNumberish;
recipient: string;
};

export type InboundQueuedTransferStructOutput = [
NormalizedAmountStructOutput,
TrimmedAmountStructOutput,
BigNumber,
string
] & {
amount: NormalizedAmountStructOutput;
amount: TrimmedAmountStructOutput;
txTimestamp: BigNumber;
recipient: string;
};

export type OutboundQueuedTransferStruct = {
recipient: BytesLike;
amount: NormalizedAmountStruct;
amount: TrimmedAmountStruct;
txTimestamp: BigNumberish;
recipientChain: BigNumberish;
sender: string;
Expand All @@ -89,14 +89,14 @@ export declare namespace IRateLimiter {

export type OutboundQueuedTransferStructOutput = [
string,
NormalizedAmountStructOutput,
TrimmedAmountStructOutput,
BigNumber,
number,
string,
string
] & {
recipient: string;
amount: NormalizedAmountStructOutput;
amount: TrimmedAmountStructOutput;
txTimestamp: BigNumber;
recipientChain: number;
sender: string;
Expand Down
Loading
Loading