Skip to content

Commit

Permalink
normalized -> trimmed amount
Browse files Browse the repository at this point in the history
  • Loading branch information
kcsongor committed Feb 26, 2024
1 parent 1986d1a commit 06f1e66
Show file tree
Hide file tree
Showing 79 changed files with 717 additions and 1,497 deletions.
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

0 comments on commit 06f1e66

Please sign in to comment.