initialise

This commit is contained in:
gozzy 2022-12-04 07:02:30 +01:00
commit cd916c4513
289 changed files with 68257 additions and 0 deletions

3
Dockerfile Normal file
View File

@ -0,0 +1,3 @@
FROM nginx:alpine
RUN rm /usr/share/nginx/html/*
COPY . /usr/share/nginx/html

20
README.md Normal file
View File

@ -0,0 +1,20 @@
# tornado-new
## Build Setup
```bash
# install dependencies
$ yarn install
# serve with hot reload at localhost:3000
$ yarn dev
# build for production and launch server
$ yarn build
$ yarn start
# generate static project
$ yarn generate
```
For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org).

549
_contracts/Aggregator.d.ts vendored Normal file
View File

@ -0,0 +1,549 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import {
ethers,
EventFilter,
Signer,
BigNumber,
BigNumberish,
PopulatedTransaction,
BaseContract,
ContractTransaction,
CallOverrides,
} from "ethers";
import { BytesLike } from "@ethersproject/bytes";
import { Listener, Provider } from "@ethersproject/providers";
import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi";
import { TypedEventFilter, TypedEvent, TypedListener } from "./commons";
interface AggregatorInterface extends ethers.utils.Interface {
functions: {
"ensRegistry()": FunctionFragment;
"getAllProposals(address)": FunctionFragment;
"getGovernanceBalances(address,address[])": FunctionFragment;
"getUserData(address,address)": FunctionFragment;
"relayerRegistry()": FunctionFragment;
"relayersData(bytes32[],string[])": FunctionFragment;
};
encodeFunctionData(
functionFragment: "ensRegistry",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "getAllProposals",
values: [string]
): string;
encodeFunctionData(
functionFragment: "getGovernanceBalances",
values: [string, string[]]
): string;
encodeFunctionData(
functionFragment: "getUserData",
values: [string, string]
): string;
encodeFunctionData(
functionFragment: "relayerRegistry",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "relayersData",
values: [BytesLike[], string[]]
): string;
decodeFunctionResult(
functionFragment: "ensRegistry",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "getAllProposals",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "getGovernanceBalances",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "getUserData",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "relayerRegistry",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "relayersData",
data: BytesLike
): Result;
events: {};
}
export class Aggregator extends BaseContract {
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
listeners<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter?: TypedEventFilter<EventArgsArray, EventArgsObject>
): Array<TypedListener<EventArgsArray, EventArgsObject>>;
off<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
on<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
once<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
removeListener<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
removeAllListeners<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>
): this;
listeners(eventName?: string): Array<Listener>;
off(eventName: string, listener: Listener): this;
on(eventName: string, listener: Listener): this;
once(eventName: string, listener: Listener): this;
removeListener(eventName: string, listener: Listener): this;
removeAllListeners(eventName?: string): this;
queryFilter<EventArgsArray extends Array<any>, EventArgsObject>(
event: TypedEventFilter<EventArgsArray, EventArgsObject>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEvent<EventArgsArray & EventArgsObject>>>;
interface: AggregatorInterface;
functions: {
ensRegistry(overrides?: CallOverrides): Promise<[string]>;
getAllProposals(
governance: string,
overrides?: CallOverrides
): Promise<
[
([
string,
string,
BigNumber,
BigNumber,
BigNumber,
BigNumber,
boolean,
boolean,
number
] & {
proposer: string;
target: string;
startTime: BigNumber;
endTime: BigNumber;
forVotes: BigNumber;
againstVotes: BigNumber;
executed: boolean;
extended: boolean;
state: number;
})[]
] & {
proposals: ([
string,
string,
BigNumber,
BigNumber,
BigNumber,
BigNumber,
boolean,
boolean,
number
] & {
proposer: string;
target: string;
startTime: BigNumber;
endTime: BigNumber;
forVotes: BigNumber;
againstVotes: BigNumber;
executed: boolean;
extended: boolean;
state: number;
})[];
}
>;
getGovernanceBalances(
governance: string,
accs: string[],
overrides?: CallOverrides
): Promise<[BigNumber[]] & { amounts: BigNumber[] }>;
getUserData(
governance: string,
account: string,
overrides?: CallOverrides
): Promise<
[BigNumber, BigNumber, BigNumber, BigNumber, string] & {
balance: BigNumber;
latestProposalId: BigNumber;
latestProposalIdState: BigNumber;
timelock: BigNumber;
delegatee: string;
}
>;
relayerRegistry(overrides?: CallOverrides): Promise<[string]>;
relayersData(
_relayers: BytesLike[],
_subdomains: string[],
overrides?: CallOverrides
): Promise<
[
([
string,
BigNumber,
boolean,
[
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string
]
] & {
owner: string;
balance: BigNumber;
isRegistered: boolean;
records: [
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string
];
})[]
]
>;
};
ensRegistry(overrides?: CallOverrides): Promise<string>;
getAllProposals(
governance: string,
overrides?: CallOverrides
): Promise<
([
string,
string,
BigNumber,
BigNumber,
BigNumber,
BigNumber,
boolean,
boolean,
number
] & {
proposer: string;
target: string;
startTime: BigNumber;
endTime: BigNumber;
forVotes: BigNumber;
againstVotes: BigNumber;
executed: boolean;
extended: boolean;
state: number;
})[]
>;
getGovernanceBalances(
governance: string,
accs: string[],
overrides?: CallOverrides
): Promise<BigNumber[]>;
getUserData(
governance: string,
account: string,
overrides?: CallOverrides
): Promise<
[BigNumber, BigNumber, BigNumber, BigNumber, string] & {
balance: BigNumber;
latestProposalId: BigNumber;
latestProposalIdState: BigNumber;
timelock: BigNumber;
delegatee: string;
}
>;
relayerRegistry(overrides?: CallOverrides): Promise<string>;
relayersData(
_relayers: BytesLike[],
_subdomains: string[],
overrides?: CallOverrides
): Promise<
([
string,
BigNumber,
boolean,
[
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string
]
] & {
owner: string;
balance: BigNumber;
isRegistered: boolean;
records: [
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string
];
})[]
>;
callStatic: {
ensRegistry(overrides?: CallOverrides): Promise<string>;
getAllProposals(
governance: string,
overrides?: CallOverrides
): Promise<
([
string,
string,
BigNumber,
BigNumber,
BigNumber,
BigNumber,
boolean,
boolean,
number
] & {
proposer: string;
target: string;
startTime: BigNumber;
endTime: BigNumber;
forVotes: BigNumber;
againstVotes: BigNumber;
executed: boolean;
extended: boolean;
state: number;
})[]
>;
getGovernanceBalances(
governance: string,
accs: string[],
overrides?: CallOverrides
): Promise<BigNumber[]>;
getUserData(
governance: string,
account: string,
overrides?: CallOverrides
): Promise<
[BigNumber, BigNumber, BigNumber, BigNumber, string] & {
balance: BigNumber;
latestProposalId: BigNumber;
latestProposalIdState: BigNumber;
timelock: BigNumber;
delegatee: string;
}
>;
relayerRegistry(overrides?: CallOverrides): Promise<string>;
relayersData(
_relayers: BytesLike[],
_subdomains: string[],
overrides?: CallOverrides
): Promise<
([
string,
BigNumber,
boolean,
[
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string
]
] & {
owner: string;
balance: BigNumber;
isRegistered: boolean;
records: [
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string
];
})[]
>;
};
filters: {};
estimateGas: {
ensRegistry(overrides?: CallOverrides): Promise<BigNumber>;
getAllProposals(
governance: string,
overrides?: CallOverrides
): Promise<BigNumber>;
getGovernanceBalances(
governance: string,
accs: string[],
overrides?: CallOverrides
): Promise<BigNumber>;
getUserData(
governance: string,
account: string,
overrides?: CallOverrides
): Promise<BigNumber>;
relayerRegistry(overrides?: CallOverrides): Promise<BigNumber>;
relayersData(
_relayers: BytesLike[],
_subdomains: string[],
overrides?: CallOverrides
): Promise<BigNumber>;
};
populateTransaction: {
ensRegistry(overrides?: CallOverrides): Promise<PopulatedTransaction>;
getAllProposals(
governance: string,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
getGovernanceBalances(
governance: string,
accs: string[],
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
getUserData(
governance: string,
account: string,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
relayerRegistry(overrides?: CallOverrides): Promise<PopulatedTransaction>;
relayersData(
_relayers: BytesLike[],
_subdomains: string[],
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
};
}

1787
_contracts/AmbBridge.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

133
_contracts/BridgeBNB.d.ts vendored Normal file
View File

@ -0,0 +1,133 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import {
ethers,
EventFilter,
Signer,
BigNumber,
BigNumberish,
PopulatedTransaction,
BaseContract,
ContractTransaction,
} from "ethers";
import { BytesLike } from "@ethersproject/bytes";
import { Listener, Provider } from "@ethersproject/providers";
import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi";
import { TypedEventFilter, TypedEvent, TypedListener } from "./commons";
interface BridgeBNBInterface extends ethers.utils.Interface {
functions: {};
events: {
"RelayedMessage(address,address,bytes32,bool)": EventFragment;
"UserRequestForAffirmation(bytes32,bytes)": EventFragment;
};
getEvent(nameOrSignatureOrTopic: "RelayedMessage"): EventFragment;
getEvent(nameOrSignatureOrTopic: "UserRequestForAffirmation"): EventFragment;
}
export type RelayedMessageEvent = TypedEvent<
[string, string, string, boolean] & {
sender: string;
executor: string;
messageId: string;
status: boolean;
}
>;
export type UserRequestForAffirmationEvent = TypedEvent<
[string, string] & { messageId: string; encodedData: string }
>;
export class BridgeBNB extends BaseContract {
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
listeners<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter?: TypedEventFilter<EventArgsArray, EventArgsObject>
): Array<TypedListener<EventArgsArray, EventArgsObject>>;
off<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
on<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
once<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
removeListener<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
removeAllListeners<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>
): this;
listeners(eventName?: string): Array<Listener>;
off(eventName: string, listener: Listener): this;
on(eventName: string, listener: Listener): this;
once(eventName: string, listener: Listener): this;
removeListener(eventName: string, listener: Listener): this;
removeAllListeners(eventName?: string): this;
queryFilter<EventArgsArray extends Array<any>, EventArgsObject>(
event: TypedEventFilter<EventArgsArray, EventArgsObject>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEvent<EventArgsArray & EventArgsObject>>>;
interface: BridgeBNBInterface;
functions: {};
callStatic: {};
filters: {
"RelayedMessage(address,address,bytes32,bool)"(
sender?: string | null,
executor?: string | null,
messageId?: BytesLike | null,
status?: null
): TypedEventFilter<
[string, string, string, boolean],
{ sender: string; executor: string; messageId: string; status: boolean }
>;
RelayedMessage(
sender?: string | null,
executor?: string | null,
messageId?: BytesLike | null,
status?: null
): TypedEventFilter<
[string, string, string, boolean],
{ sender: string; executor: string; messageId: string; status: boolean }
>;
"UserRequestForAffirmation(bytes32,bytes)"(
messageId?: BytesLike | null,
encodedData?: null
): TypedEventFilter<
[string, string],
{ messageId: string; encodedData: string }
>;
UserRequestForAffirmation(
messageId?: BytesLike | null,
encodedData?: null
): TypedEventFilter<
[string, string],
{ messageId: string; encodedData: string }
>;
};
estimateGas: {};
populateTransaction: {};
}

406
_contracts/BscBridgeHelper.d.ts vendored Normal file
View File

@ -0,0 +1,406 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import {
ethers,
EventFilter,
Signer,
BigNumber,
BigNumberish,
PopulatedTransaction,
BaseContract,
ContractTransaction,
Overrides,
PayableOverrides,
CallOverrides,
} from "ethers";
import { BytesLike } from "@ethersproject/bytes";
import { Listener, Provider } from "@ethersproject/providers";
import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi";
import { TypedEventFilter, TypedEvent, TypedListener } from "./commons";
interface BscBridgeHelperInterface extends ethers.utils.Interface {
functions: {
"WETH()": FunctionFragment;
"bridge()": FunctionFragment;
"claimTokens(address,address)": FunctionFragment;
"onTokenBridged(address,uint256,bytes)": FunctionFragment;
"owner()": FunctionFragment;
"register(tuple)": FunctionFragment;
"transferOwnership(address)": FunctionFragment;
"wrapAndRelayTokens()": FunctionFragment;
};
encodeFunctionData(functionFragment: "WETH", values?: undefined): string;
encodeFunctionData(functionFragment: "bridge", values?: undefined): string;
encodeFunctionData(
functionFragment: "claimTokens",
values: [string, string]
): string;
encodeFunctionData(
functionFragment: "onTokenBridged",
values: [string, BigNumberish, BytesLike]
): string;
encodeFunctionData(functionFragment: "owner", values?: undefined): string;
encodeFunctionData(
functionFragment: "register",
values: [{ owner: string; publicKey: BytesLike }]
): string;
encodeFunctionData(
functionFragment: "transferOwnership",
values: [string]
): string;
encodeFunctionData(
functionFragment: "wrapAndRelayTokens",
values?: undefined
): string;
decodeFunctionResult(functionFragment: "WETH", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "bridge", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "claimTokens",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "onTokenBridged",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "register", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "transferOwnership",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "wrapAndRelayTokens",
data: BytesLike
): Result;
events: {
"PublicKey(address,bytes)": EventFragment;
};
getEvent(nameOrSignatureOrTopic: "PublicKey"): EventFragment;
}
export type PublicKeyEvent = TypedEvent<
[string, string] & { owner: string; key: string }
>;
export class BscBridgeHelper extends BaseContract {
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
listeners<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter?: TypedEventFilter<EventArgsArray, EventArgsObject>
): Array<TypedListener<EventArgsArray, EventArgsObject>>;
off<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
on<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
once<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
removeListener<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
removeAllListeners<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>
): this;
listeners(eventName?: string): Array<Listener>;
off(eventName: string, listener: Listener): this;
on(eventName: string, listener: Listener): this;
once(eventName: string, listener: Listener): this;
removeListener(eventName: string, listener: Listener): this;
removeAllListeners(eventName?: string): this;
queryFilter<EventArgsArray extends Array<any>, EventArgsObject>(
event: TypedEventFilter<EventArgsArray, EventArgsObject>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEvent<EventArgsArray & EventArgsObject>>>;
interface: BscBridgeHelperInterface;
functions: {
WETH(overrides?: CallOverrides): Promise<[string]>;
bridge(overrides?: CallOverrides): Promise<[string]>;
claimTokens(
_token: string,
_to: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
onTokenBridged(
_token: string,
_value: BigNumberish,
_data: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
owner(overrides?: CallOverrides): Promise<[string]>;
register(
_account: { owner: string; publicKey: BytesLike },
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
transferOwnership(
_newOwner: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
"wrapAndRelayTokens()"(
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
"wrapAndRelayTokens(address,bytes)"(
_receiver: string,
_data: BytesLike,
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
"wrapAndRelayTokens(address,bytes,(address,bytes))"(
_receiver: string,
_data: BytesLike,
_account: { owner: string; publicKey: BytesLike },
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
"wrapAndRelayTokens(address)"(
_receiver: string,
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
};
WETH(overrides?: CallOverrides): Promise<string>;
bridge(overrides?: CallOverrides): Promise<string>;
claimTokens(
_token: string,
_to: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
onTokenBridged(
_token: string,
_value: BigNumberish,
_data: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
owner(overrides?: CallOverrides): Promise<string>;
register(
_account: { owner: string; publicKey: BytesLike },
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
transferOwnership(
_newOwner: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
"wrapAndRelayTokens()"(
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
"wrapAndRelayTokens(address,bytes)"(
_receiver: string,
_data: BytesLike,
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
"wrapAndRelayTokens(address,bytes,(address,bytes))"(
_receiver: string,
_data: BytesLike,
_account: { owner: string; publicKey: BytesLike },
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
"wrapAndRelayTokens(address)"(
_receiver: string,
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
callStatic: {
WETH(overrides?: CallOverrides): Promise<string>;
bridge(overrides?: CallOverrides): Promise<string>;
claimTokens(
_token: string,
_to: string,
overrides?: CallOverrides
): Promise<void>;
onTokenBridged(
_token: string,
_value: BigNumberish,
_data: BytesLike,
overrides?: CallOverrides
): Promise<void>;
owner(overrides?: CallOverrides): Promise<string>;
register(
_account: { owner: string; publicKey: BytesLike },
overrides?: CallOverrides
): Promise<void>;
transferOwnership(
_newOwner: string,
overrides?: CallOverrides
): Promise<void>;
"wrapAndRelayTokens()"(overrides?: CallOverrides): Promise<void>;
"wrapAndRelayTokens(address,bytes)"(
_receiver: string,
_data: BytesLike,
overrides?: CallOverrides
): Promise<void>;
"wrapAndRelayTokens(address,bytes,(address,bytes))"(
_receiver: string,
_data: BytesLike,
_account: { owner: string; publicKey: BytesLike },
overrides?: CallOverrides
): Promise<void>;
"wrapAndRelayTokens(address)"(
_receiver: string,
overrides?: CallOverrides
): Promise<void>;
};
filters: {
"PublicKey(address,bytes)"(
owner?: string | null,
key?: null
): TypedEventFilter<[string, string], { owner: string; key: string }>;
PublicKey(
owner?: string | null,
key?: null
): TypedEventFilter<[string, string], { owner: string; key: string }>;
};
estimateGas: {
WETH(overrides?: CallOverrides): Promise<BigNumber>;
bridge(overrides?: CallOverrides): Promise<BigNumber>;
claimTokens(
_token: string,
_to: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
onTokenBridged(
_token: string,
_value: BigNumberish,
_data: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
owner(overrides?: CallOverrides): Promise<BigNumber>;
register(
_account: { owner: string; publicKey: BytesLike },
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
transferOwnership(
_newOwner: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
"wrapAndRelayTokens()"(
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
"wrapAndRelayTokens(address,bytes)"(
_receiver: string,
_data: BytesLike,
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
"wrapAndRelayTokens(address,bytes,(address,bytes))"(
_receiver: string,
_data: BytesLike,
_account: { owner: string; publicKey: BytesLike },
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
"wrapAndRelayTokens(address)"(
_receiver: string,
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
};
populateTransaction: {
WETH(overrides?: CallOverrides): Promise<PopulatedTransaction>;
bridge(overrides?: CallOverrides): Promise<PopulatedTransaction>;
claimTokens(
_token: string,
_to: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
onTokenBridged(
_token: string,
_value: BigNumberish,
_data: BytesLike,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
owner(overrides?: CallOverrides): Promise<PopulatedTransaction>;
register(
_account: { owner: string; publicKey: BytesLike },
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
transferOwnership(
_newOwner: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
"wrapAndRelayTokens()"(
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
"wrapAndRelayTokens(address,bytes)"(
_receiver: string,
_data: BytesLike,
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
"wrapAndRelayTokens(address,bytes,(address,bytes))"(
_receiver: string,
_data: BytesLike,
_account: { owner: string; publicKey: BytesLike },
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
"wrapAndRelayTokens(address)"(
_receiver: string,
overrides?: PayableOverrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
};
}

204
_contracts/FeeManager.d.ts vendored Normal file
View File

@ -0,0 +1,204 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import {
ethers,
EventFilter,
Signer,
BigNumber,
BigNumberish,
PopulatedTransaction,
BaseContract,
ContractTransaction,
CallOverrides,
} from "ethers";
import { BytesLike } from "@ethersproject/bytes";
import { Listener, Provider } from "@ethersproject/providers";
import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi";
import { TypedEventFilter, TypedEvent, TypedListener } from "./commons";
interface FeeManagerInterface extends ethers.utils.Interface {
functions: {
"FOREIGN_TO_HOME_FEE()": FunctionFragment;
"HOME_TO_FOREIGN_FEE()": FunctionFragment;
"calculateFee(bytes32,address,uint256)": FunctionFragment;
"getFee(bytes32,address)": FunctionFragment;
};
encodeFunctionData(
functionFragment: "FOREIGN_TO_HOME_FEE",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "HOME_TO_FOREIGN_FEE",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "calculateFee",
values: [BytesLike, string, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "getFee",
values: [BytesLike, string]
): string;
decodeFunctionResult(
functionFragment: "FOREIGN_TO_HOME_FEE",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "HOME_TO_FOREIGN_FEE",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "calculateFee",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "getFee", data: BytesLike): Result;
events: {};
}
export class FeeManager extends BaseContract {
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
listeners<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter?: TypedEventFilter<EventArgsArray, EventArgsObject>
): Array<TypedListener<EventArgsArray, EventArgsObject>>;
off<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
on<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
once<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
removeListener<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
removeAllListeners<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>
): this;
listeners(eventName?: string): Array<Listener>;
off(eventName: string, listener: Listener): this;
on(eventName: string, listener: Listener): this;
once(eventName: string, listener: Listener): this;
removeListener(eventName: string, listener: Listener): this;
removeAllListeners(eventName?: string): this;
queryFilter<EventArgsArray extends Array<any>, EventArgsObject>(
event: TypedEventFilter<EventArgsArray, EventArgsObject>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEvent<EventArgsArray & EventArgsObject>>>;
interface: FeeManagerInterface;
functions: {
FOREIGN_TO_HOME_FEE(overrides?: CallOverrides): Promise<[string]>;
HOME_TO_FOREIGN_FEE(overrides?: CallOverrides): Promise<[string]>;
calculateFee(
_feeType: BytesLike,
_token: string,
_value: BigNumberish,
overrides?: CallOverrides
): Promise<[BigNumber]>;
getFee(
_feeType: BytesLike,
_token: string,
overrides?: CallOverrides
): Promise<[BigNumber]>;
};
FOREIGN_TO_HOME_FEE(overrides?: CallOverrides): Promise<string>;
HOME_TO_FOREIGN_FEE(overrides?: CallOverrides): Promise<string>;
calculateFee(
_feeType: BytesLike,
_token: string,
_value: BigNumberish,
overrides?: CallOverrides
): Promise<BigNumber>;
getFee(
_feeType: BytesLike,
_token: string,
overrides?: CallOverrides
): Promise<BigNumber>;
callStatic: {
FOREIGN_TO_HOME_FEE(overrides?: CallOverrides): Promise<string>;
HOME_TO_FOREIGN_FEE(overrides?: CallOverrides): Promise<string>;
calculateFee(
_feeType: BytesLike,
_token: string,
_value: BigNumberish,
overrides?: CallOverrides
): Promise<BigNumber>;
getFee(
_feeType: BytesLike,
_token: string,
overrides?: CallOverrides
): Promise<BigNumber>;
};
filters: {};
estimateGas: {
FOREIGN_TO_HOME_FEE(overrides?: CallOverrides): Promise<BigNumber>;
HOME_TO_FOREIGN_FEE(overrides?: CallOverrides): Promise<BigNumber>;
calculateFee(
_feeType: BytesLike,
_token: string,
_value: BigNumberish,
overrides?: CallOverrides
): Promise<BigNumber>;
getFee(
_feeType: BytesLike,
_token: string,
overrides?: CallOverrides
): Promise<BigNumber>;
};
populateTransaction: {
FOREIGN_TO_HOME_FEE(
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
HOME_TO_FOREIGN_FEE(
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
calculateFee(
_feeType: BytesLike,
_token: string,
_value: BigNumberish,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
getFee(
_feeType: BytesLike,
_token: string,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
};
}

2418
_contracts/ForeignOmnibridge.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

2418
_contracts/L1BridgeLimits.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

2450
_contracts/L2BridgeLimits.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

178
_contracts/Multicall.d.ts vendored Normal file
View File

@ -0,0 +1,178 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import {
ethers,
EventFilter,
Signer,
BigNumber,
BigNumberish,
PopulatedTransaction,
BaseContract,
ContractTransaction,
Overrides,
CallOverrides,
} from "ethers";
import { BytesLike } from "@ethersproject/bytes";
import { Listener, Provider } from "@ethersproject/providers";
import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi";
import { TypedEventFilter, TypedEvent, TypedListener } from "./commons";
interface MulticallInterface extends ethers.utils.Interface {
functions: {
"getCurrentBlockTimestamp()": FunctionFragment;
"getEthBalance(address)": FunctionFragment;
"multicall(tuple[])": FunctionFragment;
};
encodeFunctionData(
functionFragment: "getCurrentBlockTimestamp",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "getEthBalance",
values: [string]
): string;
encodeFunctionData(
functionFragment: "multicall",
values: [{ target: string; gasLimit: BigNumberish; callData: BytesLike }[]]
): string;
decodeFunctionResult(
functionFragment: "getCurrentBlockTimestamp",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "getEthBalance",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result;
events: {};
}
export class Multicall extends BaseContract {
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
listeners<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter?: TypedEventFilter<EventArgsArray, EventArgsObject>
): Array<TypedListener<EventArgsArray, EventArgsObject>>;
off<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
on<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
once<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
removeListener<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
removeAllListeners<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>
): this;
listeners(eventName?: string): Array<Listener>;
off(eventName: string, listener: Listener): this;
on(eventName: string, listener: Listener): this;
once(eventName: string, listener: Listener): this;
removeListener(eventName: string, listener: Listener): this;
removeAllListeners(eventName?: string): this;
queryFilter<EventArgsArray extends Array<any>, EventArgsObject>(
event: TypedEventFilter<EventArgsArray, EventArgsObject>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEvent<EventArgsArray & EventArgsObject>>>;
interface: MulticallInterface;
functions: {
getCurrentBlockTimestamp(
overrides?: CallOverrides
): Promise<[BigNumber] & { timestamp: BigNumber }>;
getEthBalance(
addr: string,
overrides?: CallOverrides
): Promise<[BigNumber] & { balance: BigNumber }>;
multicall(
calls: { target: string; gasLimit: BigNumberish; callData: BytesLike }[],
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
};
getCurrentBlockTimestamp(overrides?: CallOverrides): Promise<BigNumber>;
getEthBalance(addr: string, overrides?: CallOverrides): Promise<BigNumber>;
multicall(
calls: { target: string; gasLimit: BigNumberish; callData: BytesLike }[],
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
callStatic: {
getCurrentBlockTimestamp(overrides?: CallOverrides): Promise<BigNumber>;
getEthBalance(addr: string, overrides?: CallOverrides): Promise<BigNumber>;
multicall(
calls: { target: string; gasLimit: BigNumberish; callData: BytesLike }[],
overrides?: CallOverrides
): Promise<
[
BigNumber,
([boolean, BigNumber, string] & {
success: boolean;
gasUsed: BigNumber;
returnData: string;
})[]
] & {
blockNumber: BigNumber;
returnData: ([boolean, BigNumber, string] & {
success: boolean;
gasUsed: BigNumber;
returnData: string;
})[];
}
>;
};
filters: {};
estimateGas: {
getCurrentBlockTimestamp(overrides?: CallOverrides): Promise<BigNumber>;
getEthBalance(addr: string, overrides?: CallOverrides): Promise<BigNumber>;
multicall(
calls: { target: string; gasLimit: BigNumberish; callData: BytesLike }[],
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
};
populateTransaction: {
getCurrentBlockTimestamp(
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
getEthBalance(
addr: string,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
multicall(
calls: { target: string; gasLimit: BigNumberish; callData: BytesLike }[],
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
};
}

581
_contracts/OffchainOracle.d.ts vendored Normal file
View File

@ -0,0 +1,581 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import {
ethers,
EventFilter,
Signer,
BigNumber,
BigNumberish,
PopulatedTransaction,
BaseContract,
ContractTransaction,
Overrides,
CallOverrides,
} from "ethers";
import { BytesLike } from "@ethersproject/bytes";
import { Listener, Provider } from "@ethersproject/providers";
import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi";
import { TypedEventFilter, TypedEvent, TypedListener } from "./commons";
interface OffchainOracleInterface extends ethers.utils.Interface {
functions: {
"addConnector(address)": FunctionFragment;
"addOracle(address,uint8)": FunctionFragment;
"connectors()": FunctionFragment;
"getRate(address,address,bool)": FunctionFragment;
"getRateToEth(address,bool)": FunctionFragment;
"multiWrapper()": FunctionFragment;
"oracles()": FunctionFragment;
"owner()": FunctionFragment;
"removeConnector(address)": FunctionFragment;
"removeOracle(address,uint8)": FunctionFragment;
"renounceOwnership()": FunctionFragment;
"setMultiWrapper(address)": FunctionFragment;
"transferOwnership(address)": FunctionFragment;
};
encodeFunctionData(
functionFragment: "addConnector",
values: [string]
): string;
encodeFunctionData(
functionFragment: "addOracle",
values: [string, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "connectors",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "getRate",
values: [string, string, boolean]
): string;
encodeFunctionData(
functionFragment: "getRateToEth",
values: [string, boolean]
): string;
encodeFunctionData(
functionFragment: "multiWrapper",
values?: undefined
): string;
encodeFunctionData(functionFragment: "oracles", values?: undefined): string;
encodeFunctionData(functionFragment: "owner", values?: undefined): string;
encodeFunctionData(
functionFragment: "removeConnector",
values: [string]
): string;
encodeFunctionData(
functionFragment: "removeOracle",
values: [string, BigNumberish]
): string;
encodeFunctionData(
functionFragment: "renounceOwnership",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "setMultiWrapper",
values: [string]
): string;
encodeFunctionData(
functionFragment: "transferOwnership",
values: [string]
): string;
decodeFunctionResult(
functionFragment: "addConnector",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "addOracle", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "connectors", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "getRate", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "getRateToEth",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "multiWrapper",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "oracles", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "removeConnector",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "removeOracle",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "renounceOwnership",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "setMultiWrapper",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "transferOwnership",
data: BytesLike
): Result;
events: {
"ConnectorAdded(address)": EventFragment;
"ConnectorRemoved(address)": EventFragment;
"MultiWrapperUpdated(address)": EventFragment;
"OracleAdded(address,uint8)": EventFragment;
"OracleRemoved(address,uint8)": EventFragment;
"OwnershipTransferred(address,address)": EventFragment;
};
getEvent(nameOrSignatureOrTopic: "ConnectorAdded"): EventFragment;
getEvent(nameOrSignatureOrTopic: "ConnectorRemoved"): EventFragment;
getEvent(nameOrSignatureOrTopic: "MultiWrapperUpdated"): EventFragment;
getEvent(nameOrSignatureOrTopic: "OracleAdded"): EventFragment;
getEvent(nameOrSignatureOrTopic: "OracleRemoved"): EventFragment;
getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment;
}
export type ConnectorAddedEvent = TypedEvent<[string] & { connector: string }>;
export type ConnectorRemovedEvent = TypedEvent<
[string] & { connector: string }
>;
export type MultiWrapperUpdatedEvent = TypedEvent<
[string] & { multiWrapper: string }
>;
export type OracleAddedEvent = TypedEvent<
[string, number] & { oracle: string; oracleType: number }
>;
export type OracleRemovedEvent = TypedEvent<
[string, number] & { oracle: string; oracleType: number }
>;
export type OwnershipTransferredEvent = TypedEvent<
[string, string] & { previousOwner: string; newOwner: string }
>;
export class OffchainOracle extends BaseContract {
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
listeners<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter?: TypedEventFilter<EventArgsArray, EventArgsObject>
): Array<TypedListener<EventArgsArray, EventArgsObject>>;
off<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
on<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
once<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
removeListener<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
removeAllListeners<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>
): this;
listeners(eventName?: string): Array<Listener>;
off(eventName: string, listener: Listener): this;
on(eventName: string, listener: Listener): this;
once(eventName: string, listener: Listener): this;
removeListener(eventName: string, listener: Listener): this;
removeAllListeners(eventName?: string): this;
queryFilter<EventArgsArray extends Array<any>, EventArgsObject>(
event: TypedEventFilter<EventArgsArray, EventArgsObject>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEvent<EventArgsArray & EventArgsObject>>>;
interface: OffchainOracleInterface;
functions: {
addConnector(
connector: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
addOracle(
oracle: string,
oracleKind: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
connectors(
overrides?: CallOverrides
): Promise<[string[]] & { allConnectors: string[] }>;
getRate(
srcToken: string,
dstToken: string,
useWrappers: boolean,
overrides?: CallOverrides
): Promise<[BigNumber] & { weightedRate: BigNumber }>;
getRateToEth(
srcToken: string,
useSrcWrappers: boolean,
overrides?: CallOverrides
): Promise<[BigNumber] & { weightedRate: BigNumber }>;
multiWrapper(overrides?: CallOverrides): Promise<[string]>;
oracles(
overrides?: CallOverrides
): Promise<
[string[], number[]] & { allOracles: string[]; oracleTypes: number[] }
>;
owner(overrides?: CallOverrides): Promise<[string]>;
removeConnector(
connector: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
removeOracle(
oracle: string,
oracleKind: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
renounceOwnership(
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
setMultiWrapper(
_multiWrapper: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
transferOwnership(
newOwner: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
};
addConnector(
connector: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
addOracle(
oracle: string,
oracleKind: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
connectors(overrides?: CallOverrides): Promise<string[]>;
getRate(
srcToken: string,
dstToken: string,
useWrappers: boolean,
overrides?: CallOverrides
): Promise<BigNumber>;
getRateToEth(
srcToken: string,
useSrcWrappers: boolean,
overrides?: CallOverrides
): Promise<BigNumber>;
multiWrapper(overrides?: CallOverrides): Promise<string>;
oracles(
overrides?: CallOverrides
): Promise<
[string[], number[]] & { allOracles: string[]; oracleTypes: number[] }
>;
owner(overrides?: CallOverrides): Promise<string>;
removeConnector(
connector: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
removeOracle(
oracle: string,
oracleKind: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
renounceOwnership(
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
setMultiWrapper(
_multiWrapper: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
transferOwnership(
newOwner: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
callStatic: {
addConnector(connector: string, overrides?: CallOverrides): Promise<void>;
addOracle(
oracle: string,
oracleKind: BigNumberish,
overrides?: CallOverrides
): Promise<void>;
connectors(overrides?: CallOverrides): Promise<string[]>;
getRate(
srcToken: string,
dstToken: string,
useWrappers: boolean,
overrides?: CallOverrides
): Promise<BigNumber>;
getRateToEth(
srcToken: string,
useSrcWrappers: boolean,
overrides?: CallOverrides
): Promise<BigNumber>;
multiWrapper(overrides?: CallOverrides): Promise<string>;
oracles(
overrides?: CallOverrides
): Promise<
[string[], number[]] & { allOracles: string[]; oracleTypes: number[] }
>;
owner(overrides?: CallOverrides): Promise<string>;
removeConnector(
connector: string,
overrides?: CallOverrides
): Promise<void>;
removeOracle(
oracle: string,
oracleKind: BigNumberish,
overrides?: CallOverrides
): Promise<void>;
renounceOwnership(overrides?: CallOverrides): Promise<void>;
setMultiWrapper(
_multiWrapper: string,
overrides?: CallOverrides
): Promise<void>;
transferOwnership(
newOwner: string,
overrides?: CallOverrides
): Promise<void>;
};
filters: {
"ConnectorAdded(address)"(
connector?: null
): TypedEventFilter<[string], { connector: string }>;
ConnectorAdded(
connector?: null
): TypedEventFilter<[string], { connector: string }>;
"ConnectorRemoved(address)"(
connector?: null
): TypedEventFilter<[string], { connector: string }>;
ConnectorRemoved(
connector?: null
): TypedEventFilter<[string], { connector: string }>;
"MultiWrapperUpdated(address)"(
multiWrapper?: null
): TypedEventFilter<[string], { multiWrapper: string }>;
MultiWrapperUpdated(
multiWrapper?: null
): TypedEventFilter<[string], { multiWrapper: string }>;
"OracleAdded(address,uint8)"(
oracle?: null,
oracleType?: null
): TypedEventFilter<
[string, number],
{ oracle: string; oracleType: number }
>;
OracleAdded(
oracle?: null,
oracleType?: null
): TypedEventFilter<
[string, number],
{ oracle: string; oracleType: number }
>;
"OracleRemoved(address,uint8)"(
oracle?: null,
oracleType?: null
): TypedEventFilter<
[string, number],
{ oracle: string; oracleType: number }
>;
OracleRemoved(
oracle?: null,
oracleType?: null
): TypedEventFilter<
[string, number],
{ oracle: string; oracleType: number }
>;
"OwnershipTransferred(address,address)"(
previousOwner?: string | null,
newOwner?: string | null
): TypedEventFilter<
[string, string],
{ previousOwner: string; newOwner: string }
>;
OwnershipTransferred(
previousOwner?: string | null,
newOwner?: string | null
): TypedEventFilter<
[string, string],
{ previousOwner: string; newOwner: string }
>;
};
estimateGas: {
addConnector(
connector: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
addOracle(
oracle: string,
oracleKind: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
connectors(overrides?: CallOverrides): Promise<BigNumber>;
getRate(
srcToken: string,
dstToken: string,
useWrappers: boolean,
overrides?: CallOverrides
): Promise<BigNumber>;
getRateToEth(
srcToken: string,
useSrcWrappers: boolean,
overrides?: CallOverrides
): Promise<BigNumber>;
multiWrapper(overrides?: CallOverrides): Promise<BigNumber>;
oracles(overrides?: CallOverrides): Promise<BigNumber>;
owner(overrides?: CallOverrides): Promise<BigNumber>;
removeConnector(
connector: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
removeOracle(
oracle: string,
oracleKind: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
renounceOwnership(
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
setMultiWrapper(
_multiWrapper: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
transferOwnership(
newOwner: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
};
populateTransaction: {
addConnector(
connector: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
addOracle(
oracle: string,
oracleKind: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
connectors(overrides?: CallOverrides): Promise<PopulatedTransaction>;
getRate(
srcToken: string,
dstToken: string,
useWrappers: boolean,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
getRateToEth(
srcToken: string,
useSrcWrappers: boolean,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
multiWrapper(overrides?: CallOverrides): Promise<PopulatedTransaction>;
oracles(overrides?: CallOverrides): Promise<PopulatedTransaction>;
owner(overrides?: CallOverrides): Promise<PopulatedTransaction>;
removeConnector(
connector: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
removeOracle(
oracle: string,
oracleKind: BigNumberish,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
renounceOwnership(
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
setMultiWrapper(
_multiWrapper: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
transferOwnership(
newOwner: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
};
}

2450
_contracts/Omnibridge.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

1038
_contracts/RelayerRegistry.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

370
_contracts/SanctionsList.d.ts vendored Normal file
View File

@ -0,0 +1,370 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import {
ethers,
EventFilter,
Signer,
BigNumber,
BigNumberish,
PopulatedTransaction,
BaseContract,
ContractTransaction,
Overrides,
CallOverrides,
} from "ethers";
import { BytesLike } from "@ethersproject/bytes";
import { Listener, Provider } from "@ethersproject/providers";
import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi";
import { TypedEventFilter, TypedEvent, TypedListener } from "./commons";
interface SanctionsListInterface extends ethers.utils.Interface {
functions: {
"addToSanctionsList(address[])": FunctionFragment;
"isSanctioned(address)": FunctionFragment;
"isSanctionedVerbose(address)": FunctionFragment;
"name()": FunctionFragment;
"owner()": FunctionFragment;
"removeFromSanctionsList(address[])": FunctionFragment;
"renounceOwnership()": FunctionFragment;
"transferOwnership(address)": FunctionFragment;
};
encodeFunctionData(
functionFragment: "addToSanctionsList",
values: [string[]]
): string;
encodeFunctionData(
functionFragment: "isSanctioned",
values: [string]
): string;
encodeFunctionData(
functionFragment: "isSanctionedVerbose",
values: [string]
): string;
encodeFunctionData(functionFragment: "name", values?: undefined): string;
encodeFunctionData(functionFragment: "owner", values?: undefined): string;
encodeFunctionData(
functionFragment: "removeFromSanctionsList",
values: [string[]]
): string;
encodeFunctionData(
functionFragment: "renounceOwnership",
values?: undefined
): string;
encodeFunctionData(
functionFragment: "transferOwnership",
values: [string]
): string;
decodeFunctionResult(
functionFragment: "addToSanctionsList",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "isSanctioned",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "isSanctionedVerbose",
data: BytesLike
): Result;
decodeFunctionResult(functionFragment: "name", data: BytesLike): Result;
decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result;
decodeFunctionResult(
functionFragment: "removeFromSanctionsList",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "renounceOwnership",
data: BytesLike
): Result;
decodeFunctionResult(
functionFragment: "transferOwnership",
data: BytesLike
): Result;
events: {
"NonSanctionedAddress(address)": EventFragment;
"OwnershipTransferred(address,address)": EventFragment;
"SanctionedAddress(address)": EventFragment;
"SanctionedAddressesAdded(address[])": EventFragment;
"SanctionedAddressesRemoved(address[])": EventFragment;
};
getEvent(nameOrSignatureOrTopic: "NonSanctionedAddress"): EventFragment;
getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment;
getEvent(nameOrSignatureOrTopic: "SanctionedAddress"): EventFragment;
getEvent(nameOrSignatureOrTopic: "SanctionedAddressesAdded"): EventFragment;
getEvent(nameOrSignatureOrTopic: "SanctionedAddressesRemoved"): EventFragment;
}
export type NonSanctionedAddressEvent = TypedEvent<[string] & { addr: string }>;
export type OwnershipTransferredEvent = TypedEvent<
[string, string] & { previousOwner: string; newOwner: string }
>;
export type SanctionedAddressEvent = TypedEvent<[string] & { addr: string }>;
export type SanctionedAddressesAddedEvent = TypedEvent<
[string[]] & { addrs: string[] }
>;
export type SanctionedAddressesRemovedEvent = TypedEvent<
[string[]] & { addrs: string[] }
>;
export class SanctionsList extends BaseContract {
connect(signerOrProvider: Signer | Provider | string): this;
attach(addressOrName: string): this;
deployed(): Promise<this>;
listeners<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter?: TypedEventFilter<EventArgsArray, EventArgsObject>
): Array<TypedListener<EventArgsArray, EventArgsObject>>;
off<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
on<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
once<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
removeListener<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
listener: TypedListener<EventArgsArray, EventArgsObject>
): this;
removeAllListeners<EventArgsArray extends Array<any>, EventArgsObject>(
eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>
): this;
listeners(eventName?: string): Array<Listener>;
off(eventName: string, listener: Listener): this;
on(eventName: string, listener: Listener): this;
once(eventName: string, listener: Listener): this;
removeListener(eventName: string, listener: Listener): this;
removeAllListeners(eventName?: string): this;
queryFilter<EventArgsArray extends Array<any>, EventArgsObject>(
event: TypedEventFilter<EventArgsArray, EventArgsObject>,
fromBlockOrBlockhash?: string | number | undefined,
toBlock?: string | number | undefined
): Promise<Array<TypedEvent<EventArgsArray & EventArgsObject>>>;
interface: SanctionsListInterface;
functions: {
addToSanctionsList(
newSanctions: string[],
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
isSanctioned(addr: string, overrides?: CallOverrides): Promise<[boolean]>;
isSanctionedVerbose(
addr: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
name(overrides?: CallOverrides): Promise<[string]>;
owner(overrides?: CallOverrides): Promise<[string]>;
removeFromSanctionsList(
removeSanctions: string[],
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
renounceOwnership(
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
transferOwnership(
newOwner: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
};
addToSanctionsList(
newSanctions: string[],
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
isSanctioned(addr: string, overrides?: CallOverrides): Promise<boolean>;
isSanctionedVerbose(
addr: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
name(overrides?: CallOverrides): Promise<string>;
owner(overrides?: CallOverrides): Promise<string>;
removeFromSanctionsList(
removeSanctions: string[],
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
renounceOwnership(
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
transferOwnership(
newOwner: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<ContractTransaction>;
callStatic: {
addToSanctionsList(
newSanctions: string[],
overrides?: CallOverrides
): Promise<void>;
isSanctioned(addr: string, overrides?: CallOverrides): Promise<boolean>;
isSanctionedVerbose(
addr: string,
overrides?: CallOverrides
): Promise<boolean>;
name(overrides?: CallOverrides): Promise<string>;
owner(overrides?: CallOverrides): Promise<string>;
removeFromSanctionsList(
removeSanctions: string[],
overrides?: CallOverrides
): Promise<void>;
renounceOwnership(overrides?: CallOverrides): Promise<void>;
transferOwnership(
newOwner: string,
overrides?: CallOverrides
): Promise<void>;
};
filters: {
"NonSanctionedAddress(address)"(
addr?: string | null
): TypedEventFilter<[string], { addr: string }>;
NonSanctionedAddress(
addr?: string | null
): TypedEventFilter<[string], { addr: string }>;
"OwnershipTransferred(address,address)"(
previousOwner?: string | null,
newOwner?: string | null
): TypedEventFilter<
[string, string],
{ previousOwner: string; newOwner: string }
>;
OwnershipTransferred(
previousOwner?: string | null,
newOwner?: string | null
): TypedEventFilter<
[string, string],
{ previousOwner: string; newOwner: string }
>;
"SanctionedAddress(address)"(
addr?: string | null
): TypedEventFilter<[string], { addr: string }>;
SanctionedAddress(
addr?: string | null
): TypedEventFilter<[string], { addr: string }>;
"SanctionedAddressesAdded(address[])"(
addrs?: null
): TypedEventFilter<[string[]], { addrs: string[] }>;
SanctionedAddressesAdded(
addrs?: null
): TypedEventFilter<[string[]], { addrs: string[] }>;
"SanctionedAddressesRemoved(address[])"(
addrs?: null
): TypedEventFilter<[string[]], { addrs: string[] }>;
SanctionedAddressesRemoved(
addrs?: null
): TypedEventFilter<[string[]], { addrs: string[] }>;
};
estimateGas: {
addToSanctionsList(
newSanctions: string[],
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
isSanctioned(addr: string, overrides?: CallOverrides): Promise<BigNumber>;
isSanctionedVerbose(
addr: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
name(overrides?: CallOverrides): Promise<BigNumber>;
owner(overrides?: CallOverrides): Promise<BigNumber>;
removeFromSanctionsList(
removeSanctions: string[],
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
renounceOwnership(
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
transferOwnership(
newOwner: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<BigNumber>;
};
populateTransaction: {
addToSanctionsList(
newSanctions: string[],
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
isSanctioned(
addr: string,
overrides?: CallOverrides
): Promise<PopulatedTransaction>;
isSanctionedVerbose(
addr: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
name(overrides?: CallOverrides): Promise<PopulatedTransaction>;
owner(overrides?: CallOverrides): Promise<PopulatedTransaction>;
removeFromSanctionsList(
removeSanctions: string[],
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
renounceOwnership(
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
transferOwnership(
newOwner: string,
overrides?: Overrides & { from?: string | Promise<string> }
): Promise<PopulatedTransaction>;
};
}

1462
_contracts/TornadoPool.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

1283
_contracts/WbnbXdai.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

36
_contracts/commons.ts Normal file
View File

@ -0,0 +1,36 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { EventFilter, Event } from "ethers";
import { Result } from "@ethersproject/abi";
export interface TypedEventFilter<_EventArgsArray, _EventArgsObject>
extends EventFilter {}
export interface TypedEvent<EventArgs extends Result> extends Event {
args: EventArgs;
}
export type TypedListener<
EventArgsArray extends Array<any>,
EventArgsObject
> = (
...listenerArg: [
...EventArgsArray,
TypedEvent<EventArgsArray & EventArgsObject>
]
) => void;
export type MinEthersFactory<C, ARGS> = {
deploy(...a: ARGS[]): Promise<C>;
};
export type GetContractTypeFromFactory<F> = F extends MinEthersFactory<
infer C,
any
>
? C
: never;
export type GetARGsTypeFromFactory<F> = F extends MinEthersFactory<any, any>
? Parameters<F["deploy"]>
: never;

View File

@ -0,0 +1,229 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Contract, Signer, utils } from "ethers";
import { Provider } from "@ethersproject/providers";
import type { Aggregator, AggregatorInterface } from "../Aggregator";
const _abi = [
{
inputs: [],
name: "ensRegistry",
outputs: [
{
internalType: "contract ENSRegistry",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "contract Governance",
name: "governance",
type: "address",
},
],
name: "getAllProposals",
outputs: [
{
components: [
{
internalType: "address",
name: "proposer",
type: "address",
},
{
internalType: "address",
name: "target",
type: "address",
},
{
internalType: "uint256",
name: "startTime",
type: "uint256",
},
{
internalType: "uint256",
name: "endTime",
type: "uint256",
},
{
internalType: "uint256",
name: "forVotes",
type: "uint256",
},
{
internalType: "uint256",
name: "againstVotes",
type: "uint256",
},
{
internalType: "bool",
name: "executed",
type: "bool",
},
{
internalType: "bool",
name: "extended",
type: "bool",
},
{
internalType: "enum Governance.ProposalState",
name: "state",
type: "uint8",
},
],
internalType: "struct GovernanceAggregator.Proposal[]",
name: "proposals",
type: "tuple[]",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "contract Governance",
name: "governance",
type: "address",
},
{
internalType: "address[]",
name: "accs",
type: "address[]",
},
],
name: "getGovernanceBalances",
outputs: [
{
internalType: "uint256[]",
name: "amounts",
type: "uint256[]",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "contract Governance",
name: "governance",
type: "address",
},
{
internalType: "address",
name: "account",
type: "address",
},
],
name: "getUserData",
outputs: [
{
internalType: "uint256",
name: "balance",
type: "uint256",
},
{
internalType: "uint256",
name: "latestProposalId",
type: "uint256",
},
{
internalType: "uint256",
name: "latestProposalIdState",
type: "uint256",
},
{
internalType: "uint256",
name: "timelock",
type: "uint256",
},
{
internalType: "address",
name: "delegatee",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "relayerRegistry",
outputs: [
{
internalType: "contract RelayerRegistry",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "bytes32[]",
name: "_relayers",
type: "bytes32[]",
},
{
internalType: "string[]",
name: "_subdomains",
type: "string[]",
},
],
name: "relayersData",
outputs: [
{
components: [
{
internalType: "address",
name: "owner",
type: "address",
},
{
internalType: "uint256",
name: "balance",
type: "uint256",
},
{
internalType: "bool",
name: "isRegistered",
type: "bool",
},
{
internalType: "string[20]",
name: "records",
type: "string[20]",
},
],
internalType: "struct Relayer[]",
name: "",
type: "tuple[]",
},
],
stateMutability: "view",
type: "function",
},
];
export class Aggregator__factory {
static readonly abi = _abi;
static createInterface(): AggregatorInterface {
return new utils.Interface(_abi) as AggregatorInterface;
}
static connect(
address: string,
signerOrProvider: Signer | Provider
): Aggregator {
return new Contract(address, _abi, signerOrProvider) as Aggregator;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,73 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Contract, Signer, utils } from "ethers";
import { Provider } from "@ethersproject/providers";
import type { BridgeBNB, BridgeBNBInterface } from "../BridgeBNB";
const _abi = [
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "sender",
type: "address",
},
{
indexed: true,
internalType: "address",
name: "executor",
type: "address",
},
{
indexed: true,
internalType: "bytes32",
name: "messageId",
type: "bytes32",
},
{
indexed: false,
internalType: "bool",
name: "status",
type: "bool",
},
],
name: "RelayedMessage",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "bytes32",
name: "messageId",
type: "bytes32",
},
{
indexed: false,
internalType: "bytes",
name: "encodedData",
type: "bytes",
},
],
name: "UserRequestForAffirmation",
type: "event",
},
];
export class BridgeBNB__factory {
static readonly abi = _abi;
static createInterface(): BridgeBNBInterface {
return new utils.Interface(_abi) as BridgeBNBInterface;
}
static connect(
address: string,
signerOrProvider: Signer | Provider
): BridgeBNB {
return new Contract(address, _abi, signerOrProvider) as BridgeBNB;
}
}

View File

@ -0,0 +1,261 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Contract, Signer, utils } from "ethers";
import { Provider } from "@ethersproject/providers";
import type {
BscBridgeHelper,
BscBridgeHelperInterface,
} from "../BscBridgeHelper";
const _abi = [
{
inputs: [
{
internalType: "contract IOmnibridge",
name: "_bridge",
type: "address",
},
{
internalType: "contract IWETH",
name: "_weth",
type: "address",
},
{
internalType: "address",
name: "_owner",
type: "address",
},
],
stateMutability: "nonpayable",
type: "constructor",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "owner",
type: "address",
},
{
indexed: false,
internalType: "bytes",
name: "key",
type: "bytes",
},
],
name: "PublicKey",
type: "event",
},
{
inputs: [],
name: "WETH",
outputs: [
{
internalType: "contract IWETH",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "bridge",
outputs: [
{
internalType: "contract IOmnibridge",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "_token",
type: "address",
},
{
internalType: "address",
name: "_to",
type: "address",
},
],
name: "claimTokens",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "_token",
type: "address",
},
{
internalType: "uint256",
name: "_value",
type: "uint256",
},
{
internalType: "bytes",
name: "_data",
type: "bytes",
},
],
name: "onTokenBridged",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "owner",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
components: [
{
internalType: "address",
name: "owner",
type: "address",
},
{
internalType: "bytes",
name: "publicKey",
type: "bytes",
},
],
internalType: "struct L1Helper.Account",
name: "_account",
type: "tuple",
},
],
name: "register",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "_newOwner",
type: "address",
},
],
name: "transferOwnership",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "wrapAndRelayTokens",
outputs: [],
stateMutability: "payable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "_receiver",
type: "address",
},
{
internalType: "bytes",
name: "_data",
type: "bytes",
},
],
name: "wrapAndRelayTokens",
outputs: [],
stateMutability: "payable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "_receiver",
type: "address",
},
{
internalType: "bytes",
name: "_data",
type: "bytes",
},
{
components: [
{
internalType: "address",
name: "owner",
type: "address",
},
{
internalType: "bytes",
name: "publicKey",
type: "bytes",
},
],
internalType: "struct L1Helper.Account",
name: "_account",
type: "tuple",
},
],
name: "wrapAndRelayTokens",
outputs: [],
stateMutability: "payable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "_receiver",
type: "address",
},
],
name: "wrapAndRelayTokens",
outputs: [],
stateMutability: "payable",
type: "function",
},
{
stateMutability: "payable",
type: "receive",
},
];
export class BscBridgeHelper__factory {
static readonly abi = _abi;
static createInterface(): BscBridgeHelperInterface {
return new utils.Interface(_abi) as BscBridgeHelperInterface;
}
static connect(
address: string,
signerOrProvider: Signer | Provider
): BscBridgeHelper {
return new Contract(address, _abi, signerOrProvider) as BscBridgeHelper;
}
}

View File

@ -0,0 +1,102 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Contract, Signer, utils } from "ethers";
import { Provider } from "@ethersproject/providers";
import type { FeeManager, FeeManagerInterface } from "../FeeManager";
const _abi = [
{
type: "function",
stateMutability: "view",
outputs: [
{
type: "bytes32",
name: "",
internalType: "bytes32",
},
],
name: "FOREIGN_TO_HOME_FEE",
inputs: [],
},
{
type: "function",
stateMutability: "view",
outputs: [
{
type: "bytes32",
name: "",
internalType: "bytes32",
},
],
name: "HOME_TO_FOREIGN_FEE",
inputs: [],
},
{
type: "function",
stateMutability: "view",
outputs: [
{
type: "uint256",
name: "",
internalType: "uint256",
},
],
name: "calculateFee",
inputs: [
{
type: "bytes32",
name: "_feeType",
internalType: "bytes32",
},
{
type: "address",
name: "_token",
internalType: "address",
},
{
type: "uint256",
name: "_value",
internalType: "uint256",
},
],
},
{
type: "function",
stateMutability: "view",
outputs: [
{
type: "uint256",
name: "",
internalType: "uint256",
},
],
name: "getFee",
inputs: [
{
type: "bytes32",
name: "_feeType",
internalType: "bytes32",
},
{
type: "address",
name: "_token",
internalType: "address",
},
],
},
];
export class FeeManager__factory {
static readonly abi = _abi;
static createInterface(): FeeManagerInterface {
return new utils.Interface(_abi) as FeeManagerInterface;
}
static connect(
address: string,
signerOrProvider: Signer | Provider
): FeeManager {
return new Contract(address, _abi, signerOrProvider) as FeeManager;
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,113 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Contract, Signer, utils } from "ethers";
import { Provider } from "@ethersproject/providers";
import type { Multicall, MulticallInterface } from "../Multicall";
const _abi = [
{
inputs: [],
name: "getCurrentBlockTimestamp",
outputs: [
{
internalType: "uint256",
name: "timestamp",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "addr",
type: "address",
},
],
name: "getEthBalance",
outputs: [
{
internalType: "uint256",
name: "balance",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
components: [
{
internalType: "address",
name: "target",
type: "address",
},
{
internalType: "uint256",
name: "gasLimit",
type: "uint256",
},
{
internalType: "bytes",
name: "callData",
type: "bytes",
},
],
internalType: "struct UniswapInterfaceMulticall.Call[]",
name: "calls",
type: "tuple[]",
},
],
name: "multicall",
outputs: [
{
internalType: "uint256",
name: "blockNumber",
type: "uint256",
},
{
components: [
{
internalType: "bool",
name: "success",
type: "bool",
},
{
internalType: "uint256",
name: "gasUsed",
type: "uint256",
},
{
internalType: "bytes",
name: "returnData",
type: "bytes",
},
],
internalType: "struct UniswapInterfaceMulticall.Result[]",
name: "returnData",
type: "tuple[]",
},
],
stateMutability: "nonpayable",
type: "function",
},
];
export class Multicall__factory {
static readonly abi = _abi;
static createInterface(): MulticallInterface {
return new utils.Interface(_abi) as MulticallInterface;
}
static connect(
address: string,
signerOrProvider: Signer | Provider
): Multicall {
return new Contract(address, _abi, signerOrProvider) as Multicall;
}
}

View File

@ -0,0 +1,358 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Contract, Signer, utils } from "ethers";
import { Provider } from "@ethersproject/providers";
import type {
OffchainOracle,
OffchainOracleInterface,
} from "../OffchainOracle";
const _abi = [
{
inputs: [
{
internalType: "contract MultiWrapper",
name: "_multiWrapper",
type: "address",
},
{
internalType: "contract IOracle[]",
name: "existingOracles",
type: "address[]",
},
{
internalType: "enum OffchainOracle.OracleType[]",
name: "oracleTypes",
type: "uint8[]",
},
{
internalType: "contract IERC20[]",
name: "existingConnectors",
type: "address[]",
},
{
internalType: "contract IERC20",
name: "wBase",
type: "address",
},
],
stateMutability: "nonpayable",
type: "constructor",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "contract IERC20",
name: "connector",
type: "address",
},
],
name: "ConnectorAdded",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "contract IERC20",
name: "connector",
type: "address",
},
],
name: "ConnectorRemoved",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "contract MultiWrapper",
name: "multiWrapper",
type: "address",
},
],
name: "MultiWrapperUpdated",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "contract IOracle",
name: "oracle",
type: "address",
},
{
indexed: false,
internalType: "enum OffchainOracle.OracleType",
name: "oracleType",
type: "uint8",
},
],
name: "OracleAdded",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "contract IOracle",
name: "oracle",
type: "address",
},
{
indexed: false,
internalType: "enum OffchainOracle.OracleType",
name: "oracleType",
type: "uint8",
},
],
name: "OracleRemoved",
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",
},
{
inputs: [
{
internalType: "contract IERC20",
name: "connector",
type: "address",
},
],
name: "addConnector",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "contract IOracle",
name: "oracle",
type: "address",
},
{
internalType: "enum OffchainOracle.OracleType",
name: "oracleKind",
type: "uint8",
},
],
name: "addOracle",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "connectors",
outputs: [
{
internalType: "contract IERC20[]",
name: "allConnectors",
type: "address[]",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "contract IERC20",
name: "srcToken",
type: "address",
},
{
internalType: "contract IERC20",
name: "dstToken",
type: "address",
},
{
internalType: "bool",
name: "useWrappers",
type: "bool",
},
],
name: "getRate",
outputs: [
{
internalType: "uint256",
name: "weightedRate",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "contract IERC20",
name: "srcToken",
type: "address",
},
{
internalType: "bool",
name: "useSrcWrappers",
type: "bool",
},
],
name: "getRateToEth",
outputs: [
{
internalType: "uint256",
name: "weightedRate",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "multiWrapper",
outputs: [
{
internalType: "contract MultiWrapper",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "oracles",
outputs: [
{
internalType: "contract IOracle[]",
name: "allOracles",
type: "address[]",
},
{
internalType: "enum OffchainOracle.OracleType[]",
name: "oracleTypes",
type: "uint8[]",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "owner",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "contract IERC20",
name: "connector",
type: "address",
},
],
name: "removeConnector",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "contract IOracle",
name: "oracle",
type: "address",
},
{
internalType: "enum OffchainOracle.OracleType",
name: "oracleKind",
type: "uint8",
},
],
name: "removeOracle",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "renounceOwnership",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "contract MultiWrapper",
name: "_multiWrapper",
type: "address",
},
],
name: "setMultiWrapper",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "newOwner",
type: "address",
},
],
name: "transferOwnership",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
];
export class OffchainOracle__factory {
static readonly abi = _abi;
static createInterface(): OffchainOracleInterface {
return new utils.Interface(_abi) as OffchainOracleInterface;
}
static connect(
address: string,
signerOrProvider: Signer | Provider
): OffchainOracle {
return new Contract(address, _abi, signerOrProvider) as OffchainOracle;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,694 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Contract, Signer, utils } from "ethers";
import { Provider } from "@ethersproject/providers";
import type {
RelayerRegistry,
RelayerRegistryInterface,
} from "../RelayerRegistry";
const _abi = [
{
inputs: [
{
internalType: "address",
name: "_torn",
type: "address",
},
{
internalType: "address",
name: "_governance",
type: "address",
},
{
internalType: "address",
name: "_ens",
type: "address",
},
{
internalType: "bytes32",
name: "_staking",
type: "bytes32",
},
{
internalType: "bytes32",
name: "_feeManager",
type: "bytes32",
},
],
stateMutability: "nonpayable",
type: "constructor",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "uint256",
name: "minStakeAmount",
type: "uint256",
},
],
name: "MinimumStakeAmount",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "relayer",
type: "address",
},
],
name: "RelayerBalanceNullified",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "bytes32",
name: "relayer",
type: "bytes32",
},
{
indexed: false,
internalType: "string",
name: "ensName",
type: "string",
},
{
indexed: false,
internalType: "address",
name: "relayerAddress",
type: "address",
},
{
indexed: false,
internalType: "uint256",
name: "stakedAmount",
type: "uint256",
},
],
name: "RelayerRegistered",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "tornadoRouter",
type: "address",
},
],
name: "RouterRegistered",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "relayer",
type: "address",
},
{
indexed: false,
internalType: "uint256",
name: "amountStakeAdded",
type: "uint256",
},
],
name: "StakeAddedToRelayer",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "relayer",
type: "address",
},
{
indexed: false,
internalType: "uint256",
name: "amountBurned",
type: "uint256",
},
],
name: "StakeBurned",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "relayer",
type: "address",
},
{
indexed: false,
internalType: "address",
name: "worker",
type: "address",
},
],
name: "WorkerRegistered",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "relayer",
type: "address",
},
{
indexed: false,
internalType: "address",
name: "worker",
type: "address",
},
],
name: "WorkerUnregistered",
type: "event",
},
{
inputs: [
{
internalType: "bytes32[]",
name: "domains",
type: "bytes32[]",
},
],
name: "bulkResolve",
outputs: [
{
internalType: "address[]",
name: "result",
type: "address[]",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "sender",
type: "address",
},
{
internalType: "address",
name: "relayer",
type: "address",
},
{
internalType: "contract ITornadoInstance",
name: "pool",
type: "address",
},
],
name: "burn",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "ens",
outputs: [
{
internalType: "contract IENS",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "feeManager",
outputs: [
{
internalType: "contract FeeManager",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "relayer",
type: "address",
},
],
name: "getRelayerBalance",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "relayer",
type: "address",
},
],
name: "getRelayerEnsHash",
outputs: [
{
internalType: "bytes32",
name: "",
type: "bytes32",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "governance",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "bytes32",
name: "_tornadoRouter",
type: "bytes32",
},
],
name: "initialize",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "toResolve",
type: "address",
},
],
name: "isRelayer",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "relayer",
type: "address",
},
{
internalType: "address",
name: "toResolve",
type: "address",
},
],
name: "isRelayerRegistered",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "minStakeAmount",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "relayer",
type: "address",
},
],
name: "nullifyBalance",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "string",
name: "ensName",
type: "string",
},
{
internalType: "uint256",
name: "stake",
type: "uint256",
},
{
internalType: "address[]",
name: "workersToRegister",
type: "address[]",
},
],
name: "register",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "string",
name: "ensName",
type: "string",
},
{
internalType: "uint256",
name: "stake",
type: "uint256",
},
{
internalType: "address[]",
name: "workersToRegister",
type: "address[]",
},
{
internalType: "address",
name: "relayer",
type: "address",
},
{
internalType: "uint256",
name: "deadline",
type: "uint256",
},
{
internalType: "uint8",
name: "v",
type: "uint8",
},
{
internalType: "bytes32",
name: "r",
type: "bytes32",
},
{
internalType: "bytes32",
name: "s",
type: "bytes32",
},
],
name: "registerPermit",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "relayer",
type: "address",
},
{
internalType: "address",
name: "worker",
type: "address",
},
],
name: "registerWorker",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
name: "relayers",
outputs: [
{
internalType: "uint256",
name: "balance",
type: "uint256",
},
{
internalType: "bytes32",
name: "ensHash",
type: "bytes32",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "bytes32",
name: "node",
type: "bytes32",
},
],
name: "resolve",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "uint256",
name: "minAmount",
type: "uint256",
},
],
name: "setMinStakeAmount",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "tornadoRouterAddress",
type: "address",
},
],
name: "setTornadoRouter",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "relayer",
type: "address",
},
{
internalType: "uint256",
name: "stake",
type: "uint256",
},
],
name: "stakeToRelayer",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "relayer",
type: "address",
},
{
internalType: "uint256",
name: "stake",
type: "uint256",
},
{
internalType: "address",
name: "staker",
type: "address",
},
{
internalType: "uint256",
name: "deadline",
type: "uint256",
},
{
internalType: "uint8",
name: "v",
type: "uint8",
},
{
internalType: "bytes32",
name: "r",
type: "bytes32",
},
{
internalType: "bytes32",
name: "s",
type: "bytes32",
},
],
name: "stakeToRelayerPermit",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "staking",
outputs: [
{
internalType: "contract ITornadoStakingRewards",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "torn",
outputs: [
{
internalType: "contract TORN",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "tornadoRouter",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "worker",
type: "address",
},
],
name: "unregisterWorker",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
name: "workers",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
];
export class RelayerRegistry__factory {
static readonly abi = _abi;
static createInterface(): RelayerRegistryInterface {
return new utils.Interface(_abi) as RelayerRegistryInterface;
}
static connect(
address: string,
signerOrProvider: Signer | Provider
): RelayerRegistry {
return new Contract(address, _abi, signerOrProvider) as RelayerRegistry;
}
}

View File

@ -0,0 +1,209 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Contract, Signer, utils } from "ethers";
import { Provider } from "@ethersproject/providers";
import type { SanctionsList, SanctionsListInterface } from "../SanctionsList";
const _abi = [
{
inputs: [],
stateMutability: "nonpayable",
type: "constructor",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "addr",
type: "address",
},
],
name: "NonSanctionedAddress",
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: "address",
name: "addr",
type: "address",
},
],
name: "SanctionedAddress",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address[]",
name: "addrs",
type: "address[]",
},
],
name: "SanctionedAddressesAdded",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address[]",
name: "addrs",
type: "address[]",
},
],
name: "SanctionedAddressesRemoved",
type: "event",
},
{
inputs: [
{
internalType: "address[]",
name: "newSanctions",
type: "address[]",
},
],
name: "addToSanctionsList",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "addr",
type: "address",
},
],
name: "isSanctioned",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "addr",
type: "address",
},
],
name: "isSanctionedVerbose",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "name",
outputs: [
{
internalType: "string",
name: "",
type: "string",
},
],
stateMutability: "pure",
type: "function",
},
{
inputs: [],
name: "owner",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address[]",
name: "removeSanctions",
type: "address[]",
},
],
name: "removeFromSanctionsList",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "renounceOwnership",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "newOwner",
type: "address",
},
],
name: "transferOwnership",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
];
export class SanctionsList__factory {
static readonly abi = _abi;
static createInterface(): SanctionsListInterface {
return new utils.Interface(_abi) as SanctionsListInterface;
}
static connect(
address: string,
signerOrProvider: Signer | Provider
): SanctionsList {
return new Contract(address, _abi, signerOrProvider) as SanctionsList;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,849 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Contract, Signer, utils } from "ethers";
import { Provider } from "@ethersproject/providers";
import type { WbnbXdai, WbnbXdaiInterface } from "../WbnbXdai";
const _abi = [
{
type: "function",
stateMutability: "view",
payable: false,
outputs: [
{
type: "bool",
name: "",
},
],
name: "mintingFinished",
inputs: [],
constant: true,
},
{
type: "function",
stateMutability: "view",
payable: false,
outputs: [
{
type: "string",
name: "",
},
],
name: "name",
inputs: [],
constant: true,
},
{
type: "function",
stateMutability: "nonpayable",
payable: false,
outputs: [
{
type: "bool",
name: "result",
},
],
name: "approve",
inputs: [
{
type: "address",
name: "_to",
},
{
type: "uint256",
name: "_value",
},
],
constant: false,
},
{
type: "function",
stateMutability: "nonpayable",
payable: false,
outputs: [],
name: "setBridgeContract",
inputs: [
{
type: "address",
name: "_bridgeContract",
},
],
constant: false,
},
{
type: "function",
stateMutability: "view",
payable: false,
outputs: [
{
type: "uint256",
name: "",
},
],
name: "totalSupply",
inputs: [],
constant: true,
},
{
type: "function",
stateMutability: "nonpayable",
payable: false,
outputs: [
{
type: "bool",
name: "",
},
],
name: "transferFrom",
inputs: [
{
type: "address",
name: "_sender",
},
{
type: "address",
name: "_recipient",
},
{
type: "uint256",
name: "_amount",
},
],
constant: false,
},
{
type: "function",
stateMutability: "view",
payable: false,
outputs: [
{
type: "bytes32",
name: "",
},
],
name: "PERMIT_TYPEHASH",
inputs: [],
constant: true,
},
{
type: "function",
stateMutability: "view",
payable: false,
outputs: [
{
type: "uint8",
name: "",
},
],
name: "decimals",
inputs: [],
constant: true,
},
{
type: "function",
stateMutability: "view",
payable: false,
outputs: [
{
type: "bytes32",
name: "",
},
],
name: "DOMAIN_SEPARATOR",
inputs: [],
constant: true,
},
{
type: "function",
stateMutability: "nonpayable",
payable: false,
outputs: [
{
type: "bool",
name: "result",
},
],
name: "increaseAllowance",
inputs: [
{
type: "address",
name: "_to",
},
{
type: "uint256",
name: "_addedValue",
},
],
constant: false,
},
{
type: "function",
stateMutability: "nonpayable",
payable: false,
outputs: [
{
type: "bool",
name: "",
},
],
name: "transferAndCall",
inputs: [
{
type: "address",
name: "_to",
},
{
type: "uint256",
name: "_value",
},
{
type: "bytes",
name: "_data",
},
],
constant: false,
},
{
type: "function",
stateMutability: "nonpayable",
payable: false,
outputs: [
{
type: "bool",
name: "",
},
],
name: "mint",
inputs: [
{
type: "address",
name: "_to",
},
{
type: "uint256",
name: "_amount",
},
],
constant: false,
},
{
type: "function",
stateMutability: "nonpayable",
payable: false,
outputs: [],
name: "burn",
inputs: [
{
type: "uint256",
name: "_value",
},
],
constant: false,
},
{
type: "function",
stateMutability: "view",
payable: false,
outputs: [
{
type: "string",
name: "",
},
],
name: "version",
inputs: [],
constant: true,
},
{
type: "function",
stateMutability: "nonpayable",
payable: false,
outputs: [
{
type: "bool",
name: "",
},
],
name: "decreaseApproval",
inputs: [
{
type: "address",
name: "_spender",
},
{
type: "uint256",
name: "_subtractedValue",
},
],
constant: false,
},
{
type: "function",
stateMutability: "nonpayable",
payable: false,
outputs: [],
name: "claimTokens",
inputs: [
{
type: "address",
name: "_token",
},
{
type: "address",
name: "_to",
},
],
constant: false,
},
{
type: "function",
stateMutability: "view",
payable: false,
outputs: [
{
type: "uint256",
name: "",
},
],
name: "balanceOf",
inputs: [
{
type: "address",
name: "_owner",
},
],
constant: true,
},
{
type: "function",
stateMutability: "nonpayable",
payable: false,
outputs: [],
name: "renounceOwnership",
inputs: [],
constant: false,
},
{
type: "function",
stateMutability: "view",
payable: false,
outputs: [
{
type: "bool",
name: "",
},
],
name: "isBridge",
inputs: [
{
type: "address",
name: "_address",
},
],
constant: true,
},
{
type: "function",
stateMutability: "nonpayable",
payable: false,
outputs: [
{
type: "bool",
name: "",
},
],
name: "finishMinting",
inputs: [],
constant: false,
},
{
type: "function",
stateMutability: "view",
payable: false,
outputs: [
{
type: "uint256",
name: "",
},
],
name: "nonces",
inputs: [
{
type: "address",
name: "",
},
],
constant: true,
},
{
type: "function",
stateMutability: "pure",
payable: false,
outputs: [
{
type: "uint64",
name: "major",
},
{
type: "uint64",
name: "minor",
},
{
type: "uint64",
name: "patch",
},
],
name: "getTokenInterfacesVersion",
inputs: [],
constant: true,
},
{
type: "function",
stateMutability: "view",
payable: false,
outputs: [
{
type: "address",
name: "",
},
],
name: "owner",
inputs: [],
constant: true,
},
{
type: "function",
stateMutability: "nonpayable",
payable: false,
outputs: [],
name: "permit",
inputs: [
{
type: "address",
name: "_holder",
},
{
type: "address",
name: "_spender",
},
{
type: "uint256",
name: "_nonce",
},
{
type: "uint256",
name: "_expiry",
},
{
type: "bool",
name: "_allowed",
},
{
type: "uint8",
name: "_v",
},
{
type: "bytes32",
name: "_r",
},
{
type: "bytes32",
name: "_s",
},
],
constant: false,
},
{
type: "function",
stateMutability: "view",
payable: false,
outputs: [
{
type: "string",
name: "",
},
],
name: "symbol",
inputs: [],
constant: true,
},
{
type: "function",
stateMutability: "nonpayable",
payable: false,
outputs: [
{
type: "bool",
name: "",
},
],
name: "decreaseAllowance",
inputs: [
{
type: "address",
name: "spender",
},
{
type: "uint256",
name: "subtractedValue",
},
],
constant: false,
},
{
type: "function",
stateMutability: "nonpayable",
payable: false,
outputs: [
{
type: "bool",
name: "",
},
],
name: "transfer",
inputs: [
{
type: "address",
name: "_to",
},
{
type: "uint256",
name: "_value",
},
],
constant: false,
},
{
type: "function",
stateMutability: "nonpayable",
payable: false,
outputs: [],
name: "push",
inputs: [
{
type: "address",
name: "_to",
},
{
type: "uint256",
name: "_amount",
},
],
constant: false,
},
{
type: "function",
stateMutability: "nonpayable",
payable: false,
outputs: [],
name: "move",
inputs: [
{
type: "address",
name: "_from",
},
{
type: "address",
name: "_to",
},
{
type: "uint256",
name: "_amount",
},
],
constant: false,
},
{
type: "function",
stateMutability: "view",
payable: false,
outputs: [
{
type: "address",
name: "",
},
],
name: "bridgeContract",
inputs: [],
constant: true,
},
{
type: "function",
stateMutability: "nonpayable",
payable: false,
outputs: [
{
type: "bool",
name: "",
},
],
name: "increaseApproval",
inputs: [
{
type: "address",
name: "_spender",
},
{
type: "uint256",
name: "_addedValue",
},
],
constant: false,
},
{
type: "function",
stateMutability: "view",
payable: false,
outputs: [
{
type: "uint256",
name: "",
},
],
name: "allowance",
inputs: [
{
type: "address",
name: "_owner",
},
{
type: "address",
name: "_spender",
},
],
constant: true,
},
{
type: "function",
stateMutability: "nonpayable",
payable: false,
outputs: [],
name: "pull",
inputs: [
{
type: "address",
name: "_from",
},
{
type: "uint256",
name: "_amount",
},
],
constant: false,
},
{
type: "function",
stateMutability: "nonpayable",
payable: false,
outputs: [],
name: "transferOwnership",
inputs: [
{
type: "address",
name: "_newOwner",
},
],
constant: false,
},
{
type: "function",
stateMutability: "view",
payable: false,
outputs: [
{
type: "uint256",
name: "",
},
],
name: "expirations",
inputs: [
{
type: "address",
name: "",
},
{
type: "address",
name: "",
},
],
constant: true,
},
{
type: "constructor",
stateMutability: "nonpayable",
payable: false,
inputs: [
{
type: "string",
name: "_name",
},
{
type: "string",
name: "_symbol",
},
{
type: "uint8",
name: "_decimals",
},
{
type: "uint256",
name: "_chainId",
},
],
},
{
type: "event",
name: "Mint",
inputs: [
{
type: "address",
name: "to",
indexed: true,
},
{
type: "uint256",
name: "amount",
indexed: false,
},
],
anonymous: false,
},
{
type: "event",
name: "MintFinished",
inputs: [],
anonymous: false,
},
{
type: "event",
name: "OwnershipRenounced",
inputs: [
{
type: "address",
name: "previousOwner",
indexed: true,
},
],
anonymous: false,
},
{
type: "event",
name: "OwnershipTransferred",
inputs: [
{
type: "address",
name: "previousOwner",
indexed: true,
},
{
type: "address",
name: "newOwner",
indexed: true,
},
],
anonymous: false,
},
{
type: "event",
name: "Burn",
inputs: [
{
type: "address",
name: "burner",
indexed: true,
},
{
type: "uint256",
name: "value",
indexed: false,
},
],
anonymous: false,
},
{
type: "event",
name: "Transfer",
inputs: [
{
type: "address",
name: "from",
indexed: true,
},
{
type: "address",
name: "to",
indexed: true,
},
{
type: "uint256",
name: "value",
indexed: false,
},
{
type: "bytes",
name: "data",
indexed: false,
},
],
anonymous: false,
},
{
type: "event",
name: "Approval",
inputs: [
{
type: "address",
name: "owner",
indexed: true,
},
{
type: "address",
name: "spender",
indexed: true,
},
{
type: "uint256",
name: "value",
indexed: false,
},
],
anonymous: false,
},
{
type: "event",
name: "Transfer",
inputs: [
{
type: "address",
name: "from",
indexed: true,
},
{
type: "address",
name: "to",
indexed: true,
},
{
type: "uint256",
name: "value",
indexed: false,
},
],
anonymous: false,
},
];
export class WbnbXdai__factory {
static readonly abi = _abi;
static createInterface(): WbnbXdaiInterface {
return new utils.Interface(_abi) as WbnbXdaiInterface;
}
static connect(
address: string,
signerOrProvider: Signer | Provider
): WbnbXdai {
return new Contract(address, _abi, signerOrProvider) as WbnbXdai;
}
}

30
_contracts/index.ts Normal file
View File

@ -0,0 +1,30 @@
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
export type { Aggregator } from "./Aggregator";
export type { AmbBridge } from "./AmbBridge";
export type { BridgeBNB } from "./BridgeBNB";
export type { BscBridgeHelper } from "./BscBridgeHelper";
export type { FeeManager } from "./FeeManager";
export type { ForeignOmnibridge } from "./ForeignOmnibridge";
export type { Multicall } from "./Multicall";
export type { OffchainOracle } from "./OffchainOracle";
export type { Omnibridge } from "./Omnibridge";
export type { RelayerRegistry } from "./RelayerRegistry";
export type { SanctionsList } from "./SanctionsList";
export type { TornadoPool } from "./TornadoPool";
export type { WbnbXdai } from "./WbnbXdai";
export { Aggregator__factory } from "./factories/Aggregator__factory";
export { AmbBridge__factory } from "./factories/AmbBridge__factory";
export { BridgeBNB__factory } from "./factories/BridgeBNB__factory";
export { BscBridgeHelper__factory } from "./factories/BscBridgeHelper__factory";
export { FeeManager__factory } from "./factories/FeeManager__factory";
export { ForeignOmnibridge__factory } from "./factories/ForeignOmnibridge__factory";
export { Multicall__factory } from "./factories/Multicall__factory";
export { OffchainOracle__factory } from "./factories/OffchainOracle__factory";
export { Omnibridge__factory } from "./factories/Omnibridge__factory";
export { RelayerRegistry__factory } from "./factories/RelayerRegistry__factory";
export { SanctionsList__factory } from "./factories/SanctionsList__factory";
export { TornadoPool__factory } from "./factories/TornadoPool__factory";
export { WbnbXdai__factory } from "./factories/WbnbXdai__factory";

208
abi/Aggregator.json Normal file
View File

@ -0,0 +1,208 @@
[
{
"inputs": [],
"name": "ensRegistry",
"outputs": [
{
"internalType": "contract ENSRegistry",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract Governance",
"name": "governance",
"type": "address"
}
],
"name": "getAllProposals",
"outputs": [
{
"components": [
{
"internalType": "address",
"name": "proposer",
"type": "address"
},
{
"internalType": "address",
"name": "target",
"type": "address"
},
{
"internalType": "uint256",
"name": "startTime",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "endTime",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "forVotes",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "againstVotes",
"type": "uint256"
},
{
"internalType": "bool",
"name": "executed",
"type": "bool"
},
{
"internalType": "bool",
"name": "extended",
"type": "bool"
},
{
"internalType": "enum Governance.ProposalState",
"name": "state",
"type": "uint8"
}
],
"internalType": "struct GovernanceAggregator.Proposal[]",
"name": "proposals",
"type": "tuple[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract Governance",
"name": "governance",
"type": "address"
},
{
"internalType": "address[]",
"name": "accs",
"type": "address[]"
}
],
"name": "getGovernanceBalances",
"outputs": [
{
"internalType": "uint256[]",
"name": "amounts",
"type": "uint256[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract Governance",
"name": "governance",
"type": "address"
},
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "getUserData",
"outputs": [
{
"internalType": "uint256",
"name": "balance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "latestProposalId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "latestProposalIdState",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "timelock",
"type": "uint256"
},
{
"internalType": "address",
"name": "delegatee",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "relayerRegistry",
"outputs": [
{
"internalType": "contract RelayerRegistry",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32[]",
"name": "_relayers",
"type": "bytes32[]"
},
{
"internalType": "string[]",
"name": "_subdomains",
"type": "string[]"
}
],
"name": "relayersData",
"outputs": [
{
"components": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "uint256",
"name": "balance",
"type": "uint256"
},
{
"internalType": "bool",
"name": "isRegistered",
"type": "bool"
},
{
"internalType": "string[20]",
"name": "records",
"type": "string[20]"
}
],
"internalType": "struct Relayer[]",
"name": "",
"type": "tuple[]"
}
],
"stateMutability": "view",
"type": "function"
}
]

568
abi/AmbBridge.json Normal file
View File

@ -0,0 +1,568 @@
[
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [{ "type": "bytes32", "name": "" }],
"name": "transactionHash",
"inputs": [],
"constant": true
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [{ "type": "uint256", "name": "" }],
"name": "numMessagesSigned",
"inputs": [{ "type": "bytes32", "name": "_message" }],
"constant": true
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [],
"name": "confirmInformation",
"inputs": [
{ "type": "bytes32", "name": "_messageId" },
{ "type": "bool", "name": "_status" },
{ "type": "bytes", "name": "_result" }
],
"constant": false
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [{ "type": "uint256", "name": "" }],
"name": "sourceChainId",
"inputs": [],
"constant": true
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [{ "type": "bytes32", "name": "" }],
"name": "_sendMessage",
"inputs": [
{ "type": "address", "name": "_contract" },
{ "type": "bytes", "name": "_data" },
{ "type": "uint256", "name": "_gas" },
{ "type": "uint256", "name": "_dataType" }
],
"constant": false
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [{ "type": "bytes", "name": "" }],
"name": "signature",
"inputs": [
{ "type": "bytes32", "name": "_hash" },
{ "type": "uint256", "name": "_index" }
],
"constant": true
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [{ "type": "bool", "name": "" }],
"name": "initialize",
"inputs": [
{ "type": "uint256", "name": "_sourceChainId" },
{ "type": "uint256", "name": "_destinationChainId" },
{ "type": "address", "name": "_validatorContract" },
{ "type": "uint256", "name": "_maxGasPerTx" },
{ "type": "uint256", "name": "_gasPrice" },
{ "type": "uint256", "name": "_requiredBlockConfirmations" },
{ "type": "address", "name": "_owner" }
],
"constant": false
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [{ "type": "bool", "name": "" }],
"name": "isInitialized",
"inputs": [],
"constant": true
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [{ "type": "uint256", "name": "" }],
"name": "requiredBlockConfirmations",
"inputs": [],
"constant": true
},
{
"type": "function",
"stateMutability": "pure",
"payable": false,
"outputs": [{ "type": "uint256", "name": "gas" }],
"name": "getMinimumGasUsage",
"inputs": [{ "type": "bytes", "name": "_data" }],
"constant": true
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [{ "type": "address", "name": "" }],
"name": "failedMessageReceiver",
"inputs": [{ "type": "bytes32", "name": "_messageId" }],
"constant": true
},
{
"type": "function",
"stateMutability": "pure",
"payable": false,
"outputs": [{ "type": "bytes4", "name": "_data" }],
"name": "getBridgeMode",
"inputs": [],
"constant": true
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [],
"name": "setChainIds",
"inputs": [
{ "type": "uint256", "name": "_sourceChainId" },
{ "type": "uint256", "name": "_destinationChainId" }
],
"constant": false
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [{ "type": "bytes", "name": "" }],
"name": "message",
"inputs": [{ "type": "bytes32", "name": "_hash" }],
"constant": true
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [{ "type": "address", "name": "" }],
"name": "failedMessageSender",
"inputs": [{ "type": "bytes32", "name": "_messageId" }],
"constant": true
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [{ "type": "bool", "name": "" }],
"name": "allowReentrantRequests",
"inputs": [],
"constant": true
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [{ "type": "bytes32", "name": "" }],
"name": "requireToGetInformation",
"inputs": [
{ "type": "bytes32", "name": "_requestSelector" },
{ "type": "bytes", "name": "_data" }
],
"constant": false
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [],
"name": "submitSignature",
"inputs": [
{ "type": "bytes", "name": "signature" },
{ "type": "bytes", "name": "message" }
],
"constant": false
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [{ "type": "bytes32", "name": "id" }],
"name": "messageId",
"inputs": [],
"constant": true
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [{ "type": "uint256", "name": "" }],
"name": "numAffirmationsSigned",
"inputs": [{ "type": "bytes32", "name": "_hash" }],
"constant": true
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [{ "type": "bool", "name": "" }],
"name": "affirmationsSigned",
"inputs": [{ "type": "bytes32", "name": "_hash" }],
"constant": true
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [],
"name": "setMaxGasPerTx",
"inputs": [{ "type": "uint256", "name": "_maxGasPerTx" }],
"constant": false
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [{ "type": "uint256", "name": "" }],
"name": "requiredSignatures",
"inputs": [],
"constant": true
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [{ "type": "address", "name": "" }],
"name": "owner",
"inputs": [],
"constant": true
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [{ "type": "bool", "name": "" }],
"name": "messagesSigned",
"inputs": [{ "type": "bytes32", "name": "_message" }],
"constant": true
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [{ "type": "bytes32", "name": "" }],
"name": "requireToConfirmMessage",
"inputs": [
{ "type": "address", "name": "_contract" },
{ "type": "bytes", "name": "_data" },
{ "type": "uint256", "name": "_gas" }
],
"constant": false
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [{ "type": "address", "name": "" }],
"name": "validatorContract",
"inputs": [],
"constant": true
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [{ "type": "uint256", "name": "" }],
"name": "deployedAtBlock",
"inputs": [],
"constant": true
},
{
"type": "function",
"stateMutability": "pure",
"payable": false,
"outputs": [
{ "type": "uint64", "name": "major" },
{ "type": "uint64", "name": "minor" },
{ "type": "uint64", "name": "patch" }
],
"name": "getBridgeInterfacesVersion",
"inputs": [],
"constant": true
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [{ "type": "uint256", "name": "id" }],
"name": "messageSourceChainId",
"inputs": [],
"constant": true
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [],
"name": "setRequiredBlockConfirmations",
"inputs": [{ "type": "uint256", "name": "_blockConfirmations" }],
"constant": false
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [{ "type": "uint256", "name": "" }],
"name": "destinationChainId",
"inputs": [],
"constant": true
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [],
"name": "setGasPrice",
"inputs": [{ "type": "uint256", "name": "_gasPrice" }],
"constant": false
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [],
"name": "setAllowReentrantRequests",
"inputs": [{ "type": "bool", "name": "_enable" }],
"constant": false
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [],
"name": "enableAsyncRequestSelector",
"inputs": [
{ "type": "bytes32", "name": "_requestSelector" },
{ "type": "bool", "name": "_enable" }
],
"constant": false
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [{ "type": "bool", "name": "" }],
"name": "messageCallStatus",
"inputs": [{ "type": "bytes32", "name": "_messageId" }],
"constant": true
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [{ "type": "address", "name": "sender" }],
"name": "messageSender",
"inputs": [],
"constant": true
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [{ "type": "int256", "name": "" }],
"name": "decimalShift",
"inputs": [],
"constant": true
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [{ "type": "bytes32", "name": "" }],
"name": "requireToPassMessage",
"inputs": [
{ "type": "address", "name": "_contract" },
{ "type": "bytes", "name": "_data" },
{ "type": "uint256", "name": "_gas" }
],
"constant": false
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [{ "type": "bytes32", "name": "" }],
"name": "failedMessageDataHash",
"inputs": [{ "type": "bytes32", "name": "_messageId" }],
"constant": true
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [{ "type": "uint256", "name": "" }],
"name": "maxGasPerTx",
"inputs": [],
"constant": true
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [],
"name": "executeAffirmation",
"inputs": [{ "type": "bytes", "name": "message" }],
"constant": false
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [],
"name": "transferOwnership",
"inputs": [{ "type": "address", "name": "newOwner" }],
"constant": false
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [{ "type": "bool", "name": "" }],
"name": "isAsyncRequestSelectorEnabled",
"inputs": [{ "type": "bytes32", "name": "_requestSelector" }],
"constant": true
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [{ "type": "uint256", "name": "" }],
"name": "gasPrice",
"inputs": [],
"constant": true
},
{
"type": "function",
"stateMutability": "pure",
"payable": false,
"outputs": [{ "type": "bool", "name": "" }],
"name": "isAlreadyProcessed",
"inputs": [{ "type": "uint256", "name": "_number" }],
"constant": true
},
{
"type": "event",
"name": "UserRequestForSignature",
"inputs": [
{ "type": "bytes32", "name": "messageId", "indexed": true },
{ "type": "bytes", "name": "encodedData", "indexed": false }
],
"anonymous": false
},
{
"type": "event",
"name": "AffirmationCompleted",
"inputs": [
{ "type": "address", "name": "sender", "indexed": true },
{ "type": "address", "name": "executor", "indexed": true },
{ "type": "bytes32", "name": "messageId", "indexed": true },
{ "type": "bool", "name": "status", "indexed": false }
],
"anonymous": false
},
{
"type": "event",
"name": "UserRequestForInformation",
"inputs": [
{ "type": "bytes32", "name": "messageId", "indexed": true },
{ "type": "bytes32", "name": "requestSelector", "indexed": true },
{ "type": "address", "name": "sender", "indexed": true },
{ "type": "bytes", "name": "data", "indexed": false }
],
"anonymous": false
},
{
"type": "event",
"name": "SignedForInformation",
"inputs": [
{ "type": "address", "name": "signer", "indexed": true },
{ "type": "bytes32", "name": "messageId", "indexed": true }
],
"anonymous": false
},
{
"type": "event",
"name": "InformationRetrieved",
"inputs": [
{ "type": "bytes32", "name": "messageId", "indexed": true },
{ "type": "bool", "name": "status", "indexed": false },
{ "type": "bool", "name": "callbackStatus", "indexed": false }
],
"anonymous": false
},
{
"type": "event",
"name": "EnabledAsyncRequestSelector",
"inputs": [
{ "type": "bytes32", "name": "requestSelector", "indexed": true },
{ "type": "bool", "name": "enable", "indexed": false }
],
"anonymous": false
},
{
"type": "event",
"name": "SignedForUserRequest",
"inputs": [
{ "type": "address", "name": "signer", "indexed": true },
{ "type": "bytes32", "name": "messageHash", "indexed": false }
],
"anonymous": false
},
{
"type": "event",
"name": "SignedForAffirmation",
"inputs": [
{ "type": "address", "name": "signer", "indexed": true },
{ "type": "bytes32", "name": "messageHash", "indexed": false }
],
"anonymous": false
},
{
"type": "event",
"name": "CollectedSignatures",
"inputs": [
{ "type": "address", "name": "authorityResponsibleForRelay", "indexed": false },
{ "type": "bytes32", "name": "messageHash", "indexed": false },
{ "type": "uint256", "name": "NumberOfCollectedSignatures", "indexed": false }
],
"anonymous": false
},
{
"type": "event",
"name": "GasPriceChanged",
"inputs": [{ "type": "uint256", "name": "gasPrice", "indexed": false }],
"anonymous": false
},
{
"type": "event",
"name": "RequiredBlockConfirmationChanged",
"inputs": [{ "type": "uint256", "name": "requiredBlockConfirmations", "indexed": false }],
"anonymous": false
},
{
"type": "event",
"name": "OwnershipTransferred",
"inputs": [
{ "type": "address", "name": "previousOwner", "indexed": false },
{ "type": "address", "name": "newOwner", "indexed": false }
],
"anonymous": false
}
]

52
abi/BridgeBNB.json Normal file
View File

@ -0,0 +1,52 @@
[
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "executor",
"type": "address"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "messageId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "bool",
"name": "status",
"type": "bool"
}
],
"name": "RelayedMessage",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "messageId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "bytes",
"name": "encodedData",
"type": "bytes"
}
],
"name": "UserRequestForAffirmation",
"type": "event"
}
]

237
abi/BscBridgeHelper.json Normal file
View File

@ -0,0 +1,237 @@
[
{
"inputs": [
{
"internalType": "contract IOmnibridge",
"name": "_bridge",
"type": "address"
},
{
"internalType": "contract IWETH",
"name": "_weth",
"type": "address"
},
{
"internalType": "address",
"name": "_owner",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": false,
"internalType": "bytes",
"name": "key",
"type": "bytes"
}
],
"name": "PublicKey",
"type": "event"
},
{
"inputs": [],
"name": "WETH",
"outputs": [
{
"internalType": "contract IWETH",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "bridge",
"outputs": [
{
"internalType": "contract IOmnibridge",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_token",
"type": "address"
},
{
"internalType": "address",
"name": "_to",
"type": "address"
}
],
"name": "claimTokens",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_token",
"type": "address"
},
{
"internalType": "uint256",
"name": "_value",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "_data",
"type": "bytes"
}
],
"name": "onTokenBridged",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "bytes",
"name": "publicKey",
"type": "bytes"
}
],
"internalType": "struct L1Helper.Account",
"name": "_account",
"type": "tuple"
}
],
"name": "register",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "wrapAndRelayTokens",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_receiver",
"type": "address"
},
{
"internalType": "bytes",
"name": "_data",
"type": "bytes"
}
],
"name": "wrapAndRelayTokens",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_receiver",
"type": "address"
},
{
"internalType": "bytes",
"name": "_data",
"type": "bytes"
},
{
"components": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "bytes",
"name": "publicKey",
"type": "bytes"
}
],
"internalType": "struct L1Helper.Account",
"name": "_account",
"type": "tuple"
}
],
"name": "wrapAndRelayTokens",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_receiver",
"type": "address"
}
],
"name": "wrapAndRelayTokens",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"stateMutability": "payable",
"type": "receive"
}
]

37
abi/FeeManager.json Normal file
View File

@ -0,0 +1,37 @@
[
{
"type": "function",
"stateMutability": "view",
"outputs": [{ "type": "bytes32", "name": "", "internalType": "bytes32" }],
"name": "FOREIGN_TO_HOME_FEE",
"inputs": []
},
{
"type": "function",
"stateMutability": "view",
"outputs": [{ "type": "bytes32", "name": "", "internalType": "bytes32" }],
"name": "HOME_TO_FOREIGN_FEE",
"inputs": []
},
{
"type": "function",
"stateMutability": "view",
"outputs": [{ "type": "uint256", "name": "", "internalType": "uint256" }],
"name": "calculateFee",
"inputs": [
{ "type": "bytes32", "name": "_feeType", "internalType": "bytes32" },
{ "type": "address", "name": "_token", "internalType": "address" },
{ "type": "uint256", "name": "_value", "internalType": "uint256" }
]
},
{
"type": "function",
"stateMutability": "view",
"outputs": [{ "type": "uint256", "name": "", "internalType": "uint256" }],
"name": "getFee",
"inputs": [
{ "type": "bytes32", "name": "_feeType", "internalType": "bytes32" },
{ "type": "address", "name": "_token", "internalType": "address" }
]
}
]

1363
abi/ForeignOmnibridge.json Normal file

File diff suppressed because it is too large Load Diff

92
abi/Multicall.json Normal file
View File

@ -0,0 +1,92 @@
[
{
"inputs": [],
"name": "getCurrentBlockTimestamp",
"outputs": [
{
"internalType": "uint256",
"name": "timestamp",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "addr",
"type": "address"
}
],
"name": "getEthBalance",
"outputs": [
{
"internalType": "uint256",
"name": "balance",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "address",
"name": "target",
"type": "address"
},
{
"internalType": "uint256",
"name": "gasLimit",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "callData",
"type": "bytes"
}
],
"internalType": "struct UniswapInterfaceMulticall.Call[]",
"name": "calls",
"type": "tuple[]"
}
],
"name": "multicall",
"outputs": [
{
"internalType": "uint256",
"name": "blockNumber",
"type": "uint256"
},
{
"components": [
{
"internalType": "bool",
"name": "success",
"type": "bool"
},
{
"internalType": "uint256",
"name": "gasUsed",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "returnData",
"type": "bytes"
}
],
"internalType": "struct UniswapInterfaceMulticall.Result[]",
"name": "returnData",
"type": "tuple[]"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
]

181
abi/OffchainOracle.json Normal file
View File

@ -0,0 +1,181 @@
[
{
"inputs": [
{ "internalType": "contract MultiWrapper", "name": "_multiWrapper", "type": "address" },
{ "internalType": "contract IOracle[]", "name": "existingOracles", "type": "address[]" },
{ "internalType": "enum OffchainOracle.OracleType[]", "name": "oracleTypes", "type": "uint8[]" },
{ "internalType": "contract IERC20[]", "name": "existingConnectors", "type": "address[]" },
{ "internalType": "contract IERC20", "name": "wBase", "type": "address" }
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{ "indexed": false, "internalType": "contract IERC20", "name": "connector", "type": "address" }
],
"name": "ConnectorAdded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{ "indexed": false, "internalType": "contract IERC20", "name": "connector", "type": "address" }
],
"name": "ConnectorRemoved",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{ "indexed": false, "internalType": "contract MultiWrapper", "name": "multiWrapper", "type": "address" }
],
"name": "MultiWrapperUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{ "indexed": false, "internalType": "contract IOracle", "name": "oracle", "type": "address" },
{
"indexed": false,
"internalType": "enum OffchainOracle.OracleType",
"name": "oracleType",
"type": "uint8"
}
],
"name": "OracleAdded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{ "indexed": false, "internalType": "contract IOracle", "name": "oracle", "type": "address" },
{
"indexed": false,
"internalType": "enum OffchainOracle.OracleType",
"name": "oracleType",
"type": "uint8"
}
],
"name": "OracleRemoved",
"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"
},
{
"inputs": [{ "internalType": "contract IERC20", "name": "connector", "type": "address" }],
"name": "addConnector",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{ "internalType": "contract IOracle", "name": "oracle", "type": "address" },
{ "internalType": "enum OffchainOracle.OracleType", "name": "oracleKind", "type": "uint8" }
],
"name": "addOracle",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "connectors",
"outputs": [{ "internalType": "contract IERC20[]", "name": "allConnectors", "type": "address[]" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{ "internalType": "contract IERC20", "name": "srcToken", "type": "address" },
{ "internalType": "contract IERC20", "name": "dstToken", "type": "address" },
{ "internalType": "bool", "name": "useWrappers", "type": "bool" }
],
"name": "getRate",
"outputs": [{ "internalType": "uint256", "name": "weightedRate", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{ "internalType": "contract IERC20", "name": "srcToken", "type": "address" },
{ "internalType": "bool", "name": "useSrcWrappers", "type": "bool" }
],
"name": "getRateToEth",
"outputs": [{ "internalType": "uint256", "name": "weightedRate", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "multiWrapper",
"outputs": [{ "internalType": "contract MultiWrapper", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "oracles",
"outputs": [
{ "internalType": "contract IOracle[]", "name": "allOracles", "type": "address[]" },
{ "internalType": "enum OffchainOracle.OracleType[]", "name": "oracleTypes", "type": "uint8[]" }
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "contract IERC20", "name": "connector", "type": "address" }],
"name": "removeConnector",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{ "internalType": "contract IOracle", "name": "oracle", "type": "address" },
{ "internalType": "enum OffchainOracle.OracleType", "name": "oracleKind", "type": "uint8" }
],
"name": "removeOracle",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [{ "internalType": "contract MultiWrapper", "name": "_multiWrapper", "type": "address" }],
"name": "setMultiWrapper",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]

1412
abi/Omnibridge.json Normal file

File diff suppressed because it is too large Load Diff

670
abi/RelayerRegistry.json Normal file
View File

@ -0,0 +1,670 @@
[
{
"inputs": [
{
"internalType": "address",
"name": "_torn",
"type": "address"
},
{
"internalType": "address",
"name": "_governance",
"type": "address"
},
{
"internalType": "address",
"name": "_ens",
"type": "address"
},
{
"internalType": "bytes32",
"name": "_staking",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "_feeManager",
"type": "bytes32"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "minStakeAmount",
"type": "uint256"
}
],
"name": "MinimumStakeAmount",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "relayer",
"type": "address"
}
],
"name": "RelayerBalanceNullified",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "relayer",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "string",
"name": "ensName",
"type": "string"
},
{
"indexed": false,
"internalType": "address",
"name": "relayerAddress",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "stakedAmount",
"type": "uint256"
}
],
"name": "RelayerRegistered",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "tornadoRouter",
"type": "address"
}
],
"name": "RouterRegistered",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "relayer",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amountStakeAdded",
"type": "uint256"
}
],
"name": "StakeAddedToRelayer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "relayer",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amountBurned",
"type": "uint256"
}
],
"name": "StakeBurned",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "relayer",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "worker",
"type": "address"
}
],
"name": "WorkerRegistered",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "relayer",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "worker",
"type": "address"
}
],
"name": "WorkerUnregistered",
"type": "event"
},
{
"inputs": [
{
"internalType": "bytes32[]",
"name": "domains",
"type": "bytes32[]"
}
],
"name": "bulkResolve",
"outputs": [
{
"internalType": "address[]",
"name": "result",
"type": "address[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "address",
"name": "relayer",
"type": "address"
},
{
"internalType": "contract ITornadoInstance",
"name": "pool",
"type": "address"
}
],
"name": "burn",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "ens",
"outputs": [
{
"internalType": "contract IENS",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "feeManager",
"outputs": [
{
"internalType": "contract FeeManager",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "relayer",
"type": "address"
}
],
"name": "getRelayerBalance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "relayer",
"type": "address"
}
],
"name": "getRelayerEnsHash",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "governance",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "_tornadoRouter",
"type": "bytes32"
}
],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "toResolve",
"type": "address"
}
],
"name": "isRelayer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "relayer",
"type": "address"
},
{
"internalType": "address",
"name": "toResolve",
"type": "address"
}
],
"name": "isRelayerRegistered",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "minStakeAmount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "relayer",
"type": "address"
}
],
"name": "nullifyBalance",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "ensName",
"type": "string"
},
{
"internalType": "uint256",
"name": "stake",
"type": "uint256"
},
{
"internalType": "address[]",
"name": "workersToRegister",
"type": "address[]"
}
],
"name": "register",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "ensName",
"type": "string"
},
{
"internalType": "uint256",
"name": "stake",
"type": "uint256"
},
{
"internalType": "address[]",
"name": "workersToRegister",
"type": "address[]"
},
{
"internalType": "address",
"name": "relayer",
"type": "address"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "v",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "r",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "s",
"type": "bytes32"
}
],
"name": "registerPermit",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "relayer",
"type": "address"
},
{
"internalType": "address",
"name": "worker",
"type": "address"
}
],
"name": "registerWorker",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "relayers",
"outputs": [
{
"internalType": "uint256",
"name": "balance",
"type": "uint256"
},
{
"internalType": "bytes32",
"name": "ensHash",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "node",
"type": "bytes32"
}
],
"name": "resolve",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "minAmount",
"type": "uint256"
}
],
"name": "setMinStakeAmount",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "tornadoRouterAddress",
"type": "address"
}
],
"name": "setTornadoRouter",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "relayer",
"type": "address"
},
{
"internalType": "uint256",
"name": "stake",
"type": "uint256"
}
],
"name": "stakeToRelayer",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "relayer",
"type": "address"
},
{
"internalType": "uint256",
"name": "stake",
"type": "uint256"
},
{
"internalType": "address",
"name": "staker",
"type": "address"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "v",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "r",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "s",
"type": "bytes32"
}
],
"name": "stakeToRelayerPermit",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "staking",
"outputs": [
{
"internalType": "contract ITornadoStakingRewards",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "torn",
"outputs": [
{
"internalType": "contract TORN",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "tornadoRouter",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "worker",
"type": "address"
}
],
"name": "unregisterWorker",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "workers",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
]

92
abi/SanctionsList.json Normal file
View File

@ -0,0 +1,92 @@
[
{ "inputs": [], "stateMutability": "nonpayable", "type": "constructor" },
{
"anonymous": false,
"inputs": [{ "indexed": true, "internalType": "address", "name": "addr", "type": "address" }],
"name": "NonSanctionedAddress",
"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": "address", "name": "addr", "type": "address" }],
"name": "SanctionedAddress",
"type": "event"
},
{
"anonymous": false,
"inputs": [{ "indexed": false, "internalType": "address[]", "name": "addrs", "type": "address[]" }],
"name": "SanctionedAddressesAdded",
"type": "event"
},
{
"anonymous": false,
"inputs": [{ "indexed": false, "internalType": "address[]", "name": "addrs", "type": "address[]" }],
"name": "SanctionedAddressesRemoved",
"type": "event"
},
{
"inputs": [{ "internalType": "address[]", "name": "newSanctions", "type": "address[]" }],
"name": "addToSanctionsList",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "addr", "type": "address" }],
"name": "isSanctioned",
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "addr", "type": "address" }],
"name": "isSanctionedVerbose",
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "name",
"outputs": [{ "internalType": "string", "name": "", "type": "string" }],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "address[]", "name": "removeSanctions", "type": "address[]" }],
"name": "removeFromSanctionsList",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]

1040
abi/TornadoPool.json Normal file

File diff suppressed because it is too large Load Diff

828
abi/WbnbXdai.json Normal file
View File

@ -0,0 +1,828 @@
[
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [
{
"type": "bool",
"name": ""
}
],
"name": "mintingFinished",
"inputs": [],
"constant": true
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [
{
"type": "string",
"name": ""
}
],
"name": "name",
"inputs": [],
"constant": true
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [
{
"type": "bool",
"name": "result"
}
],
"name": "approve",
"inputs": [
{
"type": "address",
"name": "_to"
},
{
"type": "uint256",
"name": "_value"
}
],
"constant": false
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [],
"name": "setBridgeContract",
"inputs": [
{
"type": "address",
"name": "_bridgeContract"
}
],
"constant": false
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [
{
"type": "uint256",
"name": ""
}
],
"name": "totalSupply",
"inputs": [],
"constant": true
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [
{
"type": "bool",
"name": ""
}
],
"name": "transferFrom",
"inputs": [
{
"type": "address",
"name": "_sender"
},
{
"type": "address",
"name": "_recipient"
},
{
"type": "uint256",
"name": "_amount"
}
],
"constant": false
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [
{
"type": "bytes32",
"name": ""
}
],
"name": "PERMIT_TYPEHASH",
"inputs": [],
"constant": true
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [
{
"type": "uint8",
"name": ""
}
],
"name": "decimals",
"inputs": [],
"constant": true
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [
{
"type": "bytes32",
"name": ""
}
],
"name": "DOMAIN_SEPARATOR",
"inputs": [],
"constant": true
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [
{
"type": "bool",
"name": "result"
}
],
"name": "increaseAllowance",
"inputs": [
{
"type": "address",
"name": "_to"
},
{
"type": "uint256",
"name": "_addedValue"
}
],
"constant": false
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [
{
"type": "bool",
"name": ""
}
],
"name": "transferAndCall",
"inputs": [
{
"type": "address",
"name": "_to"
},
{
"type": "uint256",
"name": "_value"
},
{
"type": "bytes",
"name": "_data"
}
],
"constant": false
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [
{
"type": "bool",
"name": ""
}
],
"name": "mint",
"inputs": [
{
"type": "address",
"name": "_to"
},
{
"type": "uint256",
"name": "_amount"
}
],
"constant": false
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [],
"name": "burn",
"inputs": [
{
"type": "uint256",
"name": "_value"
}
],
"constant": false
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [
{
"type": "string",
"name": ""
}
],
"name": "version",
"inputs": [],
"constant": true
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [
{
"type": "bool",
"name": ""
}
],
"name": "decreaseApproval",
"inputs": [
{
"type": "address",
"name": "_spender"
},
{
"type": "uint256",
"name": "_subtractedValue"
}
],
"constant": false
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [],
"name": "claimTokens",
"inputs": [
{
"type": "address",
"name": "_token"
},
{
"type": "address",
"name": "_to"
}
],
"constant": false
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [
{
"type": "uint256",
"name": ""
}
],
"name": "balanceOf",
"inputs": [
{
"type": "address",
"name": "_owner"
}
],
"constant": true
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [],
"name": "renounceOwnership",
"inputs": [],
"constant": false
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [
{
"type": "bool",
"name": ""
}
],
"name": "isBridge",
"inputs": [
{
"type": "address",
"name": "_address"
}
],
"constant": true
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [
{
"type": "bool",
"name": ""
}
],
"name": "finishMinting",
"inputs": [],
"constant": false
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [
{
"type": "uint256",
"name": ""
}
],
"name": "nonces",
"inputs": [
{
"type": "address",
"name": ""
}
],
"constant": true
},
{
"type": "function",
"stateMutability": "pure",
"payable": false,
"outputs": [
{
"type": "uint64",
"name": "major"
},
{
"type": "uint64",
"name": "minor"
},
{
"type": "uint64",
"name": "patch"
}
],
"name": "getTokenInterfacesVersion",
"inputs": [],
"constant": true
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [
{
"type": "address",
"name": ""
}
],
"name": "owner",
"inputs": [],
"constant": true
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [],
"name": "permit",
"inputs": [
{
"type": "address",
"name": "_holder"
},
{
"type": "address",
"name": "_spender"
},
{
"type": "uint256",
"name": "_nonce"
},
{
"type": "uint256",
"name": "_expiry"
},
{
"type": "bool",
"name": "_allowed"
},
{
"type": "uint8",
"name": "_v"
},
{
"type": "bytes32",
"name": "_r"
},
{
"type": "bytes32",
"name": "_s"
}
],
"constant": false
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [
{
"type": "string",
"name": ""
}
],
"name": "symbol",
"inputs": [],
"constant": true
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [
{
"type": "bool",
"name": ""
}
],
"name": "decreaseAllowance",
"inputs": [
{
"type": "address",
"name": "spender"
},
{
"type": "uint256",
"name": "subtractedValue"
}
],
"constant": false
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [
{
"type": "bool",
"name": ""
}
],
"name": "transfer",
"inputs": [
{
"type": "address",
"name": "_to"
},
{
"type": "uint256",
"name": "_value"
}
],
"constant": false
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [],
"name": "push",
"inputs": [
{
"type": "address",
"name": "_to"
},
{
"type": "uint256",
"name": "_amount"
}
],
"constant": false
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [],
"name": "move",
"inputs": [
{
"type": "address",
"name": "_from"
},
{
"type": "address",
"name": "_to"
},
{
"type": "uint256",
"name": "_amount"
}
],
"constant": false
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [
{
"type": "address",
"name": ""
}
],
"name": "bridgeContract",
"inputs": [],
"constant": true
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [
{
"type": "bool",
"name": ""
}
],
"name": "increaseApproval",
"inputs": [
{
"type": "address",
"name": "_spender"
},
{
"type": "uint256",
"name": "_addedValue"
}
],
"constant": false
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [
{
"type": "uint256",
"name": ""
}
],
"name": "allowance",
"inputs": [
{
"type": "address",
"name": "_owner"
},
{
"type": "address",
"name": "_spender"
}
],
"constant": true
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [],
"name": "pull",
"inputs": [
{
"type": "address",
"name": "_from"
},
{
"type": "uint256",
"name": "_amount"
}
],
"constant": false
},
{
"type": "function",
"stateMutability": "nonpayable",
"payable": false,
"outputs": [],
"name": "transferOwnership",
"inputs": [
{
"type": "address",
"name": "_newOwner"
}
],
"constant": false
},
{
"type": "function",
"stateMutability": "view",
"payable": false,
"outputs": [
{
"type": "uint256",
"name": ""
}
],
"name": "expirations",
"inputs": [
{
"type": "address",
"name": ""
},
{
"type": "address",
"name": ""
}
],
"constant": true
},
{
"type": "constructor",
"stateMutability": "nonpayable",
"payable": false,
"inputs": [
{
"type": "string",
"name": "_name"
},
{
"type": "string",
"name": "_symbol"
},
{
"type": "uint8",
"name": "_decimals"
},
{
"type": "uint256",
"name": "_chainId"
}
]
},
{
"type": "event",
"name": "Mint",
"inputs": [
{
"type": "address",
"name": "to",
"indexed": true
},
{
"type": "uint256",
"name": "amount",
"indexed": false
}
],
"anonymous": false
},
{
"type": "event",
"name": "MintFinished",
"inputs": [],
"anonymous": false
},
{
"type": "event",
"name": "OwnershipRenounced",
"inputs": [
{
"type": "address",
"name": "previousOwner",
"indexed": true
}
],
"anonymous": false
},
{
"type": "event",
"name": "OwnershipTransferred",
"inputs": [
{
"type": "address",
"name": "previousOwner",
"indexed": true
},
{
"type": "address",
"name": "newOwner",
"indexed": true
}
],
"anonymous": false
},
{
"type": "event",
"name": "Burn",
"inputs": [
{
"type": "address",
"name": "burner",
"indexed": true
},
{
"type": "uint256",
"name": "value",
"indexed": false
}
],
"anonymous": false
},
{
"type": "event",
"name": "Transfer",
"inputs": [
{
"type": "address",
"name": "from",
"indexed": true
},
{
"type": "address",
"name": "to",
"indexed": true
},
{
"type": "uint256",
"name": "value",
"indexed": false
},
{
"type": "bytes",
"name": "data",
"indexed": false
}
],
"anonymous": false
},
{
"type": "event",
"name": "Approval",
"inputs": [
{
"type": "address",
"name": "owner",
"indexed": true
},
{
"type": "address",
"name": "spender",
"indexed": true
},
{
"type": "uint256",
"name": "value",
"indexed": false
}
],
"anonymous": false
},
{
"type": "event",
"name": "Transfer",
"inputs": [
{
"type": "address",
"name": "from",
"indexed": true
},
{
"type": "address",
"name": "to",
"indexed": true
},
{
"type": "uint256",
"name": "value",
"indexed": false
}
],
"anonymous": false
}
]

5
abi/index.ts Normal file
View File

@ -0,0 +1,5 @@
import TORNADO_POOL from './TornadoPool.json'
export const abi = {
TORNADO_POOL,
}

38
app.html Normal file
View File

@ -0,0 +1,38 @@
<!DOCTYPE html>
<html {{ HTML_ATTRS }}>
<head {{ HEAD_ATTRS }}>
<script>
if (window.location.search) {
window.location = window.location.origin + window.location.pathname
}
function addScript(src) {
const s = document.createElement('script')
s.setAttribute('src', src)
document.body.appendChild(s)
}
document.addEventListener('DOMContentLoaded', () => {
const ipfsPathRegExp = /^(\/(?:ipfs|ipns)\/[^/]+)/
const ipfsPathPrefix = (window.location.pathname.match(ipfsPathRegExp) || [])[1] || ''
if (ipfsPathPrefix) {
const scripts = [...document.getElementsByTagName('script')]
for (let i = 0; i < scripts.length; i++) {
if (scripts[i].src) {
const source = new URL(scripts[i].src)
const newSource = window.location.origin + ipfsPathPrefix + source.pathname
addScript(newSource)
}
}
}
addScript(`${window.location.origin}${ipfsPathPrefix}/snarkjs.min.js`)
})
</script>
{{ HEAD }}
</head>
<body {{ BODY_ATTRS }}>
{{ APP }}
</body>
</html>

7
assets/README.md Normal file
View File

@ -0,0 +1,7 @@
# ASSETS
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains your un-compiled assets such as LESS, SASS, or JavaScript.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#webpacked).

476
assets/events.worker.js Normal file
View File

@ -0,0 +1,476 @@
/* eslint-disable @typescript-eslint/no-require-imports */
const { AES, HmacSHA256, enc } = require('crypto-js')
const { isEmpty } = require('lodash')
const { BigNumber } = require('ethers')
const { poseidon } = require('circomlib')
const { decrypt } = require('eth-sig-util')
const { IndexedDB } = require('../services/idb')
const { sleep } = require('../utilities/helpers')
const { workerEvents, numbers } = require('../constants/worker')
const { ExtendedProvider } = require('../services/ether/ExtendedProvider')
const { POOL_CONTRACT, RPC_LIST, FALLBACK_RPC_LIST } = require('../constants/contracts')
const { TornadoPool__factory: TornadoPoolFactory } = require('../_contracts')
const getProviderWithSigner = (chainId) => {
return new ExtendedProvider(RPC_LIST[chainId], chainId, FALLBACK_RPC_LIST[chainId])
}
const initDataBase = async () => {
try {
const options = {
stores: [
{
keyPath: 'index',
name: `commitment_events_100`,
indexes: [
{ name: 'transactionHash', unique: false },
{ name: 'commitment', unique: true },
],
},
{
keyPath: 'id',
name: `decrypted_events_100`,
indexes: [{ name: 'hash', unique: true }],
},
{
keyPath: 'name',
name: `last_sync_event`,
indexes: [{ name: 'name', unique: false }],
},
],
dbName: 'tornado_pool_events',
}
const instance = new IndexedDB(options)
await instance.initDB()
self.$indexedDB = instance
} catch (err) {
console.log('err', err.message)
}
}
const initWorker = (chainId) => {
self.chainId = chainId
const provider = getProviderWithSigner(chainId)
setTornadoPool(chainId, provider)
}
const setTornadoPool = (chainId, provider) => {
self.poolContract = TornadoPoolFactory.connect(POOL_CONTRACT[chainId], provider)
}
const getCommitmentBatch = async ({ blockFrom, blockTo, cachedEvents, withCache }) => {
const filter = self.poolContract.filters.NewCommitment()
const events = await self.poolContract.queryFilter(filter, blockFrom, blockTo)
const commitmentEvents = events.map(({ blockNumber, transactionHash, args }) => ({
blockNumber,
transactionHash,
index: Number(args.index),
commitment: args.commitment,
encryptedOutput: args.encryptedOutput,
}))
return commitmentEvents.filter((el) => {
if (!withCache && cachedEvents && cachedEvents.length) {
return cachedEvents.find((cached) => {
return el.transactionHash === cached.transactionHash && el.index === cached.index
})
}
return true
})
}
const getCommitments = async ({ withCache, lastSyncBlock }) => {
try {
let blockFrom = numbers.DEPLOYED_BLOCK
if (!self.$indexedDB) {
await sleep(numbers.RECALL_DELAY)
}
let cachedEvents = await self.$indexedDB.getAll({
storeName: 'commitment_events_100',
})
if (!cachedEvents) {
cachedEvents = []
}
if (!lastSyncBlock) {
lastSyncBlock = await getLastSyncBlock()
}
const currentBlock = await self.poolContract.provider.getBlockNumber()
if (lastSyncBlock && cachedEvents.length) {
const newBlockFrom = Number(lastSyncBlock) + numbers.ONE
if (Number(lastSyncBlock) === currentBlock) {
return { commitmentEvents: cachedEvents }
}
blockFrom = newBlockFrom > currentBlock ? currentBlock : newBlockFrom
}
const commitmentEvents = await getCommitmentBatch({ blockFrom, blockTo: currentBlock, cachedEvents, withCache })
return {
newCommitmentEvents: commitmentEvents,
commitmentEvents: withCache ? cachedEvents.concat(commitmentEvents) : commitmentEvents,
}
} catch (err) {
throw new Error(`Method NEW getCommitmentEvents has error: ${err.message}`)
}
}
const decryptCommitmentEvent = ({ commitmentEvent, privateKey, bgPublicKey }) => {
const buf = keyPairDecrypt(commitmentEvent.encryptedOutput, privateKey)
const index = BigNumber.from(commitmentEvent.index).toNumber()
const amount = BigNumber.from('0x' + getHex(buf, numbers.ZERO, numbers.BYTES_31))
const blinding = BigNumber.from('0x' + getHex(buf, numbers.BYTES_31, numbers.BYTES_62))
const { commitment, nullifier } = getNullifier({
index,
amount,
blinding,
privateKey,
publicKey: bgPublicKey,
})
const nullifierHash = nullifier._hex.slice(numbers.TWO).padStart(numbers.NULLIFIER_LENGTH, '0x00000')
return {
index,
amount,
blinding,
nullifier,
commitment,
nullifierHash,
blockNumber: commitmentEvent.blockNumber,
transactionHash: commitmentEvent.transactionHash,
}
}
const decryptCommitmentEvents = ({ publicKey, privateKey, commitmentEvents }) => {
try {
const decrypted = []
const commitments = []
const bgPublicKey = BigNumber.from(publicKey)
for (const commitmentEvent of commitmentEvents) {
try {
const decryptedEvent = decryptCommitmentEvent({ commitmentEvent, privateKey, bgPublicKey })
decrypted.push(decryptedEvent)
commitments.push(commitmentEvent)
} catch (err) {
continue
}
}
return { decrypted, commitments }
} catch (err) {
throw new Error(err.message)
}
}
const getEvents = async ({ key, indexName, storeName }) => {
try {
const lastEvents = await self.$indexedDB.getAllFromIndex({ key, indexName, storeName })
return lastEvents
} catch (err) {
throw new Error(`getEvents has error: ${err.message}`)
}
}
const saveEvents = async ({ events, storeName }) => {
try {
const isIdbEnable = await getIsDBEnabled()
if (isIdbEnable || !getIsWhitelistedDomain() || isEmpty(events)) {
return
}
self.$indexedDB.createMultipleTransactions({
storeName,
data: events,
})
} catch (err) {
console.error(`saveEvents has error: ${err.message}`)
}
}
// listener handlers
const getCommitmentEvents = async ({ publicKey, lastSyncBlock, withCache = true }, [port]) => {
try {
const { commitmentEvents, newCommitmentEvents } = await getCommitments({ withCache, lastSyncBlock })
port.postMessage({ result: commitmentEvents })
saveEvents({ events: newCommitmentEvents, storeName: 'commitment_events_100' })
} catch (err) {
port.postMessage({ errorMessage: err.message })
}
}
const getBatchCommitmentsEvents = async (
{ blockFrom, blockTo, publicKey, privateKey, cachedEvents, withCache = true },
[port],
) => {
try {
const commitments = await getCommitmentBatch({ blockFrom, blockTo, publicKey, cachedEvents, withCache })
port.postMessage({ result: commitments })
saveEvents({ events: commitments, storeName: 'commitment_events_100' })
} catch (err) {
port.postMessage({ errorMessage: err.message })
}
}
const getBatchEvents = async ({ blockFrom, blockTo, publicKey, privateKey, cachedEvents, withCache = true }, [port]) => {
try {
const commitments = await getCommitmentBatch({ blockFrom, blockTo, publicKey, cachedEvents, withCache })
const { decrypted, commitments: userCommitments } = decryptCommitmentEvents({
publicKey,
privateKey,
commitmentEvents: commitments,
})
const decryptedHashes = decrypted.map((el) => encryptCrypto(JSON.stringify(el), el.commitment._hex, privateKey))
port.postMessage({ result: { decrypted, commitments, userCommitments, decryptedHashes } })
} catch (err) {
port.postMessage({ errorMessage: err.message })
}
}
const getEventsFromTxHash = async ({ txHash, publicKey, privateKey }, [port]) => {
try {
const lastEvents = await getEvents({
key: txHash.toLowerCase(),
indexName: 'transactionHash',
storeName: 'commitment_events_100',
})
if (lastEvents && lastEvents.length) {
const foundEvents = decryptCommitmentEvents({ publicKey, privateKey, commitmentEvents: lastEvents })
port.postMessage({ result: foundEvents.decrypted })
return
}
const { commitmentEvents } = await getCommitments({ withCache: true })
const { decrypted } = decryptCommitmentEvents({ publicKey, privateKey, commitmentEvents })
const foundEvents = decrypted.find((event) => event.transactionHash.toLowerCase() === txHash.toLowerCase())
port.postMessage({ result: foundEvents })
} catch (err) {
port.postMessage({ errorMessage: err.message })
}
}
const getLastSyncBlock = async () => {
try {
const [lastEvent] = await getEvents({
indexName: 'name',
key: 'commitment_events_100',
storeName: 'last_sync_event',
})
return lastEvent ? lastEvent.blockNumber : numbers.DEPLOYED_BLOCK
} catch (err) {
console.error('getLastSyncBlock has error:', err.message)
return numbers.DEPLOYED_BLOCK
}
}
const getCashedEvents = async ({ storeName, publicKey, privateKey }, [port]) => {
try {
const isIdbEnable = await getIsDBEnabled()
if (!isIdbEnable) {
const cachedEvents = await self.$indexedDB.getAll({ storeName })
const decrypted = []
for (const cachedEvent of cachedEvents) {
try {
const event = decryptCrypto(cachedEvent.hash, privateKey)
if (!decrypted.find((el) => el.index === event.index)) {
decrypted.push(event)
}
} catch {
continue
}
}
const [lastEvent] = decrypted.sort((a, b) => b.blockNumber - a.blockNumber)
port.postMessage({ result: { decrypted, lastSyncBlock: lastEvent ? lastEvent.blockNumber : numbers.DEPLOYED_BLOCK } })
return
}
port.postMessage({ result: [] })
} catch (err) {
port.postMessage({ errorMessage: err.message })
}
}
const getCashedCommitmentEvents = async ({ storeName, publicKey, privateKey }, [port]) => {
try {
const isIdbEnable = await getIsDBEnabled()
if (!isIdbEnable) {
const cachedEvents = await self.$indexedDB.getAll({ storeName })
const commitments = cachedEvents.reduce((acc, curr) => {
if (!acc.find((el) => el.index === curr.index)) {
acc.push(curr)
}
return acc
}, [])
const [lastEvent] = commitments.sort((a, b) => b.blockNumber - a.blockNumber)
port.postMessage({ result: { commitments, lastSyncBlock: lastEvent ? lastEvent.blockNumber : numbers.DEPLOYED_BLOCK } })
return
}
port.postMessage({ result: [] })
} catch (err) {
port.postMessage({ errorMessage: err.message })
}
}
const saveFreshEvents = ({ data, storeName }, [port]) => {
try {
saveEvents({ events: data, storeName })
port.postMessage({ result: 'success' })
} catch (err) {
port.postMessage({ errorMessage: err.message })
}
}
const saveLastSyncBlock = async ({ lastSyncBlock }, [port]) => {
try {
await self.$indexedDB.putItem({
data: {
blockNumber: lastSyncBlock,
name: 'commitment_events_100',
},
storeName: 'last_sync_event',
})
port.postMessage({ result: 'success' })
} catch (err) {
port.postMessage({ errorMessage: err.message })
}
}
const listener = ({ data, ports }) => {
self.postMessage(data)
switch (data.eventName) {
case workerEvents.GET_COMMITMENT_EVENTS:
getCommitmentEvents(data.payload, ports)
break
// new
case workerEvents.INIT_WORKER:
initWorker(data.payload)
break
case workerEvents.GET_BATCH_EVENTS:
getBatchEvents(data.payload, ports)
break
case workerEvents.GET_BATCH_COMMITMENTS_EVENTS:
getBatchCommitmentsEvents(data.payload, ports)
break
case workerEvents.GET_EVENTS_FROM_TX_HASH:
getEventsFromTxHash(data.payload, ports)
break
case workerEvents.GET_CACHED_EVENTS:
getCashedEvents(data.payload, ports)
break
case workerEvents.GET_CACHED_COMMITMENTS_EVENTS:
getCashedCommitmentEvents(data.payload, ports)
break
case workerEvents.SAVE_EVENTS:
saveFreshEvents(data.payload, ports)
break
case workerEvents.SAVE_LAST_SYNC_BLOCK:
saveLastSyncBlock(data.payload, ports)
break
}
}
// helpers
const getIsDBEnabled = async () => {
if (!self.$indexedDB) {
await sleep(numbers.RECALL_DELAY)
}
return !self.$indexedDB || self.$indexedDB.isBlocked
}
const getIsWhitelistedDomain = () => {
const domainWhiteList = ['localhost:3000', 'nova.tornadocash.eth', 'nova.tornadocash.eth.link', 'nova.tornadocash.eth.limo']
if (self.location.host.includes('compassionate-payne-b9dc6b.netlify.app')) {
return true
}
return domainWhiteList.includes(self.location.host)
}
const poseidonHash = (items) => {
return BigNumber.from(poseidon(items).toString())
}
const unpackEncryptedMessage = (encryptedMessage) => {
if (encryptedMessage.slice(numbers.ZERO, numbers.TWO) === '0x') {
encryptedMessage = encryptedMessage.slice(numbers.TWO)
}
const messageBuff = Buffer.from(encryptedMessage, 'hex')
const nonceBuf = messageBuff.slice(numbers.ZERO, numbers.NONCE_BUF_LENGTH)
const ciphertextBuf = messageBuff.slice(numbers.EPHEM_PUBLIC_KEY_BUF_LENGTH)
const ephemPublicKeyBuf = messageBuff.slice(numbers.NONCE_BUF_LENGTH, numbers.EPHEM_PUBLIC_KEY_BUF_LENGTH)
return {
version: 'x25519-xsalsa20-poly1305',
nonce: nonceBuf.toString('base64'),
ciphertext: ciphertextBuf.toString('base64'),
ephemPublicKey: ephemPublicKeyBuf.toString('base64'),
}
}
const keyPairDecrypt = (data, privateKey) => {
return Buffer.from(decrypt(unpackEncryptedMessage(data), privateKey.slice(numbers.TWO)), 'base64')
}
const keypairSign = (privateKey, commitment, merklePath) => {
return poseidonHash([privateKey, commitment, merklePath])
}
const getNullifier = ({ amount, privateKey, publicKey, blinding, index }) => {
// eslint-disable-next-line eqeqeq
if (amount.gt(numbers.ZERO) && (index == undefined || privateKey == undefined)) {
throw new Error('Can not compute nullifier without utxo index or shielded key')
}
const commitment = poseidonHash([amount, publicKey, blinding])
const signature = privateKey ? keypairSign(privateKey, commitment, index || numbers.ZERO) : numbers.ZERO
const nullifier = poseidonHash([commitment, index || numbers.ZERO, signature])
return { commitment, nullifier }
}
const getHex = (data, from, to) => {
return data.slice(from, to).toString('hex')
}
const encryptCrypto = (string, id, key) => {
return { hash: AES.encrypt(string, key).toString(), id: HmacSHA256(id, key).toString() }
}
const decryptCrypto = (string, key) => {
const bytes = AES.decrypt(string, key)
const originalText = bytes.toString(enc.Utf8)
return JSON.parse(originalText)
}
initDataBase()
self.addEventListener('message', listener, false)

304
assets/nullifier.worker.js Normal file
View File

@ -0,0 +1,304 @@
/* eslint-disable @typescript-eslint/no-require-imports */
const { isEmpty } = require('lodash')
const { BigNumber } = require('ethers')
const { IndexedDB } = require('../services/idb')
const { sleep } = require('../utilities/helpers')
const { workerEvents, numbers } = require('../constants/worker')
const { ExtendedProvider } = require('../services/ether/ExtendedProvider')
const { POOL_CONTRACT, RPC_LIST, FALLBACK_RPC_LIST } = require('../constants/contracts')
const { TornadoPool__factory: TornadoPoolFactory } = require('../_contracts')
const getProviderWithSigner = (chainId) => {
return new ExtendedProvider(RPC_LIST[chainId], chainId, FALLBACK_RPC_LIST[chainId])
}
const initDataBase = async () => {
try {
const options = {
stores: [
{
keyPath: 'nullifier',
name: `nullifier_events_100`,
indexes: [{ name: 'transactionHash', unique: false }],
},
],
dbName: 'tornado_pool_nullifier',
}
const instance = new IndexedDB(options)
await instance.initDB()
self.$indexedDB = instance
} catch (err) {
console.log('err', err.message)
}
}
const initWorker = (chainId) => {
self.chainId = chainId
const provider = getProviderWithSigner(chainId)
setTornadoPool(chainId, provider)
initDataBase()
}
const setTornadoPool = (chainId, provider) => {
self.poolContract = TornadoPoolFactory.connect(POOL_CONTRACT[chainId], provider)
}
const saveEvents = async ({ events }) => {
try {
const isIdbEnable = await getIsDBEnabled()
if (isIdbEnable || !getIsWhitelistedDomain() || isEmpty(events)) {
return
}
self.$indexedDB.createMultipleTransactions({
data: events,
storeName: 'nullifier_events_100',
})
} catch (err) {
console.error(`saveEvents has error: ${err.message}`)
}
}
const checkUnspent = async (decryptedEvent, nullifierEvents) => {
try {
const { nullifierHash } = decryptedEvent
const isIdbEnable = await getIsDBEnabled()
if (isIdbEnable) {
const lastEvent = await self.$indexedDB.getFromIndex({
key: nullifierHash,
indexName: 'nullifier',
storeName: 'nullifier_events_100',
})
if (lastEvent) {
return undefined
}
}
const event = nullifierEvents.find((event) => {
return event.nullifier === nullifierHash
})
if (event) {
return undefined
}
return decryptedEvent
} catch (err) {
throw new Error(`Method getNullifierEvent has error: ${err.message}`)
}
}
const getCachedEvents = async () => {
let blockFrom = numbers.DEPLOYED_BLOCK
if (!self.$indexedDB) {
await sleep(numbers.RECALL_DELAY)
}
const cachedEvents = await self.$indexedDB.getAll({
storeName: 'nullifier_events_100',
})
if (cachedEvents && cachedEvents.length) {
const [latestEvent] = cachedEvents.sort((a, b) => b.blockNumber - a.blockNumber)
const currentBlock = await self.poolContract.provider.getBlockNumber()
const newBlockFrom = Number(latestEvent.blockNumber) + numbers.ONE
if (latestEvent.blockNumber === currentBlock) {
return { blockFrom, cachedEvents }
}
blockFrom = newBlockFrom > currentBlock ? currentBlock : newBlockFrom
}
return { blockFrom, cachedEvents }
}
const getNullifiers = async (blockFrom) => {
try {
const filter = self.poolContract.filters.NewNullifier()
const events = await self.poolContract.queryFilter(filter, blockFrom)
return events.map(({ blockNumber, transactionHash, args }) => ({
blockNumber,
transactionHash,
nullifier: args.nullifier,
}))
} catch (err) {
console.error('getNullifiers', err.message)
return []
}
}
const getNullifierEvents = async (cachedNullifiers, withCache = true) => {
let cached = { blockFrom: numbers.DEPLOYED_BLOCK, cachedEvents: [] }
try {
if (cachedNullifiers && cachedNullifiers.length) {
const [latestEvent] = cachedNullifiers.sort((a, b) => b.blockNumber - a.blockNumber)
const currentBlock = await self.poolContract.provider.getBlockNumber()
const newBlockFrom = Number(latestEvent.blockNumber) + numbers.ONE
if (latestEvent.blockNumber === currentBlock) {
cached.blockFrom = numbers.DEPLOYED_BLOCK
}
cached.blockFrom = newBlockFrom > currentBlock ? currentBlock : newBlockFrom
cached.cachedEvents = cachedNullifiers
} else {
cached = await getCachedEvents()
}
const { blockFrom = numbers.DEPLOYED_BLOCK, cachedEvents = [] } = cached
const nullifiers = await getNullifiers(blockFrom)
if (nullifiers.length) {
saveEvents({ events: nullifiers })
}
return withCache ? cachedEvents.concat(nullifiers) : nullifiers
} catch (err) {
throw new Error(`Method getNullifierEvents has error: ${err.message}`)
}
}
const checkUnspentEvents = async ({ cachedNullifiers, decryptedEvents }) => {
try {
if (decryptedEvents.length === numbers.ZERO) {
return {
unspentUtxo: [],
totalAmount: 0,
}
}
const nullifierEvents = await getNullifierEvents(cachedNullifiers)
let totalAmount = BigNumber.from('0')
const unspentUtxo = []
const unspentEvents = await Promise.all(decryptedEvents.map((event) => checkUnspent(event, nullifierEvents)))
unspentEvents.forEach((event) => {
if (event && !BigNumber.from(event.amount).isZero()) {
unspentUtxo.push(event)
totalAmount = totalAmount.add(event.amount)
}
})
return { totalAmount, unspentUtxo }
} catch (err) {
throw new Error(`Method checkUnspentEvents has error: ${err.message}`)
}
}
const getNullifierEventsFromTxHash = async ({ cachedNullifiers, txHash }, [getUnspentPort]) => {
try {
const lastEvents = await self.$indexedDB.getAllFromIndex({
key: txHash.toLowerCase(),
indexName: 'transactionHash',
storeName: 'nullifier_events_100',
})
if (lastEvents && lastEvents.length > numbers.ZERO) {
getUnspentPort.postMessage({ result: lastEvents })
return
}
const nullifierEvents = await getNullifierEvents(cachedNullifiers, true)
const findingEvents = nullifierEvents.filter((event) => {
return event.transactionHash.toLowerCase() === txHash.toLowerCase()
})
getUnspentPort.postMessage({ result: findingEvents })
} catch (err) {
getUnspentPort.postMessage({ errorMessage: err.message })
}
}
const getNullifierEvent = async ({ cachedNullifiers, nullifierHash }, [getUnspentPort]) => {
try {
const lastEvent = await self.$indexedDB.getFromIndex({
key: nullifierHash,
indexName: 'nullifier',
storeName: 'nullifier_events_100',
})
if (lastEvent) {
getUnspentPort.postMessage({ result: lastEvent })
return
}
const events = await getNullifierEvents(cachedNullifiers)
const [event] = events.filter((event) => {
return event.nullifier === nullifierHash
})
getUnspentPort.postMessage({ result: event })
} catch (err) {
getUnspentPort.postMessage({ errorMessage: err.message })
}
}
const updateNullifierEvents = async (cachedNullifiers, [getUnspentPort]) => {
try {
const events = await getNullifierEvents(cachedNullifiers)
getUnspentPort.postMessage({ result: events })
} catch (err) {
getUnspentPort.postMessage({ errorMessage: err.message })
}
}
const getUnspentEvents = async ({ decryptedEvents, cachedNullifiers }, [getUnspentPort]) => {
try {
const unspentEvents = await checkUnspentEvents({ decryptedEvents, cachedNullifiers })
getUnspentPort.postMessage({ result: unspentEvents })
} catch (err) {
getUnspentPort.postMessage({ errorMessage: err.message })
}
}
const listener = ({ data, ports }) => {
self.postMessage(data)
switch (data.eventName) {
case workerEvents.INIT_WORKER:
initWorker(data.payload)
break
case workerEvents.GET_NULLIFIER_EVENT:
getNullifierEvent(data.payload, ports)
break
case workerEvents.UPDATE_NULLIFIER_EVENTS:
updateNullifierEvents(data.payload, ports)
break
case workerEvents.GET_UNSPENT_EVENTS:
getUnspentEvents(data.payload, ports)
break
case workerEvents.GET_NULLIFIER_EVENTS_FROM_TX_HASH:
getNullifierEventsFromTxHash(data.payload, ports)
break
}
}
// helpers
const getIsDBEnabled = async () => {
if (!self.$indexedDB) {
await sleep(numbers.RECALL_DELAY)
}
return !self.$indexedDB || self.$indexedDB.isBlocked
}
const getIsWhitelistedDomain = () => {
const domainWhiteList = ['localhost:3000', 'nova.tornadocash.eth', 'nova.tornadocash.eth.link', 'nova.tornadocash.eth.limo']
if (self.location.host.includes('compassionate-payne-b9dc6b.netlify.app')) {
return true
}
return domainWhiteList.includes(self.location.host)
}
self.addEventListener('message', listener, false)

View File

@ -0,0 +1,83 @@
@mixin animation-full-rotate {
@keyframes animation-full-rotate {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
}
@mixin animation-full-rotate-negative {
@keyframes animation-full-rotate-negative {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(-360deg);
}
}
}
@mixin animation-walk {
@keyframes animation-walk {
0% {
background-position: 100% 50%;
}
100% {
background-position: 0 50%;
}
}
}
@mixin animation-from-invisible {
@keyframes animation-from-invisible {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
}
@mixin animation-transform-line {
@keyframes animation-transform-line {
0% {
opacity: 0;
transform: translateX(-20rem);
}
100% {
opacity: 1;
transform: translateX(0);
}
}
}
@mixin stroke-spacing-top {
@keyframes stroke-spacing-top {
0% {
stroke-dashoffset: 2000;
}
50% {
stroke-dashoffset: 0;
}
100% {
stroke-dashoffset: -2000;
}
}
}
@mixin stroke-spacing-bottom {
@keyframes stroke-spacing-bottom {
0% {
stroke-dashoffset: -2000;
}
50% {
stroke-dashoffset: 0;
}
100% {
stroke-dashoffset: 2000;
}
}
}

View File

@ -0,0 +1,41 @@
$breakpoints: (
'xs': (
min-width: 22.5em,
),
//360,
'xsm': (
min-width: 32.5em,
),
//520,
'sm': (
min-width: 48em,
),
//768,
'md': (
min-width: 64em,
),
//1024,
'lg': (
min-width: 76.5em,
),
//1224,
'xl': (
min-width: 90em,
),
//1440,
'xxl': (
min-width: 240em,
),
//3840,
) !default;
@mixin media($breakpoint) {
@if map-has-key($breakpoints, $breakpoint) {
@media #{inspect(map-get($breakpoints, $breakpoint))} {
@content;
}
} @else {
@warn "Unfortunately, no value could be retrieved from `#{$breakpoint}`. "
+ "Available breakpoints are: #{map-keys($breakpoints)}.";
}
}

View File

@ -0,0 +1,98 @@
// MAIN COLORS
$color-transparent: transparent;
$color-white: #fafafa;
$color-white-003: hsla(0, 0%, 100%, 0.03);
$color-white-005: hsla(0, 0%, 100%, 0.05);
$color-white-01: hsla(0, 0%, 100%, 0.1);
$color-white-02: hsla(0, 0%, 100%, 0.2);
$color-white-03: hsla(0, 0%, 100%, 0.3);
$color-white-04: hsla(0, 0%, 100%, 0.4);
$color-white-08: hsla(0, 0%, 100%, 0.8);
$color-black: #161616;
$color-black-004: hsla(0, 0%, 0%, 0.04);
$color-black-01: hsla(0, 0%, 0%, 0.1);
$color-black-02: hsla(0, 0%, 0%, 0.2);
$color-black-04: hsla(0, 0%, 0%, 0.4);
$color-black-06: hsla(0, 0%, 0%, 0.6);
$color-black-08: hsla(0, 0%, 0%, 0.8);
$color-grey: #b2b2b2;
$color-grey-medium: #61626d;
$color-grey-bold: #4f5059;
$color-grey-heavy: #3a3a42;
$color-grey-hard: #37383e;
$color-dark: #1d1e23;
$color-dark-light: #3f4047;
$color-dark-heavy: #2a2b31;
$color-dark-hard: #1e1e1e;
$color-default: #69db99;
$color-default-light: #0b152d;
$color-default-dark: #091226;
$color-gradient-green: linear-gradient(268.07deg, #69db99 -0.94%, #51cb84 105.66%);
$color-gradient-green-light: linear-gradient(268.07deg, #90e4b3 -0.94%, #56cc88 105.66%);
$color-gradient-green-disabled: linear-gradient(215.2deg, #3a3a42 -4.49%, #2a2b31 107.38%),
linear-gradient(268.07deg, #69db99 -0.94%, #51cb84 105.66%);
$color-primary: #10b3ff;
$color-primary-light: #1b3156;
$color-bg: #202122;
$color-bg-primary: #46474e;
$color-overlay-modal: hsla(210, 3%, 13%, 0.8);
$color-gradient-black: linear-gradient(
238.73deg,
hsla(228, 6%, 17%, 1),
-1.77%,
hsla(225, 5%, 15%, 1),
100%,
hsla(210, 3%, 13%, 1)
);
$color-gradient-grey: linear-gradient(215.2deg, #3a3a42 -4.49%, #2a2b31 107.38%);
$color-green: $color-default;
$color-red: #e45050;
$color-yellow: #ffc01f;
$color-orange: #ff8a00;
// STATUS
$color-success: $color-default;
$color-danger: $color-red;
$color-warning: $color-yellow;
$color-alert: $color-orange;
// INPUTS
$color-input-bg: $color-bg-primary;
$color-input-bg-light: $color-grey-medium;
$color-input-bg-bold: $color-grey-bold;
$color-input-bg-disabled: $color-grey-hard;
$color-input-placeholder: $color-grey;
$color-input-caret: $color-white;
// CHECKBOX
$color-checkbox-border: $color-grey;
$color-input-bg-light: $color-grey-medium;
$color-input-bg-bold: $color-grey-bold;
$color-input-bg-disabled: $color-grey-hard;
$color-input-placeholder: $color-grey;
$color-input-caret: $color-white;
// LINKS
$color-link-text: $color-grey;
$color-link-hover: $color-default;
//BLOCKS
$color-block-bg: $color-grey-hard;
//MODALS
$color-modal-bg: $color-bg;
//ERRORS
$color-errors-bg: rgba(193, 61, 84, 0.34);

View File

@ -0,0 +1,10 @@
$duration-animation-0s: 0s;
$duration-animation-02s: 200ms;
$duration-animation-025s: 250ms;
$duration-animation-03s: 300ms;
$duration-animation-04s: 400ms;
$duration-animation-05s: 500ms;
$duration-animation-06s: 600ms;
$duration-animation-1s: 1s;
$duration-animation-1200ms: 1.2s;
$duration-animation-2000ms: 2s;

11
assets/styles/_fonts.scss Normal file
View File

@ -0,0 +1,11 @@
$font-family-main: 'Montserrat', 'Helvetica Neue', 'Helvetica', 'Verdana', 'Arial', sans-serif;
$font-weight-regular: 400;
$font-weight-medium: 500;
$font-weight-semiBold: 600;
$font-weight-bold: 700;
$font-style-normal: normal;
$font-style-italic: italic;
$font-style-oblique: oblique;
$font-style-inherit: inherit;

View File

@ -0,0 +1,8 @@
$zIndex-7: 7;
$zIndex-6: 6;
$zIndex-5: 5;
$zIndex-4: 4;
$zIndex-3: 3;
$zIndex-2: 2;
$zIndex-1: 1;
$zIndex-negative: -1;

165
assets/styles/_modal.scss Normal file
View File

@ -0,0 +1,165 @@
.vue-modal-resizer {
position: absolute;
right: 0;
bottom: 0;
width: 1.2rem;
height: 1.2rem;
display: block;
background: $color-transparent;
z-index: $zIndex-7;
overflow: hidden;
cursor: se-resize;
&::after {
position: absolute;
content: '';
left: 0;
top: 0;
width: 0;
height: 0;
display: block;
background: $color-transparent;
border-bottom: 1rem solid #ddd;
border-left: 1rem solid $color-transparent;
}
.vue-modal-resizer.clicked::after {
border-bottom: 1rem solid #369be9;
}
}
.vm {
&--block-scroll {
overflow: hidden;
width: 100vw;
}
&--container {
position: fixed;
box-sizing: border-box;
left: 0;
top: 0;
width: 100%;
height: 100vh;
z-index: $zIndex-6;
}
&--overlay {
position: fixed;
box-sizing: border-box;
left: 0;
top: 0;
width: 100%;
height: 100vh;
background-color: $color-overlay-modal;
opacity: $opacity-default;
}
&--container.scrollable {
height: 100%;
min-height: 100vh;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
.vm--modal {
margin-bottom: 0.2rem;
}
}
&--modal {
box-sizing: border-box;
position: relative;
background-color: $color-bg-primary;
background-image: $color-gradient-grey;
border-radius: 0.6rem;
overflow-x: hidden;
overflow-y: auto;
}
&--top-right-slot {
position: absolute;
right: 0;
top: 0;
display: block;
}
}
.vm-transition {
&--overlay-enter-active,
&--overlay-leave-active {
transition: all 50ms;
}
&--overlay-enter,
&--overlay-leave-active {
opacity: 0;
}
&--modal-enter-active,
&--modal-leave-active {
transition: all 400ms;
}
&--modal-enter,
&--modal-leave-active {
opacity: 0;
transform: translateY(-2rem);
}
&--default-enter,
&--default-leave-active {
opacity: 0;
}
}
.vm-transition .vm-transition--default-enter-active,
.vm-transition--default-leave-active {
transition: all 2ms;
}
.vue-dialog {
font-size: 1.4rem;
div {
box-sizing: border-box;
}
&-content {
flex: 1 0 auto;
width: 100%;
padding: 1.4rem;
}
&-content-title {
font-weight: 600;
padding-bottom: 1.4rem;
}
&-buttons {
display: flex;
flex: 0 1 auto;
width: 100%;
border-top: 0.1rem solid #eee;
}
&-buttons-none {
width: 100%;
padding-bottom: 1.4rem;
}
&-button {
font-size: inherit;
background: transparent;
padding: 0;
margin: 0;
border: 0;
cursor: pointer;
box-sizing: border-box;
line-height: 4rem;
height: 4rem;
color: inherit;
font: inherit;
outline: none;
&:hover {
background: #f9f9f9;
}
&:active {
background: #f3f3f3;
}
&:not(:first-of-type) {
border-left: 0.1rem solid #eee;
}
}
}
// NO PADDING USAGE
.modal {
box-shadow: none;
&_top {
margin: 3rem 0 0;
}
&_black {
background-color: $color-black;
background-image: none;
}
}

View File

@ -0,0 +1,11 @@
$opacity-default: 1;
$opacity-09: 0.9;
$opacity-08: 0.8;
$opacity-07: 0.7;
$opacity-06: 0.6;
$opacity-05: 0.5;
$opacity-04: 0.4;
$opacity-03: 0.3;
$opacity-02: 0.2;
$opacity-01: 0.1;
$opacity-invisible: 0;

20
assets/styles/_sizes.scss Normal file
View File

@ -0,0 +1,20 @@
// GRID
$size-grid-padding: 1.3rem;
// CONTENT
$size-content-block: 38rem;
$size-content-width-min: 25rem;
// INPUTS
$size-input-padding-vertical: 0.75em;
$size-input-padding-horizontal: 1em;
$size-input-padding: $size-input-padding-vertical $size-input-padding-horizontal;
$size-input-border: 0.1rem;
$size-input-border-radius: (1em + $size-input-padding-vertical * 2) / 10;
$size-input-button: 8rem;
// BUTTONS
$size-button-padding-vertical: $size-grid-padding / 2;
$size-button-padding-horizontal: $size-grid-padding / 1.5;
$size-button-padding: $size-button-padding-vertical $size-button-padding-horizontal;

View File

@ -0,0 +1,78 @@
.tooltip {
max-width: 20.8rem;
z-index: $zIndex-7;
.tooltip-inner {
padding: 1.2rem;
font-weight: $font-weight-medium;
font-size: 1.2rem;
line-height: 1.34;
color: $color-white;
background-color: $color-black;
border-radius: 0.4rem;
}
.tooltip-arrow {
width: 0;
height: 0;
border-style: solid;
position: absolute;
margin: 0.5rem;
border-color: $color-black;
z-index: $zIndex-1;
}
&[x-placement^='top'] {
margin-bottom: 0.5rem;
.tooltip-arrow {
border-width: 0.5rem 0.5rem 0 0.5rem;
border-left-color: $color-transparent;
border-right-color: $color-transparent;
border-bottom-color: $color-transparent;
bottom: -0.5rem;
left: calc(50% - 0.5rem);
margin-top: 0;
margin-bottom: 0;
}
}
&[x-placement^='bottom'] {
margin-top: 0.5rem;
.tooltip-arrow {
border-width: 0 0.5rem 0.5rem 0.5rem;
border-left-color: $color-transparent;
border-right-color: $color-transparent;
border-top-color: $color-transparent;
top: -0.5rem;
left: calc(50% - 0.5rem);
margin-top: 0;
margin-bottom: 0;
}
}
&[x-placement^='right'] {
margin-left: 0.5rem;
.tooltip-arrow {
border-width: 0.5rem 0.5rem 0.5rem 0;
border-left-color: $color-transparent;
border-top-color: $color-transparent;
border-bottom-color: $color-transparent;
left: -0.5rem;
top: calc(50% - 0.5rem);
margin-left: 0;
margin-right: 0;
}
}
&[x-placement^='left'] {
margin-right: 0.5rem;
.tooltip-arrow {
border-width: 0.5rem 0 0.5rem 0.5rem;
border-top-color: $color-transparent;
border-right-color: $color-transparent;
border-bottom-color: $color-transparent;
right: -0.5rem;
top: calc(50% - 0.5rem);
margin-left: 0;
margin-right: 0;
}
}
}

View File

@ -0,0 +1,11 @@
// Styles
// include into nuxt.config.ts
@import 'fonts';
@import 'sizes';
@import 'colors';
@import 'layers';
@import 'opacity';
@import 'durations';
@import 'animations';
@import 'breakpoints';

19
assets/styles/index.scss Normal file
View File

@ -0,0 +1,19 @@
// Components
@import 'modal';
@import 'tooltip';
:export {
// Any values that need to be accessible from JavaScript
// outside of a Vue component can be defined here, prefixed
// with `global-` to avoid conflicts with classes. For
// example:
//
// global-grid-padding: $size-grid-padding;
//
// Then in a JavaScript file, you can import this object
// as you would normally with:
//
// import design from '@design'
//
// console.log(design['global-grid-padding'])
}

186
components/ActionButton.vue Normal file
View File

@ -0,0 +1,186 @@
<template>
<div :class="$style.actionWrapper">
<base-fee-info :amount="amount" :is-custom="isCustom" :error="isBaseFeeInfoError" :text="feeInfoText" :method="type" />
<base-button v-if="shouldChangeChain" full-width @click="onChainChange">Change network</base-button>
<base-button v-else-if="shouldWalletConnect" full-width @click="connectModal">Connect wallet</base-button>
<span v-else v-tooltip="actionButtonTooltip" :class="$style.actionWrapper__actionButton">
<base-button full-width :loading="isActionButtonLoading" :disabled="isActionButtonDisabled" @click="onAction">
{{ actionButtonText(actionText, tokensToSend(amount, type, isRelayer)) }}
</base-button>
</span>
</div>
</template>
<script>
import { mapActions, mapGetters, mapMutations, mapState } from 'vuex'
import { AccountMutation } from '@/types'
import { getWalletProvider } from '@/services'
export default {
inject: ['setupProvider'],
props: {
amount: {
type: String,
required: true,
},
isCustom: {
type: Boolean,
default: false,
},
recipientAddress: {
type: String,
required: true,
},
isEnoughBalance: {
type: Boolean,
required: true,
},
isDisabled: {
type: Boolean,
required: true,
},
isLoading: {
type: Boolean,
required: true,
},
type: {
type: String,
required: true,
},
actionText: {
type: String,
required: true,
},
feeInfoText: {
type: String,
required: true,
},
onAction: {
type: Function,
required: true,
},
onResetError: {
type: Function,
required: true,
},
},
data: function () {
return {
isActionLoader: false,
isNetworkChecking: false,
}
},
computed: {
...mapGetters('transaction', ['isPendingTxs']),
...mapState('account', ['accountAddress']),
...mapGetters('account', ['isRelayer', 'isNotRegisteredInPool', 'accountAddress']),
...mapGetters('relayer', ['currentRelayer', 'isRelayersFetching']),
...mapGetters('application', ['tokensToSend', 'actionButtonText', 'isProcessingStarted']),
...mapGetters('wallet', ['chainId', 'l2ChainId', 'isL1Chain', 'mismatchNetwork', 'isConnected', 'nameProvider']),
isBaseFeeInfoError() {
return !this.isEnoughBalance && Boolean(this.amount)
},
shouldChangeChain() {
return this.isConnected && (this.isL1Chain || this.isMismatchNetwork) && !this.isRelayer
},
shouldWalletConnect() {
return !this.isConnected && !this.isRelayer && this.accountAddress
},
actionButtonTooltip() {
if (this.isMismatchNetwork) {
return 'Mismatch network, please switch to Relayer method'
}
if (this.isNotRegisteredInPool) {
return 'Setup account first'
}
if (this.isPendingTxs) {
return 'Has pending transactions'
}
return null
},
isActionButtonLoading() {
return this.isLoading || this.isRelayersFetching || this.isActionLoader || this.isNetworkChecking
},
isActionButtonDisabled() {
const isInvalidRelayer = this.isRelayer && !this.currentRelayer?.url
const isFilledInputs = Boolean(Number(this.amount)) && Boolean(this.recipientAddress)
const isActionDisabled = this.isNotRegisteredInPool || !isFilledInputs || this.isDisabled || this.isMismatchNetwork
const isLoading = this.isActionButtonLoading || this.isPendingTxs || this.isProcessingStarted
return isActionDisabled || isLoading || !this.isEnoughBalance || isInvalidRelayer
},
isInputDisabled() {
return this.isLoading
},
isMismatchNetwork() {
if (this.isRelayer) {
return false
}
return this.mismatchNetwork
},
},
async created() {
if (this.accountAddress && !this.isRelayer) {
await this.checkNetwork()
}
},
methods: {
...mapMutations('account', [AccountMutation.CLEAR_ACCOUNT]),
...mapActions('wallet', ['changeChain', 'checkNetwork', 'checkAppNetwork']),
...mapActions('application', ['errorHandler']),
async getProvider() {
const provider = getWalletProvider(this.nameProvider || 'METAMASK')
const network = await provider.checkNetworkVersion()
return network
},
async checkNetwork() {
try {
this.isNetworkChecking = true
const network = await this.getProvider()
await this.checkAppNetwork(network)
} catch (err) {
console.error('Method CheckNetwork has error:', err.message)
} finally {
this.isNetworkChecking = false
}
},
async onChainChange() {
try {
this.isActionLoader = true
this.onResetError()
await this.changeChain(this.isRelayer ? this.l1ChainId : this.l2ChainId)
} catch (err) {
await this.errorHandler({ errorMessage: err.message, title: 'Change network error' })
} finally {
this.isActionLoader = false
}
},
async connectModal() {
try {
this.isActionLoader = true
await this.setupProvider('METAMASK')
} catch (err) {
} finally {
this.isActionLoader = false
}
},
},
}
</script>
<style lang="scss" module scoped>
.actionWrapper {
width: 100%;
position: relative;
&__actionButton {
width: 100%;
display: block;
}
}
</style>

7
components/README.md Normal file
View File

@ -0,0 +1,7 @@
# COMPONENTS
**This directory is not required, you can delete it if you don't want to use it.**
The components directory contains your Vue.js Components.
_Nuxt.js doesn't supercharge these components._

View File

@ -0,0 +1,82 @@
<template>
<button :class="[$style.item, { [$style.item__selected]: currentValue === selected }]" @click="setSelected(currentValue)">
{{ renderedValue }}
</button>
</template>
<script>
import { directive as onClickAway } from 'vue-clickaway'
export default {
directives: {
onClickAway: onClickAway,
},
props: {
option: {
type: [Object, String],
required: true,
},
selected: {
type: String,
required: true,
},
setSelected: {
type: Function,
required: true,
},
},
computed: {
currentValue() {
return this.option.value || this.option
},
renderedValue() {
return this.option.label ? `${this.currentValue} ${this.option.label}` : this.currentValue
},
},
methods: {
getValue(option) {
return option.value || option
},
},
}
</script>
<style lang="scss" module>
.item {
padding: 1.5rem 2rem 1.4rem;
width: 100%;
font-family: $font-family-main;
font-weight: $font-weight-medium;
font-size: 1.8rem;
line-height: 1.2;
color: $color-grey;
text-align: left;
background-color: $color-transparent;
border: none;
border-bottom: 0.1rem solid $color-dark;
box-shadow: 0 0.1rem $color-dark-light;
transition: color $duration-animation-02s ease, background-color $duration-animation-02s ease;
cursor: pointer;
outline: none;
user-select: none;
&:first-child {
padding: 1.8rem 2rem 1.4rem;
}
&:last-child {
border-color: $color-transparent;
box-shadow: none;
}
&:hover:not([disabled]) {
color: $color-white;
border-bottom: 0.1rem solid $color-grey-heavy;
background-color: $color-grey-heavy;
}
&:focus-within:not([disabled]),
&:active:not([disabled]) {
color: $color-white;
}
&__selected {
color: $color-white;
}
}
</style>

271
components/base-button.vue Normal file
View File

@ -0,0 +1,271 @@
<template>
<button
v-bind="$attrs"
:disabled="isDisabled"
:class="[
$style.styledButton,
$style[type],
$style[size],
{ [$style.fullWidth]: fullWidth },
{ [$style.freeSize]: freeSize },
{ [$style.loading]: loading },
]"
v-on="$listeners"
>
<slot />
</button>
</template>
<script>
export default {
inheritAttrs: false,
props: {
fullWidth: {
type: Boolean,
default: false,
},
freeSize: {
type: Boolean,
default: false,
},
loading: {
type: Boolean,
default: false,
},
disabled: {
type: Boolean,
default: false,
},
type: {
type: String,
default: 'defaultType',
validator(value) {
return ['defaultType', 'primary', 'link'].includes(value)
},
},
size: {
type: String,
default: 'defaultSize',
validator(value) {
return ['defaultSize', 'large', 'medium', 'small', 'mini', 'symbol', 'square'].includes(value)
},
},
},
computed: {
isDisabled() {
return this.disabled || this.loading
},
},
}
</script>
<style lang="scss" module>
@include animation-full-rotate;
.styledButton {
position: relative;
margin: 0;
width: auto;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
font-family: $font-family-main;
font-weight: $font-weight-semiBold;
letter-spacing: normal;
border: none;
border-radius: 0.4rem;
transition: all $duration-animation-02s ease-in, text-indent $duration-animation-0s;
cursor: pointer;
overflow: hidden;
z-index: $zIndex-1;
outline: none;
&:disabled {
cursor: not-allowed;
}
&::-moz-focus-inner {
border: none;
}
}
.fullWidth {
width: 100%;
height: 100%;
}
/* Types */
/* defaultType, primary, link */
.defaultType {
color: $color-dark-hard;
background-color: $color-default;
background-image: $color-gradient-green;
background-repeat: no-repeat;
&::before,
&::after {
content: '';
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 0;
display: block;
z-index: $zIndex-negative;
}
&::before {
background-image: $color-gradient-green;
}
&::after {
opacity: $opacity-invisible;
background-image: $color-gradient-green-light;
transition: transform $duration-animation-02s ease-in, opacity $duration-animation-02s ease-in;
}
&:disabled {
color: $color-white-02;
background-image: $color-gradient-green-disabled;
border: 0.1rem solid $color-grey-bold;
&::before {
opacity: $opacity-invisible;
}
&::after {
transition: unset;
}
}
&:hover:not([disabled]) {
&::after {
opacity: $opacity-default;
}
}
&:focus-within:not([disabled]) {
box-shadow: 0 0 0.4rem 0 $color-default;
}
&:active:not([disabled]) {
transform: translateY(0.2rem);
}
}
.primary {
font-weight: $font-weight-medium;
color: $color-grey;
background-color: $color-transparent;
border: 0.1rem solid $color-grey;
&:disabled {
color: $color-grey-hard;
background-color: $color-transparent;
border-color: $color-grey-hard;
}
&:hover:not([disabled]) {
color: $color-white;
border-color: $color-white;
}
&:focus-within:not([disabled]),
&:active:not([disabled]) {
color: $color-grey-medium;
background-color: $color-white;
border-color: $color-white;
}
&:active:not([disabled]) {
transform: translateY(0.2rem);
}
}
.link {
font-weight: $font-weight-medium;
color: $color-link-text;
background-color: $color-transparent;
text-decoration: underline;
&:disabled {
color: $color-grey-hard;
}
&:hover:not([disabled]),
&:focus-within:not([disabled]),
&:active:not([disabled]) {
color: $color-link-hover;
}
}
/* Sizes */
/* defaultSize, large, medium, small, mini, symbol, square */
.defaultSize {
padding: 0.4rem 1.6rem;
min-width: 11rem;
height: 5rem;
font-size: 1.6rem;
line-height: 1.44;
}
.large {
padding: 1.2rem 2rem;
min-width: 14rem;
height: 5.8rem;
font-size: 1.8rem;
line-height: 1.44;
}
.medium {
padding: 0.8rem 2rem;
min-width: 5.2rem;
height: 4rem;
font-size: 1.6rem;
line-height: 1.14;
}
.small {
padding: 0.5rem 1.2rem;
min-width: 3rem;
height: auto;
font-size: 1.4rem;
line-height: 1.67;
}
.mini {
padding: 0.4rem;
min-width: 3.2rem;
height: 3.2rem;
font-size: 1.2rem;
line-height: 1;
}
.symbol {
padding: 0.4rem;
min-width: 3.2rem;
max-width: 3.2rem;
height: 3.2rem;
font-size: 1.2rem;
line-height: 1;
}
.freeSize {
padding: 0;
min-width: auto;
}
.loading {
position: relative;
text-indent: -1000%;
overflow: hidden;
&::before {
display: none;
}
&::after {
content: '';
margin: auto;
top: 0;
left: 0;
right: 0;
bottom: 0;
position: absolute;
display: block;
width: 2rem;
height: 2rem;
background-color: $color-transparent;
background-image: none;
border: 0.2rem solid $color-white;
border-color: $color-white $color-transparent $color-white $color-transparent;
border-radius: 50%;
animation: animation-full-rotate $duration-animation-1200ms linear infinite;
opacity: $opacity-default;
}
}
</style>

View File

@ -0,0 +1,120 @@
<template>
<label :class="$style.checkbox">
<input
:id="id"
name="checkbox"
type="checkbox"
:checked="checked"
:disabled="disabled"
:class="$style.checkbox__input"
v-on="$listeners"
@input="$emit('update:modelValue', $event.target.checked)"
/>
<span :class="$style.checkbox__container">
<span :class="$style.checkbox__icon"></span>
</span>
</label>
</template>
<script>
export default {
model: {
event: 'update:modelValue',
},
props: {
modelValue: {
type: Boolean,
},
label: {
type: String,
required: false,
},
id: {
type: String,
required: false,
},
checked: {
type: Boolean,
default: false,
},
disabled: {
type: Boolean,
default: false,
},
},
emits: ['update:modelValue'],
}
</script>
<style lang="scss" module>
.checkbox {
display: inline-flex;
justify-content: flex-start;
align-items: center;
cursor: pointer;
&__container {
position: relative;
display: inline-flex;
justify-content: center;
align-items: center;
width: 1.6rem;
height: 1.6rem;
background-color: $color-transparent;
border: 0.1rem solid $color-checkbox-border;
border-radius: 0.4rem;
transition: background-color $duration-animation-02s, borber-color $duration-animation-02s;
}
&__icon {
left: 0;
position: absolute;
display: inline-block;
opacity: $opacity-invisible;
transition: opacity $duration-animation-02s;
&::before,
&::after {
content: '';
position: absolute;
top: 50%;
left: -0.2rem;
width: 1.8rem;
height: 0.1rem;
background-color: currentcolor;
transform: translate(0, -50%) rotate(-45deg);
z-index: $zIndex-1;
}
&::after {
transform: translate(0, -50%) rotate(45deg);
}
}
&__input {
position: absolute;
margin: -0.1rem;
width: 0.1rem;
height: 0.1rem;
clip: rect(0.1rem 0.1rem 0.1rem 0.1rem);
&:disabled {
opacity: $opacity-05;
cursor: not-allowed;
}
&:hover:not([disabled]) ~ .checkbox__container {
background-color: $color-white-005;
}
&:focus:not([disabled]) ~ .checkbox__container,
&:checked:not([disabled]) ~ .checkbox__container {
border-color: $color-white;
}
&:checked:not([disabled]) ~ .checkbox__container > .checkbox__icon {
opacity: $opacity-default;
}
&:focus:checked:not([disabled]) ~ .checkbox__container {
background-color: darken($color-white, 84%);
}
}
}
.checkbox[disabled] .checkbox__container,
.checkbox__input:disabled + .checkbox__container {
opacity: $opacity-06;
filter: grayscale(40%);
cursor: not-allowed;
}
</style>

View File

@ -0,0 +1,38 @@
<template>
<a v-tooltip="tooltip" :href="explorerLink" target="_blank" rel="noopener noreferrer">
<slot />
</a>
</template>
<script>
import { getEtherscanLink } from '@/utilities'
export default {
props: {
value: {
type: String,
required: true,
},
tooltip: {
type: String,
default: null,
},
chainId: {
type: String,
required: true,
},
type: {
type: String,
required: true,
validator(value) {
return ['transaction', 'token', 'address', 'block'].includes(value)
},
},
},
computed: {
explorerLink() {
return getEtherscanLink(Number(this.chainId), this.value, this.type)
},
},
}
</script>

View File

@ -0,0 +1,255 @@
<template>
<div :class="$style.feeInfo">
<div :class="$style.feeInfo__method">
<h5 :class="$style.feeInfo__methodTitle">{{ text }}</h5>
<div :class="$style.feeInfo__settings">
<span :class="$style.feeInfo__itemTitle">{{ transferMethod }}</span>
<base-button type="link" size="symbol" @click="openSettingsModal">
<base-icon name="settings" size="small" />
</base-button>
</div>
</div>
<div v-if="withdrawalRelayerFee" :class="$style.feeInfo__item">
<span :class="$style.feeInfo__itemTitle">Relayer fee</span>
<span v-if="withdrawalRelayerFee" :class="$style.feeInfo__itemValue">{{ withdrawalRelayerFee }} %</span>
<span v-else :class="$style.feeInfo__itemValue">-</span>
</div>
<div v-if="l1FeeAmount" :class="$style.feeInfo__item">
<span :class="$style.feeInfo__itemTitle">L1 network fee</span>
<span v-if="l1FeeAmount" :class="$style.feeInfo__itemValue">{{ l1FeeAmount }} {{ chainSymbol }}</span>
<span v-else :class="$style.feeInfo__itemValue">-</span>
</div>
<div v-if="isRelayer" :class="$style.feeInfo__item">
<span :class="$style.feeInfo__itemTitle">{{ transferRelayerFee ? 'Relayer fee' : 'Total fee' }}</span>
<span v-if="fee" :class="$style.feeInfo__itemValue">{{ fee }} {{ chainSymbol }}</span>
<span v-else :class="$style.feeInfo__itemValue">-</span>
</div>
<div v-if="isWithdraw" :class="[$style.feeInfo__item, $style.feeInfo__item_last, { [$style.feeInfo__error]: error }]">
<span :class="$style.feeInfo__resultTitle">To receive</span>
<span v-if="toReceive" :class="$style.feeInfo__resultValue"> {{ toReceive }} {{ chainSymbol }} </span>
<span v-else :class="$style.feeInfo__itemValue">-</span>
</div>
<div :class="[$style.feeInfo__result, { [$style.feeInfo__error]: error }]">
<span :class="$style.feeInfo__resultTitle">Total</span>
<span v-if="amounts.toSend" :class="$style.feeInfo__resultValue"> {{ amounts.toSend }} {{ chainSymbol }} </span>
<span v-else :class="$style.feeInfo__itemValue">-</span>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { SettingsModal } from '@/modals'
import { CHAINS, numbers } from '@/constants'
import { createModalArgs, toDecimalsPlaces, toWei, fromWei, isAmount } from '@/utilities'
export default {
inject: ['setupProvider'],
props: {
amount: {
type: String,
required: true,
},
isCustom: {
type: Boolean,
default: true,
},
method: {
type: String,
required: true,
},
text: {
type: String,
required: true,
},
error: {
type: Boolean,
default: false,
},
},
computed: {
...mapGetters('wallet', ['l1ChainId', 'l2ChainId']),
...mapGetters('relayer', ['ethRate', 'currentRelayer']),
...mapGetters('account', ['isRelayer', 'transferMethod']),
...mapGetters('application', ['l1Fee', 'networkFee', 'operationFee', 'amountsToView', 'operationAmounts']),
isWithdraw() {
return this.method === 'withdraw'
},
l1FeeAmount() {
if (!this.isWithdraw) {
return null
}
if (!this.l1Fee) {
return null
}
return toDecimalsPlaces(fromWei(this.l1Fee), numbers.FEE_PRECISION)
},
transferRelayerFee() {
if (!this.isRelayer || !this.currentRelayer) {
return null
}
if (this.isWithdraw) {
return null
}
const { serviceFee } = this.currentRelayer
const relayerFee = fromWei(serviceFee.transfer)
return toDecimalsPlaces(relayerFee, numbers.FEE_PRECISION)
},
withdrawalRelayerFee() {
if (!this.isRelayer) {
return null
}
if (this.isWithdraw) {
const { serviceFee } = this.currentRelayer
return serviceFee.withdrawal
}
return null
},
amounts() {
return this.amountsToView({
amount: this.amount,
method: this.method,
isRelayer: this.isRelayer,
withRelayer: this.isRelayer,
isCustom: this.isCustom,
})
},
toReceive() {
if (!this.isWithdraw || !isAmount(this.amounts.toReceive)) {
return null
}
return this.amounts.toReceive
},
fee() {
if (!isAmount(this.amount)) {
return
}
let amountInWei = toWei(this.amount)
let operationFee = this.operationFee(amountInWei, this.method)
if (this.isWithdraw) {
amountInWei = amountInWei.add(this.l1Fee)
operationFee = this.operationFee(amountInWei, this.method).add(this.l1Fee)
}
return toDecimalsPlaces(fromWei(operationFee), numbers.FEE_PRECISION)
},
chainSymbol() {
return CHAINS[this.l1ChainId].symbol
},
},
methods: {
amountGetter() {
return this.amount
},
openSettingsModal() {
const dataModal = createModalArgs(SettingsModal, {
method: this.method,
isCustom: this.isCustom,
amountGetter: this.amountGetter,
setupProvider: this.setupProvider,
})
this.$modal.show(...dataModal)
},
},
}
</script>
<style lang="scss" module>
.feeInfo {
margin: 0 0 2.4rem;
padding: 1.1rem 0 1.8rem;
width: 100%;
background-color: $color-white-003;
border-radius: 0.4rem;
&__method {
margin: 0 0 0.8rem;
padding: 0 1.2rem 0 2rem;
display: flex;
justify-content: space-between;
align-items: center;
}
&__methodTitle {
margin: 0;
font-weight: $font-weight-semiBold;
font-size: 1.4rem;
line-height: 1;
color: $color-white;
}
&__settings {
display: flex;
align-items: center;
}
&__item {
margin: 0;
padding: 0 2rem 1.6rem;
display: flex;
justify-content: space-between;
align-items: center;
font-weight: $font-weight-regular;
&_last {
margin: 0 0 1.6rem;
border-bottom: 0.1rem solid $color-dark;
box-shadow: 0 0.1rem $color-dark-light;
}
}
&__itemTitle {
margin: 0;
font-weight: inherit;
font-size: 1.4rem;
line-height: 1;
color: $color-white;
&:first-letter {
text-transform: uppercase;
}
}
&__itemValue {
margin: 0;
font-weight: inherit;
font-size: 1.4rem;
line-height: 1;
color: $color-white;
}
&__result {
padding: 0 2rem;
display: flex;
justify-content: space-between;
align-items: center;
font-weight: $font-weight-semiBold;
}
&__resultTitle {
margin: 0;
font-weight: inherit;
font-size: 1.4rem;
line-height: 1;
color: $color-white;
}
&__resultValue {
margin: 0;
font-weight: inherit;
font-size: 1.4rem;
line-height: 1;
color: $color-white;
}
&__error {
.feeInfo__itemTitle,
.feeInfo__itemValue,
.feeInfo__resultValue,
.feeInfo__resultTitle {
color: $color-danger;
}
}
}
</style>

134
components/base-icon.vue Normal file
View File

@ -0,0 +1,134 @@
<template>
<span v-tooltip="tooltip" :class="[$style.icon, $style[size], { [$style.withTooltip]: tooltip }]">
<component :is="iconComponent" role="img" />
</span>
</template>
<script>
const iconsNames = [
'Key',
'Auth',
'Fund',
'Copy',
'Logo',
'Info',
'Tick',
'Exit',
'Error',
'Arrow',
'Cross',
'Stats',
'Loader',
'Goerli',
'Github',
'Twitter',
'Success',
'Warning',
'Binance',
'Tornado',
'Download',
'LogoNova',
'Withdraw',
'Settings',
'Metamask',
'Telegram',
'Ethereum',
'Outgoing',
'Incoming',
'CircleCross',
'TransferTop',
'TransferBottom',
]
const icons = iconsNames.reduce((acc, curr) => {
acc[curr.toLowerCase()] = () => import(`./icons/${curr}.vue`)
return acc
}, {})
export default {
props: {
name: {
type: String,
required: true,
validator(value) {
return Boolean(iconsNames.find((el) => el.toLowerCase() === value.toLowerCase()))
},
},
size: {
type: String,
default: 'default',
validator(value) {
return ['default', 'extraMedium', 'medium', 'small', 'large', 'xlarge', 'xl', 'fill', 'auto', 'symbol'].includes(value)
},
},
tooltip: {
type: String,
required: false,
},
},
computed: {
iconComponent() {
return icons[this.name]
},
},
}
</script>
<style lang="scss" module>
.icon {
padding: 0;
display: block;
color: inherit;
fill: currentColor;
svg {
display: block;
}
}
.withTooltip {
cursor: help;
}
/* Sizes */
/* default, small, medium, extraMedium, large, xlarge, xl, fill, auto */
.default {
width: 2.4rem;
height: 2.4rem;
}
.small {
width: 1.4rem;
height: 1.4rem;
}
.medium {
width: 1.6rem;
height: 1.6rem;
}
.extraMedium {
width: 2rem;
height: 2rem;
}
.large {
width: 3.2rem;
height: 3.2rem;
}
.xlarge {
width: 4.4rem;
height: 4.4rem;
}
.xl {
width: 6.4rem;
height: 6.4rem;
}
.fill {
width: inherit;
height: inherit;
}
.auto {
width: auto;
height: 100%;
}
.symbol {
width: 3.2rem;
height: auto;
}
</style>

601
components/base-input.vue Normal file
View File

@ -0,0 +1,601 @@
<template>
<div v-on-clickAway="onBlur" :class="$style.wrap">
<label v-if="label" :for="label" :class="$style.label">
{{ label }}
</label>
<base-button v-if="buttonClick" type="link" free-size :disabled="disabled" :class="$style.buttonBlock" @click="buttonClick">
<span v-if="info" :class="$style.info">
<span :class="$style.info__text">{{ info }}</span>
<span :class="$style.info__button">{{ buttonText }}</span>
</span>
</base-button>
<div :class="$style.container">
<span
ref="mirror"
:class="[
$style.mirrorElement,
$style[size],
$style[type],
$style[inputMode],
$style[inputType],
{
[$style.loading]: loading,
},
]"
>
{{ modelValue }}
</span>
<input
:id="label"
ref="input"
v-bind="$attrs"
:type="type"
:disabled="disabled"
:value="modelValue"
:placeholder="placeholderText"
:class="[
$style.input,
$style[type],
$style[size],
$style[inputMode],
$style[inputType],
{
[$style.error]: error,
[$style.loading]: loading,
[$style.focused]: focused,
},
]"
autocomplete="nope"
v-on="$listeners"
@focus="onFocus"
@blur="onBlur"
@input="sendEvent"
/>
<span
v-if="isShowShortedAddress"
:class="[
$style.shortedAddress,
$style[size],
$style[type],
$style[inputMode],
$style[inputType],
{
[$style.shortedAddress__disabled]: disabled,
[$style.loading]: loading,
},
]"
@click="onFocus"
>
{{ shortedAddress }}
</span>
<span v-if="loading" :class="$style.loader"><span :class="$style.loader__icon" /></span>
<span v-if="icon" :class="$style.iconTicker">
<base-icon v-if="icon !== ''" :name="icon" />
<span v-if="ticker" :class="$style.iconTicker__value">{{ ticker }}</span>
</span>
</div>
<span v-if="error" :class="$style.errorMessage" role="alert">
{{ errorMessage }}
<a v-if="errorLink" :href="errorLink" :class="$style.link" target="_blank" rel="noopener noreferrer">more info</a>
</span>
</div>
</template>
<script>
import { directive as onClickAway } from 'vue-clickaway'
import { numbers } from '@/constants'
import { checkCryptoNumeric, isAddress } from '@/utilities'
export default {
directives: {
onClickAway: onClickAway,
},
inheritAttrs: false,
model: {
event: 'update:modelValue',
},
props: {
modelValue: {
type: String,
default: '',
},
label: {
type: String,
default: '',
},
buttonClick: {
type: Function,
default: null,
},
buttonText: {
type: String,
default: 'button',
},
disabled: {
type: Boolean,
default: false,
},
info: {
type: String,
default: '',
},
loading: {
type: Boolean,
default: false,
},
error: {
type: Boolean,
default: false,
},
errorMessage: {
type: String,
default: '',
},
errorLink: {
type: String,
default: '',
},
placeholderText: {
type: String,
default: '',
},
icon: {
type: String,
default: '',
validator(value) {
return ['', 'ethereum', 'goerli', 'optimism', 'binance'].includes(value)
},
},
ticker: {
type: String,
default: 'eth',
},
type: {
type: String,
default: 'text',
validator(value) {
return ['email', 'number', 'password', 'search', 'tel', 'text', 'url', 'file'].includes(value)
},
},
inputMode: {
type: String,
default: 'text',
validator(value) {
return ['none', 'text', 'tel', 'url', 'email', 'numeric', 'decimal', 'search'].includes(value)
},
},
inputType: {
type: String,
default: 'defaultType',
validator(value) {
return ['defaultType'].includes(value)
},
},
size: {
type: String,
default: 'defaultSize',
validator(value) {
return ['defaultSize', 'large', 'medium'].includes(value)
},
},
},
emits: ['update:modelValue'],
data() {
return {
focused: false,
isAddress: false,
shortedAddress: '',
resizeObserver: '',
}
},
computed: {
isShowShortedAddress() {
return Boolean(!this.focused && this.isAddress)
},
isFilled() {
return Boolean(this.modelValue && typeof this.modelValue === 'string' && this.modelValue.length > numbers.ZERO)
},
},
watch: {
modelValue() {
this.getShortenAddress()
},
},
mounted() {
this.isAddress = isAddress(this.modelValue)
this.observeWidth()
window.addEventListener('resize', this.getShortenAddress)
},
beforeDestroy() {
window.removeEventListener('resize', this.getShortenAddress)
this.unobserveWidth()
},
methods: {
onFocus() {
this.focused = true
},
observeWidth() {
this.resizeObserver = new ResizeObserver(() => {
this.getShortenAddress()
})
this.resizeObserver.observe(this.$refs.mirror)
},
unobserveWidth() {
this.resizeObserver.unobserve(this.$refs.mirror)
},
onCutAddress(text) {
const dots = '...'
if (!text) {
return ''
}
const median = text.length / numbers.TWO
const cutPoint = median + numbers.ONE + dots.length
return `${text.substring(numbers.ZERO, median)}${dots}${text.substring(cutPoint)}`
},
getShortenAddress() {
if (!this.isShowShortedAddress) {
return
}
if (!this.modelValue) {
this.shortedAddress = ''
}
this.$refs.mirror.textContent = this.modelValue
while (true) {
this.$refs.mirror.textContent = this.onCutAddress(this.$refs.mirror.textContent)
if (this.$refs.mirror?.offsetWidth < this.$refs.input?.offsetWidth) {
break
}
}
this.shortedAddress = this.$refs.mirror.textContent
},
onBlur() {
this.focused = false
this.isAddress = isAddress(this.modelValue)
this.getShortenAddress()
},
sendEvent(event) {
const { value } = event.target
switch (this.inputMode) {
case 'numeric':
this.sendNumericEvent(value)
break
default:
this.$emit('update:modelValue', value)
}
},
sendNumericEvent(value) {
if (!value) {
this.$emit('update:modelValue', value)
return
}
value = value.replaceAll(',', '.').trim()
const isValid = checkCryptoNumeric(value)
if (!isValid) {
// https://github.com/vuejs/vue/issues/6689
this.$forceUpdate()
return
}
this.$emit('update:modelValue', value)
},
},
}
</script>
<style lang="scss" module>
@include animation-full-rotate;
.wrap {
position: relative;
margin: 0;
text-align: left;
}
.label {
margin: 0 0 0.8rem;
padding: 0;
display: inline-block;
font-weight: $font-weight-semiBold;
font-size: 1.4rem;
line-height: 1.2;
color: $color-grey;
background-color: $color-transparent;
}
.container {
position: relative;
display: grid;
grid-template-columns: 1fr auto;
align-items: center;
height: 4.8rem;
}
.mirrorElement,
.shortedAddress,
.input {
position: relative;
margin: 0;
display: block;
width: 100%;
font-family: $font-family-main;
font-weight: $font-weight-medium;
text-align: left;
border: none;
border-radius: 0.4rem;
box-shadow: none;
appearance: none;
transition: color $duration-animation-02s ease, background-color $duration-animation-02s ease,
border-color $duration-animation-02s ease;
z-index: $zIndex-2;
&::placeholder {
font-weight: $font-weight-regular;
line-height: 1.33;
color: $color-input-placeholder;
transition: opacity $duration-animation-02s;
user-select: none;
}
&:hover:not([disabled]) {
& + .label {
color: $color-white;
}
}
&:hover:not([disabled]),
&:focus:not([disabled]) {
-moz-appearance: number-input;
}
&:focus:not([disabled]) {
outline: none;
}
&:disabled {
color: $color-white-04;
background-color: $color-input-bg-disabled;
border-color: $color-white-01;
}
&[readonly] {
cursor: not-allowed;
background-color: $color-input-bg-disabled;
}
&[type='password'] {
font-family: caption;
letter-spacing: 0.5rem;
&::placeholder {
letter-spacing: normal;
}
}
&[type='file'] {
display: none;
}
-moz-appearance: textfield;
&::-webkit-outer-spin-button,
&::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
&[type='search']::-webkit-search-cancel-button,
&[type='time']::-webkit-calendar-picker-indicator,
&[type='date']::-webkit-calendar-picker-indicator,
&[type='week']::-webkit-calendar-picker-indicator,
&[type='month']::-webkit-calendar-picker-indicator,
&[type='datetime-local']::-webkit-calendar-picker-indicator {
display: none;
}
}
/* Types */
/* defaultType */
.defaultType {
color: $color-white;
background-color: $color-input-bg;
border: $size-input-border solid $color-white-02;
&:hover:not([disabled]) {
background-color: $color-input-bg-bold;
border: $size-input-border solid $color-white-04;
label {
color: $color-white;
}
}
&:focus-within:not([disabled]),
&:active:not([disabled]) {
background-color: $color-input-bg-light;
border: $size-input-border solid $color-white-03;
}
}
.mirrorElement {
visibility: hidden;
position: absolute;
width: max-content;
}
/* Sizes */
/* defaultSize, large, medium */
.defaultSize {
padding: 1.1rem 1rem;
font-size: 1.8rem;
line-height: 1.33;
&::placeholder {
font-size: 1.8rem;
}
}
.large {
padding: 2rem;
font-size: 2rem;
line-height: 1.25;
&::placeholder {
font-size: 2rem;
}
}
.medium {
padding: 1.2rem 1rem;
font-size: 1.4rem;
line-height: 1.25;
&::placeholder {
font-size: 1.4rem;
}
}
.shortedAddress {
position: absolute;
width: 100%;
height: 100%;
cursor: pointer;
z-index: $zIndex-3;
&__disabled {
color: $color-white-04;
background-color: $color-input-bg-disabled;
border: $size-input-border solid $color-white-01;
pointer-events: none;
}
}
.loader {
position: absolute;
top: 50%;
left: 1.2rem;
width: 2rem;
height: 2rem;
transform: translate(0, -50%);
z-index: $zIndex-3;
&__icon {
margin: 0;
width: 2rem;
height: 2rem;
display: inline-block;
border-style: solid;
border-width: 0.2rem;
border-color: $color-white $color-transparent $color-white $color-transparent;
border-radius: 50%;
animation: animation-full-rotate $duration-animation-1200ms linear infinite;
}
}
.loading {
padding-left: 4rem;
}
.error {
border-color: $color-danger;
}
.errorMessage {
position: absolute;
left: 0;
top: calc(100% + 0.6rem);
display: inline-block;
font-family: $font-family-main;
font-weight: $font-weight-regular;
font-size: 1.2rem;
line-height: 1.3;
color: $color-danger;
}
.iconTicker {
position: relative;
padding: 0.8rem;
width: 100%;
min-width: 8rem;
height: 100%;
display: inline-flex;
align-items: center;
flex: 0 0 auto;
gap: 0 0.4rem;
color: $color-white;
background-color: $color-input-bg;
border-radius: 0 0.4rem 0.4rem 0;
&::before {
content: '';
position: absolute;
top: 0;
left: -0.6rem;
width: 0.6rem;
height: 100%;
background-color: $color-input-bg;
}
&__value {
font-weight: $font-weight-semiBold;
font-size: 1.4rem;
line-height: 1.2;
text-transform: uppercase;
}
}
.buttonBlock {
position: absolute;
top: 0.5rem;
right: 0;
height: auto;
text-decoration: none;
}
.buttonAction {
padding: 0.2rem;
width: auto;
font-weight: $font-weight-bold;
text-transform: uppercase;
text-decoration: none;
color: $color-link-hover;
&:disabled {
color: $color-link-hover;
}
&:focus-within:not([disabled]) {
background-color: $color-input-bg;
}
}
.info {
margin: 0;
display: inline-flex;
justify-content: flex-end;
font-weight: $font-weight-medium;
font-size: 1.2rem;
line-height: 1.2;
color: $color-input-placeholder;
white-space: nowrap;
overflow: hidden;
user-select: none;
&:hover {
.info__button {
color: $color-default;
}
}
&__text {
display: none;
@include media('sm') {
display: inline-block;
}
}
&__button {
color: $color-success;
margin-left: 0.5rem;
transition: all $duration-animation-02s ease-in;
&:first-letter {
text-transform: uppercase;
}
}
}
.link {
color: $color-danger;
text-decoration: underline;
text-underline-offset: 0.5rem;
}
</style>

View File

@ -0,0 +1,108 @@
<template>
<div :class="$style.pagination">
<div v-show="total > 1" :class="$style.pagination__wrap">
<span :class="$style.pagination__text">{{ page }}&nbsp;of&nbsp;{{ total }}</span>
<div :class="$style.pagination__buttons">
<base-button size="symbol" :disabled="!isShowToPrev" :class="$style.pagination__btn" @click="onPrev">
<base-icon name="arrow" :class="$style.pagination__iconPrev" />
</base-button>
</div>
<div :class="$style.pagination__buttons">
<base-button size="symbol" :disabled="!isShowToNext" :class="$style.pagination__btn" @click="onNext">
<base-icon name="arrow" />
</base-button>
</div>
</div>
</div>
</template>
<script>
import { numbers } from '@/constants'
export default {
inheritAttrs: false,
props: {
list: {
type: Array,
required: true,
},
limit: {
type: Number,
required: true,
},
current: {
type: Number,
required: true,
},
},
emits: ['on-set-list'],
data: function () {
return {
page: numbers.PAGINATION_STEP,
}
},
computed: {
isShowToPrev() {
return this.page > numbers.PAGINATION_STEP
},
isShowToNext() {
return this.total > this.page
},
total() {
return Math.ceil(this.list.length / this.limit)
},
},
created() {
this.page = this.current
this.onSetNewList()
},
beforeUpdate() {
this.onSetNewList()
},
methods: {
onPrev() {
this.page = this.page - numbers.PAGINATION_STEP
this.onSetNewList()
},
onNext() {
this.page = this.page + numbers.PAGINATION_STEP
this.onSetNewList()
},
onSetNewList() {
const actualIndex = this.page - numbers.PAGINATION_STEP
this.$emit('on-set-list', { from: actualIndex * this.limit, to: this.limit })
},
},
}
</script>
<style lang="scss" module scoped>
.pagination {
height: 3.2rem;
&__wrap {
width: 100%;
display: inline-flex;
justify-content: flex-end;
align-items: center;
}
&__text {
margin: 0 1rem;
font-weight: $font-weight-medium;
font-size: 1.4rem;
line-height: 1.4;
color: $color-white;
}
&__buttons {
display: inline-flex;
justify-content: space-between;
align-items: center;
}
&__btn {
margin: 0 0.3rem;
}
&__iconPrev {
transform: rotate(180deg);
}
}
</style>

256
components/base-select.vue Normal file
View File

@ -0,0 +1,256 @@
<template>
<div v-on-clickAway="clickOutside" :class="$style.select">
<button
:disabled="disabled"
:tabindex="tabindex"
:class="[$style.select__selected, $style[type], $style[size], { [$style.select__selected_open]: open }]"
@click="onSelectToggle"
>
{{ selected }}
</button>
<label v-if="label" :class="$style.select__label">
{{ label }}
</label>
<div :class="[$style.select__items, { [$style.select__items_hide]: !open }]">
<select-option
v-for="option of options"
:key="option.value || option"
:set-selected="setSelected"
:option="option"
:selected="selected"
/>
</div>
</div>
</template>
<script>
import { directive as onClickAway } from 'vue-clickaway'
import { numbers } from '@/constants'
import SelectOption from './SelectOption'
export default {
components: { SelectOption },
directives: {
onClickAway: onClickAway,
},
props: {
options: {
type: Array,
required: true,
},
disabled: {
type: Boolean,
default: false,
},
default: {
type: String,
required: false,
default: null,
},
tabindex: {
type: Number,
required: false,
default: 0,
},
label: {
type: String,
default: '',
},
update: {
type: String,
default: '',
},
type: {
type: String,
default: 'defaultType',
validator(value) {
return ['defaultType'].includes(value)
},
},
size: {
type: String,
default: 'defaultSize',
validator(value) {
return ['defaultSize', 'large', 'medium'].includes(value)
},
},
},
data() {
return {
selected: this.default || this.options[numbers.ZERO],
open: false,
}
},
watch: {
update(newValue) {
this.selected = newValue
},
},
mounted() {
this.$emit('input', this.selected)
},
methods: {
setSelected(option) {
this.open = false
this.selected = option
this.$emit('input', option)
},
clickOutside() {
this.open = false
},
onSelectToggle() {
this.open = !this.open
},
},
}
</script>
<style lang="scss" module>
.select {
position: relative;
margin: 0;
display: block;
width: 100%;
text-align: left;
&__selected {
position: relative;
width: 100%;
height: 100%;
font-family: $font-family-main;
font-weight: $font-weight-medium;
color: $color-white;
text-align: left;
white-space: nowrap;
text-overflow: ellipsis;
background-color: $color-transparent;
border: none;
border-radius: 0.4rem;
opacity: $opacity-08;
cursor: pointer;
transition: opacity $duration-animation-02s ease;
z-index: $zIndex-4;
overflow: hidden;
outline: none;
user-select: none;
&:disabled {
cursor: not-allowed;
}
&:hover:not([disabled]),
&:focus:not([disabled]) {
opacity: $opacity-default;
-moz-appearance: number-input;
}
&:focus:not([disabled]) {
outline: none;
}
&::after {
content: '';
position: absolute;
top: 50%;
left: auto;
right: 2rem;
bottom: auto;
height: 1rem;
width: 1rem;
display: block;
border-width: 0 0 0.1rem 0.1rem;
border-style: solid;
border-color: $color-white;
transform-origin: center center;
transform: translateY(-50%) rotate(-45deg);
transition: transform $duration-animation-02s ease, border-color $duration-animation-02s ease;
}
&_open {
&::after {
transform: rotate(135deg);
}
}
}
&__label {
position: absolute;
left: 2rem;
top: 50%;
margin: 0;
padding: 0;
display: inline-block;
font-weight: $font-weight-medium;
font-size: 1.2rem;
line-height: 1.43;
color: $color-grey;
background-color: $color-transparent;
transform-origin: left bottom;
transform: translate(0, -145%);
transition: transform $duration-animation-02s ease, font-size $duration-animation-02s ease, color $duration-animation-02s ease;
touch-action: manipulation;
pointer-events: none;
z-index: $zIndex-4;
}
&__items {
position: absolute;
top: calc(100% - 0.3rem);
left: 0;
right: 0;
max-height: 27.6rem;
background-color: $color-dark-heavy;
border-right: 0.1rem solid $color-white-02;
border-left: 0.1rem solid $color-white-02;
border-bottom: 0.1rem solid $color-white-02;
border-radius: 0 0 0.4rem 0.4rem;
box-shadow: 0 1rem 2rem $color-black-004, 0 0.2rem 0.6rem $color-black-004, 0 0 0.1rem $color-black-004;
overflow: auto;
z-index: $zIndex-3;
&_hide {
display: none;
}
}
}
/* Types */
/* defaultType */
.defaultType {
color: $color-white;
background-color: $color-input-bg;
border: $size-input-border solid $color-white-01;
&:hover:not([disabled]) {
background-color: $color-input-bg-bold;
border: $size-input-border solid $color-white-03;
}
&:focus-within:not([disabled]),
&:active:not([disabled]) {
background-color: $color-input-bg-light;
border: $size-input-border solid $color-white-03;
}
}
/* Sizes */
/* defaultSize, large, medium */
.defaultSize {
padding: 3.1rem 3.6rem 1.2rem 2rem;
font-size: 1.8rem;
line-height: 1.43;
&::placeholder {
font-size: 1.6rem;
}
}
.large {
padding: 2rem;
font-size: 1.6rem;
line-height: 1.25;
&::placeholder {
font-size: 1.6rem;
}
}
.medium {
padding: 1.2rem;
font-size: 1.4rem;
line-height: 1.25;
&::placeholder {
font-size: 1.4rem;
}
}
</style>

View File

@ -0,0 +1,120 @@
<template>
<div v-if="isOpen" :class="$style.wrapper">
<div :class="$style.container">
<div :class="$style.iconContainer">
<base-icon v-if="icon" :class="$style.icon" :name="icon" size="fill" />
</div>
<div :class="$style.content">
<div :class="$style.content__text">
<slot />
</div>
<span :class="$style.content__close" @click="onClose">
<base-icon name="error" size="extraMedium" />
</span>
</div>
</div>
</div>
</template>
<script>
export default {
props: {
icon: {
type: String,
default: null,
},
onClose: {
type: Function,
required: true,
},
isOpen: {
type: Boolean,
default: false,
},
},
}
</script>
<style lang="scss" module>
.wrapper {
position: relative;
width: 100%;
margin-bottom: 1rem;
}
.container {
margin: 0 auto;
display: flex;
max-width: 80%;
width: max-content;
min-height: 4rem;
align-items: center;
padding: 0 1rem 0 0.5rem;
border: 0.1rem solid $color-alert;
border-radius: 0.6rem;
overflow: hidden;
}
.iconContainer {
position: relative;
width: 4rem;
display: inline-flex;
align-items: center;
justify-content: center;
height: 4rem;
&::after {
content: '';
position: absolute;
top: -0.1rem;
bottom: -0.1rem;
left: -50%;
right: -0.6rem;
transform: skewX(20deg);
background-color: rgba(255, 138, 0, 0.2);
border-right: 0.1rem solid rgba(255, 138, 0, 0.2);
border-top-right-radius: 0.2rem;
}
.icon {
position: relative;
z-index: $zIndex-1;
width: 24px;
height: 24px;
}
}
.content {
display: flex;
width: 100%;
justify-content: space-between;
padding: 0 0 0 1.5rem;
align-items: center;
@include media('xsm') {
padding: 0 0 0 2.5rem;
}
&__text {
font-weight: $font-weight-regular;
font-size: 0.9rem;
line-height: 1.57;
text-align: center;
@include media('xsm') {
font-size: 1.2rem;
}
@include media('md') {
font-size: 1.4rem;
}
}
&__close {
cursor: pointer;
margin-left: 1rem;
svg {
fill: $color-white;
&:hover {
fill: $color-grey;
transition: 0.2s ease-in;
}
}
}
}
</style>

View File

@ -0,0 +1,65 @@
<template>
<base-icon :name="icon" :size="size" :class="[{ [$style[status]]: status }]" />
</template>
<script>
import { transactionTitles } from '@/constants'
export default {
props: {
type: {
type: String,
required: true,
},
status: {
type: String,
default: '',
validator(value) {
return ['', 'fail', 'success', 'pending'].includes(value)
},
},
size: {
type: String,
default: 'default',
validator(value) {
return ['default', 'extraMedium', 'medium', 'small', 'large', 'xlarge', 'xl', 'fill', 'auto', 'symbol'].includes(value)
},
},
},
computed: {
icon() {
return this.getTransactionType(this.type)
},
},
methods: {
getTransactionType(type) {
const auth = [transactionTitles.SETUP]
const incoming = [transactionTitles.FUND, transactionTitles.BRIDGE, transactionTitles.INCOMING_FUND]
const outgoing = [transactionTitles.TRANSFER, transactionTitles.WITHDRAW]
const txTypes = { auth, incoming, outgoing }
const keys = Object.keys(txTypes)
const key = keys.find((key) => Boolean(txTypes[key].find((el) => type.includes(el))))
return key ?? type
},
},
}
</script>
<style lang="scss" module>
.success {
svg {
fill: $color-success;
}
}
.pending {
svg {
fill: $color-warning;
}
}
.fail {
svg {
fill: $color-danger;
}
}
</style>

View File

@ -0,0 +1,177 @@
<template>
<base-button
full-width
type="primary"
size="small"
:disabled="isButtonDisabled"
:label="value"
:class="[
$style.switcherButton,
{
[$style.switcherButton_active]: isButtonActive,
},
{
[$style.switcherButton_warning]: shouldExceptionMark && !hasError,
},
{
[$style.switcherButton_error]: isButtonError,
},
{
[$style.switcherButton_exception]: isException,
},
]"
@click="onSwitch(value)"
>
{{ value }}<span>{{ subValue }}</span>
</base-button>
</template>
<script>
export default {
props: {
value: {
type: String,
required: true,
},
subValue: {
type: String,
default: '',
},
exception: {
type: String,
default: undefined,
},
isExceptionMarked: {
type: Boolean,
default: false,
},
selected: {
type: String,
required: true,
},
hasError: {
type: Boolean,
default: false,
},
onSwitch: {
type: Function,
required: true,
},
},
computed: {
isButtonActive() {
return this.isSelected && !this.hasError
},
isButtonError() {
return this.hasError && (this.isSelected || this.shouldExceptionMark)
},
isButtonDisabled() {
return this.shouldExceptionMark
},
isException() {
return this.exception && this.exception === this.value
},
isSelected() {
return this.value === this.selected
},
shouldExceptionMark() {
return this.isExceptionMarked && this.isException
},
},
methods: {},
}
</script>
<style lang="scss" module scoped>
.switcherButton {
max-width: 8rem;
height: 4rem;
overflow: inherit;
border-radius: 0.3rem;
font-size: 1.3rem;
padding: 0.5rem 0.7rem;
text-transform: uppercase;
background: $color-bg-primary;
border-color: $color-white-02;
&:disabled {
cursor: default;
}
&:hover {
color: $color-white;
background: $color-grey-bold;
border-color: $color-white-04;
}
&:active {
background: $color-bg-primary;
}
&:last-child {
&::after {
display: none;
}
}
&_error,
&_warning,
&_exception,
&_active {
&:focus-within,
&:focus {
background: $color-bg-primary;
}
&::after {
display: none;
}
}
&_active {
transform: none;
border-color: $color-default;
color: $color-default;
&:focus-within {
border-color: $color-default;
color: $color-default;
}
}
&_error {
border-color: $color-danger;
color: $color-danger;
&:focus-within,
&_active {
color: $color-danger;
border-color: $color-danger;
}
}
&_warning {
border-color: $color-alert;
color: $color-alert;
&:focus-within,
&_active {
color: $color-alert;
border-color: $color-alert;
}
}
&_exception {
transform: none;
span {
display: none;
}
&:focus-within,
&_active {
border-color: $color-default;
color: $color-default;
}
&:hover {
color: $color-alert;
border-color: $color-alert;
}
}
span {
margin-left: 0.5rem;
}
}
</style>

View File

@ -0,0 +1,172 @@
<template>
<div>
<ul :class="$style.tabs" :style="indentStyles">
<li v-for="{ name, link, tooltip } of tabs" :key="name" :class="$style.tabs__item">
<nuxt-link
v-if="isRouted"
v-tooltip="tooltip"
:to="link"
:class="[$style.tabs__link, { [$style.tabs__link_active]: isActive(name) }]"
@click.prevent="setActive(name)"
>
{{ name }}
</nuxt-link>
<a
v-else
v-tooltip="tooltip"
:href="`#${name}`"
:class="[$style.tabs__link, { [$style.tabs__link_active]: isActive(name) }]"
@click.prevent="setActive(name)"
>
{{ name }}
</a>
</li>
</ul>
<slot :name="activeItem" />
</div>
</template>
<script>
export default {
props: {
indent: {
type: String,
default: '1.5rem',
},
tabs: {
type: Array,
required: true,
},
activeTab: {
type: String,
default: null,
required: false,
},
isRouted: {
type: Boolean,
default: false,
},
},
emits: ['setActiveTab'],
data: function () {
return {
activeItem: null,
}
},
computed: {
indentStyles() {
return `marginBottom: ${this.indent};`
},
},
watch: {
activeItem(newActiveTab) {
this.$emit('setActiveTab', newActiveTab)
},
},
mounted() {
const routedTab = this.tabs.find(({ name }) => name === this.$route.name)
if (this.activeTab) {
this.activeItem = this.activeTab
return
}
if (this.isRouted && routedTab) {
this.activeItem = routedTab.name
return
}
const [firstTab] = this.tabs
this.activeItem = firstTab.name
},
methods: {
isActive(menuItem) {
return this.activeItem === menuItem
},
setActive(menuItem) {
this.activeItem = menuItem
},
getProps(link) {
const key = this.isRouted ? 'to' : 'href'
return { [key]: link }
},
},
}
</script>
<style lang="scss" module>
.tabs {
position: relative;
margin: 0;
padding: 0 2rem;
list-style: none;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(5rem, 1fr));
grid-template-rows: none;
grid-column-gap: 1.6rem;
grid-row-gap: 1.6rem;
justify-content: space-between;
align-items: center;
border-bottom: 0.1rem solid $color-dark;
box-shadow: 0 0.1rem $color-dark-light;
@include media('sm') {
grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}
&__item {
width: 100%;
}
&__link {
position: relative;
margin: 0;
padding: 1.4rem 0;
width: 100%;
display: inline-block;
font-weight: $font-weight-semiBold;
font-size: 1.4rem;
line-height: 1.2;
color: $color-grey;
text-align: center;
word-break: keep-all;
text-transform: capitalize;
&::after {
content: '';
position: absolute;
left: 0;
bottom: -0.2rem;
display: block;
width: 100%;
height: 0.2rem;
background-color: $color-white;
border-radius: 0.1rem;
transform-origin: center top;
transform: scale(0, 1);
transition: color $duration-animation-03s, transform $duration-animation-02s ease-out;
z-index: $zIndex-1;
}
&:hover,
&:focus {
color: $color-white;
}
&_active {
color: $color-white;
&:after {
transform: scale(1, 1);
}
}
&_animated {
color: $color-white;
&:after {
animation: animation-routed-link $duration-animation-02s linear;
}
}
@include media('sm') {
font-size: 1.6rem;
}
}
}
.tabContent {
padding: 4rem 0 2.4rem;
}
</style>

View File

@ -0,0 +1,9 @@
<template>
<svg viewBox="0 0 24 24">
<path
fill-rule="evenodd"
d="M9.293 16.707a1 1 0 010-1.414L12.586 12 9.293 8.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
clip-rule="evenodd"
/>
</svg>
</template>

13
components/icons/Auth.vue Normal file
View File

@ -0,0 +1,13 @@
<template>
<svg viewBox="0 0 24 24" fill="#69db99">
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M12 0.991736C5.9203 0.991736 0.991736 5.9203 0.991736 12C0.991736 18.0797 5.9203 23.0083 12 23.0083C18.0797 23.0083 23.0083 18.0797 23.0083 12C23.0083 5.9203 18.0797 0.991736 12 0.991736ZM0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12Z"
/>
<path
d="M14.5 14.5C12.5959 14.5 10.0658 14.3744 10.0658 16.3579V17.786H19.5V16.3579C19.5 14.3744 16.4835 14.5 14.5 14.5ZM7.20248 10.5661V8.34463H5.77438V10.5661H3.63223V11.9942H5.77438V14.1364H7.20248V11.9942H9.42397V10.5661H7.20248Z"
/>
<circle cx="14.5" cy="10.5" r="2.5" />
</svg>
</template>

View File

@ -0,0 +1,8 @@
<template>
<svg fill="none" viewBox="0 0 24 24">
<path
fill="#fff"
d="M8.9 13.28l3.1 3.1 3.11-3.1 1.8 1.8-4.9 4.92-4.92-4.91 1.8-1.81zM13.83 12L12 13.84 10.17 12l.32-.32.16-.16L12 10.16 13.84 12zm2.54 0l1.81-1.8L20 12l-1.8 1.8-1.82-1.8zM4 12l1.8-1.8L7.63 12 5.8 13.8 4 12zm4.9-1.28l3.1-3.1 3.11 3.1 1.8-1.8L12.02 4 7.08 8.92l1.8 1.8z"
/>
</svg>
</template>

View File

@ -0,0 +1,9 @@
<template>
<svg viewBox="0 0 24 24">
<path
fill-rule="evenodd"
d="M4.5 12a7.5 7.5 0 1115 0 7.5 7.5 0 01-15 0zM12 5.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zm-.7 6.5L8.64 9.35l.7-.7L12 11.29l2.65-2.64.7.7L12.71 12l2.64 2.65-.7.7L12 12.71l-2.65 2.64-.7-.7L11.29 12z"
clip-rule="evenodd"
/>
</svg>
</template>

View File

@ -0,0 +1,9 @@
<template>
<svg viewBox="0 0 12 12">
<path
fill-rule="evenodd"
d="M4.4.8a.4.4 0 00-.4.4v6.4c0 .22.18.4.4.4h6.4a.4.4 0 00.4-.4V1.2a.4.4 0 00-.4-.4H4.4zm-1.2.4C3.2.54 3.74 0 4.4 0h6.4c.66 0 1.2.54 1.2 1.2v6.4c0 .66-.54 1.2-1.2 1.2h-2v2c0 .66-.54 1.2-1.2 1.2H1.2A1.2 1.2 0 010 10.8V4.4c0-.66.54-1.2 1.2-1.2h2v-2zm0 2.8h-2a.4.4 0 00-.4.4v6.4c0 .22.18.4.4.4h6.4a.4.4 0 00.4-.4v-2H4.4a1.2 1.2 0 01-1.2-1.2V4z"
clip-rule="evenodd"
/>
</svg>
</template>

View File

@ -0,0 +1,9 @@
<template>
<svg viewBox="0 0 24 24">
<path
fill-rule="evenodd"
d="M4.3 4.3a1 1 0 011.4 0l6.3 6.29 6.3-6.3a1 1 0 111.4 1.42L13.42 12l6.3 6.3a1 1 0 01-1.42 1.4L12 13.42l-6.3 6.3a1 1 0 01-1.4-1.42L10.58 12l-6.3-6.3a1 1 0 010-1.4z"
clip-rule="evenodd"
/>
</svg>
</template>

View File

@ -0,0 +1,7 @@
<template>
<svg viewBox="0 0 12 12">
<path
d="M8.746 2.397H7.675C7.443 2.397 7.256 2.585 7.256 2.816C7.256 3.048 7.444 3.235 7.675 3.235H8.746C9.414 3.235 9.957 3.779 9.957 4.446V9.937C9.957 10.605 9.413 11.148 8.746 11.148H3.254C2.586 11.148 2.043 10.604 2.043 9.937V4.447C2.043 3.779 2.587 3.236 3.254 3.236H4.325C4.557 3.236 4.744 3.048 4.744 2.817C4.744 2.585 4.556 2.398 4.325 2.398H3.254C2.124 2.398 1.204 3.318 1.204 4.448V9.939C1.204 11.069 2.124 11.989 3.254 11.989H8.745C9.875 11.989 10.795 11.069 10.795 9.939V4.447C10.796 3.317 9.876 2.397 8.746 2.397ZM4.246 6.312C4.082 6.148 3.817 6.148 3.653 6.312C3.489 6.476 3.489 6.741 3.653 6.905L5.703 8.955C5.713 8.965 5.723 8.974 5.734 8.983C5.738 8.987 5.743 8.99 5.748 8.993C5.754 8.998 5.761 9.003 5.767 9.007C5.773 9.011 5.779 9.014 5.784 9.017C5.79 9.021 5.796 9.024 5.802 9.027C5.808 9.03 5.814 9.035 5.82 9.038C5.827 9.04 5.833 9.044 5.839 9.046C5.845 9.049 5.851 9.05 5.857 9.053C5.864 9.055 5.87 9.058 5.877 9.06C5.884 9.062 5.89 9.063 5.897 9.065C5.904 9.067 5.911 9.069 5.918 9.07C5.925 9.072 5.933 9.072 5.94 9.073C5.946 9.074 5.952 9.075 5.959 9.076C5.972 9.077 5.986 9.078 6 9.078C6.014 9.078 6.028 9.077 6.041 9.076C6.047 9.076 6.054 9.074 6.06 9.073C6.067 9.072 6.074 9.072 6.082 9.07C6.089 9.069 6.096 9.067 6.103 9.065C6.109 9.063 6.115 9.062 6.121 9.06C6.128 9.058 6.135 9.055 6.141 9.053C6.148 9.051 6.154 9.049 6.16 9.046C6.166 9.044 6.172 9.04 6.179 9.038C6.185 9.035 6.191 9.032 6.197 9.029C6.203 9.026 6.209 9.022 6.215 9.019C6.221 9.016 6.227 9.012 6.233 9.009C6.24 9.005 6.246 9 6.252 8.995C6.256 8.992 6.261 8.988 6.266 8.985C6.277 8.976 6.287 8.967 6.297 8.957L8.347 6.907C8.511 6.743 8.511 6.478 8.347 6.314C8.183 6.15 7.918 6.15 7.754 6.314L6.419 7.647V0.431C6.419 0.199 6.231 0.0120001 6 0.0120001C5.768 0.0120001 5.581 0.2 5.581 0.431V7.647L4.246 6.312Z"
/>
</svg>
</template>

View File

@ -0,0 +1,12 @@
<template>
<svg viewBox="0 0 24 24" fill="#e45050">
<path
fill-rule="evenodd"
d="M12 .9a11.2 11.2 0 110 22.4A11.2 11.2 0 0112 .9zm0-.8a12 12 0 110 24 12 12 0 010-24z"
clip-rule="evenodd"
/>
<path
d="M13.07 12.02l3.73-3.73-1.07-1.07L12 10.95 8.27 7.22 7.2 8.29l3.73 3.73-3.73 3.73 1.07 1.07L12 13.09l3.73 3.73 1.07-1.07-3.73-3.73z"
/>
</svg>
</template>

View File

@ -0,0 +1,9 @@
<template>
<svg fill="none" viewBox="0 0 24 24">
<path fill="#f1f1f1" d="M12 16.28V21l6-8.23-6 3.5zM17.77 12.37L12.01 3v6.81l5.76 2.56z" />
<path fill="#fff" d="M12 9.8v5.82l5.72-3.27-5.71-2.54z" />
<path fill="#c2c2c2" d="M6.25 12.37L12 3v6.81l-5.76 2.56z" />
<path fill="#d5d5d5" d="M12 9.8v5.82l-5.72-3.27L12 9.8z" />
<path fill="#c2c2c2" d="M12 16.28V21l-6-8.23 6 3.5z" />
</svg>
</template>

View File

@ -0,0 +1,9 @@
<template>
<svg viewBox="0 0 24 24">
<path
fill-rule="evenodd"
d="M24 12a12 12 0 11-24 0 12 12 0 0124 0zM7.4 5.25c-.77 0-1.4.63-1.4 1.4v10c0 .52.28.97.7 1.21v.06l5.77 2.33v-2.2h2.73c.77 0 1.4-.63 1.4-1.4v-1.4h-1.4v1.4h-2.73V8.18l-3.8-1.53h6.53v1.47h1.4V6.65c0-.77-.63-1.4-1.4-1.4H7.4zm10.75 7.13l-1.08 1.09.99.99 2.82-2.82-1-.99v.02l-1.85-1.85-.99 1 1.17 1.16H13.8v1.4h4.35z"
clip-rule="evenodd"
/>
</svg>
</template>

View File

@ -0,0 +1,7 @@
<template>
<svg fill="none" viewBox="0 0 1034 417">
<path stroke="#3f4047" d="M0 2h913c66.27 0 120 53.73 120 120v295" />
<path stroke="#1d1d1d" d="M0 1h913c66.27 0 120 53.73 120 120v296" />
<path stroke="#69db99" class="stroke-animation-top" d="M0 1h913c66.27 0 120 53.73 120 120v296" />
</svg>
</template>

View File

@ -0,0 +1,5 @@
<template>
<svg viewBox="0 0 24 24">
<path d="M12 0C5.37 0 0 5.51 0 12.3c0 5.44 3.44 10.05 8.2 11.68.6.1.83-.27.83-.6L9 21.1c-3.34.75-4.04-1.45-4.04-1.45-.55-1.42-1.33-1.8-1.33-1.8-1.1-.76.08-.74.08-.74 1.2.08 1.84 1.26 1.84 1.26 1.07 1.89 2.8 1.34 3.49 1.03.1-.8.42-1.34.76-1.65-2.66-.3-5.46-1.36-5.46-6.08 0-1.34.46-2.44 1.23-3.3A4.54 4.54 0 015.7 5.1s1-.33 3.3 1.26a11.17 11.17 0 016 0c2.3-1.59 3.3-1.26 3.3-1.26a4.5 4.5 0 01.12 3.26 4.82 4.82 0 011.24 3.3c0 4.73-2.81 5.77-5.48 6.07.43.38.81 1.13.81 2.28l-.01 3.38c0 .32.21.7.82.59A12.3 12.3 0 0024 12.3C24 5.51 18.63 0 12 0z"/>
</svg>
</template>

View File

@ -0,0 +1,8 @@
<template>
<svg fill="none" viewBox="0 0 24 24">
<path
fill="#fff"
d="M8.393 16.615c-.578 0-1.13-.117-1.656-.352a4.3 4.3 0 01-1.374-.98 4.85 4.85 0 01-.944-1.465A4.645 4.645 0 014.066 12c0-.643.118-1.247.353-1.81.235-.564.55-1.055.944-1.473a4.301 4.301 0 011.374-.98 4.017 4.017 0 011.656-.352c.497 0 .962.085 1.395.254.437.164.82.387 1.148.669.334.277.615.599.846.965.234.367.403.747.507 1.142h-1.444a2.972 2.972 0 00-.325-.677A2.19 2.19 0 0010 9.161a2.549 2.549 0 00-.712-.395 2.467 2.467 0 00-.894-.155c-.376 0-.743.085-1.1.254-.352.164-.667.399-.944.704-.272.3-.493.658-.662 1.071-.17.413-.254.867-.254 1.36 0 .489.085.94.254 1.353.17.413.39.773.662 1.078.277.3.592.535.944.704.357.17.724.254 1.1.254.357 0 .685-.059.986-.176a2.669 2.669 0 001.374-1.19c.15-.273.254-.562.31-.867h-2.74v-1.304h4.036v4.693h-1.007l-.36-.867c-.192.183-.42.343-.683.479-.22.117-.493.223-.817.317-.32.094-.686.141-1.1.141zM18.637 13.296c0-.31-.052-.591-.155-.845a2.427 2.427 0 00-.394-.662 1.662 1.662 0 00-.578-.43 1.58 1.58 0 00-.677-.155c-.23 0-.455.051-.676.155-.22.103-.413.246-.578.43a2.213 2.213 0 00-.394.662 2.223 2.223 0 00-.155.845c0 .31.051.592.155.846.103.254.235.474.394.662.165.188.357.334.578.437.22.103.446.153.676.148a1.643 1.643 0 001.255-.585 2.21 2.21 0 00.394-.662 2.22 2.22 0 00.155-.846zm1.297 0c0 .489-.078.938-.233 1.346-.16.404-.383.752-.67 1.043-.281.291-.61.519-.986.683a2.99 2.99 0 01-1.212.247 2.99 2.99 0 01-1.211-.247 3.074 3.074 0 01-.987-.683 3.235 3.235 0 01-.67-1.043 3.538 3.538 0 01-.232-1.346c0-.488.078-.934.233-1.338.16-.404.383-.754.67-1.05.281-.291.61-.52.986-.683a2.99 2.99 0 011.211-.247c.433 0 .837.082 1.212.247.376.164.705.392.987.683.282.291.505.641.67 1.05.154.404.232.85.232 1.338zM14.802 7.447h1.605v1.605h-1.605zM17.256 7.447h1.605v1.605h-1.605z"
/>
</svg>
</template>

View File

@ -0,0 +1,12 @@
<template>
<svg viewBox="0 0 24 24" fill="#69db99">
<path
fill-rule="evenodd"
d="M12 23.1A11.2 11.2 0 1012 .7a11.2 11.2 0 000 22.4zm0 .8a12 12 0 100-24 12 12 0 000 24z"
clip-rule="evenodd"
/>
<path
d="M13.83 12.47c0-3.59-2.9-6.59-6.63-6.02 1.84.86 3.39 2.77 3.39 6.02h-2a.27.27 0 00-.21.44l3.7 4.57c.1.13.31.13.42 0l3.66-4.57a.27.27 0 00-.21-.44h-2.12z"
/>
</svg>
</template>

View File

@ -0,0 +1,9 @@
<template>
<svg viewBox="0 0 24 24">
<path
fill-rule="evenodd"
d="M12 5.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM4.5 12a7.5 7.5 0 1115 0 7.5 7.5 0 01-15 0zm8-3.51V9.5h-1V8.49h1zm-2 7.01v-1h1v-2h-1v-1h2v3h1v1h-3z"
clip-rule="evenodd"
/>
</svg>
</template>

19
components/icons/Key.vue Normal file
View File

@ -0,0 +1,19 @@
<template>
<svg viewBox="0 0 24 24">
<path
fill-rule="evenodd"
d="M13.35 5.63c0 .5-.27.93-.67 1.16a1.23 1.23 0 01-.76.19 1.35 1.35 0 01-1.28-1.35 1.35 1.35 0 012.72 0zM12 4.43c.4 0 .74.17.96.46a1.23 1.23 0 00-.92-.42 1.25 1.25 0 00-1.25 1.16c0-.67.55-1.2 1.21-1.2zm1.13 1.3c0 .4-.2.74-.52.94a1.21 1.21 0 01-.67.16 1.1 1.1 0 01-1-1.1c0-.62.5-1.11 1.1-1.11.6 0 1.1.5 1.1 1.1z"
clip-rule="evenodd"
/>
<path
fill-rule="evenodd"
d="M11.86 10.46a3.5 3.5 0 01-3.37-3.48 3.5 3.5 0 013.5-3.49 3.5 3.5 0 013.51 3.49v.05a3.45 3.45 0 01-3.64 3.43zm0-.14H12A3.35 3.35 0 0015.35 7a3.3 3.3 0 10-3.48 3.32z"
clip-rule="evenodd"
/>
<path
fill-rule="evenodd"
d="M12 3a3.99 3.99 0 00-2.4 7.16v1.74h.72v.52l.3.49v.33l.16.22v.18l-.16.37v.52l.62.43v.26l-.62.45v.97l.5.44v.23l-.52.51.36.48v.1l-.31.65v.51l1 1.07v.08l.46.29.34-.25v-.07l.38-.32h.09l.81-.69V11.9h.72v-1.78A3.96 3.96 0 0012 3zM8.3 6.98A3.7 3.7 0 0112 3.29a3.7 3.7 0 013.7 3.69 3.7 3.7 0 01-3.7 3.68 3.7 3.7 0 01-3.7-3.68zm4.64 12.98v-9.1a4 4 0 001.22-.52v1.27h-.72v7.93l-.5.42zm-.24-9.06v9.18l-.32.28v-9.41l.32-.05zm-.47.06v9.52l-.07.07v.05l-.07.04-.15-.1v-.03l-.07-.08v-9.47a4.1 4.1 0 00.36 0zm-.51 0v9.31l-.78-.82v-.33l.31-.65v-.26l-.26-.36.43-.41v-.5l-.5-.43v-.69l.62-.45v-.57l-.62-.43v-.3l.16-.37v-.34l-.16-.22v-.32l-.3-.48v-.74H9.9v-1.22a4 4 0 001.82.57z"
clip-rule="evenodd"
/>
</svg>
</template>

View File

@ -0,0 +1,85 @@
<template>
<svg fill="none" viewBox="0 0 64 64">
<g fill="#fff" clip-path="url(#clip0_loader)">
<path
d="M32.5 2h-1v2h1V2zM32.5 5h-1v2h1V5zM30.48 2.03l-1 .07.14 2 1-.07-.14-2zM30.62 5.03l-1 .07.14 2 1-.08-.14-2zM28.32 2.22l-.99.14.28 1.98.99-.14-.28-1.98zM28.74 5.19l-1 .14.29 1.98.99-.14-.28-1.98zM26.25 2.54l-.98.21.42 1.96.97-.2-.41-1.97zM26.88 5.5l-.98.2.41 1.96.98-.21-.41-1.96zM24.21 3.02l-.96.28.55 1.92.96-.28-.55-1.92zM25.04 5.91l-.97.28.56 1.92.96-.27-.55-1.93zM22.21 3.64l-.94.35.69 1.88.94-.35-.69-1.88zM23.24 6.45l-.94.35.69 1.88.94-.35-.69-1.88zM20.25 4.4l-.9.4.8 1.82.92-.4-.82-1.83zM21.47 7.14l-.91.4.81 1.83.92-.4-.82-1.83zM18.36 5.27l-.88.47.94 1.77.88-.47-.94-1.77zM19.76 7.93l-.88.47.94 1.76.88-.47-.94-1.76zM16.52 6.3l-.84.53 1.06 1.7.84-.54-1.06-1.7zM18.12 8.84l-.85.53 1.06 1.7.85-.54-1.06-1.7zM14.77 7.44l-.8.59 1.17 1.61.8-.58-1.17-1.62zM16.54 9.86l-.8.6 1.17 1.61.8-.59-1.17-1.62zM13.1 8.7l-.77.64 1.3 1.53.76-.64-1.29-1.54zM15.03 11l-.77.63 1.29 1.54.76-.65L15.03 11zM12.19 12.21l-1.39-1.44.72-.7 1.39 1.44-.72.7zM14.27 14.36l-1.39-1.43.72-.7 1.39 1.44-.72.69zM10.86 13.64L9.37 12.3l.67-.75 1.49 1.34-.67.75zM12.27 13.56l-.67.75 1.48 1.33.67-.74-1.48-1.34zM8.67 13.14l-.61.79 1.57 1.23.62-.79-1.58-1.23zM11.1 15.02l-.61.79 1.58 1.24.62-.8-1.58-1.23zM7.4 14.8l-.55.83 1.65 1.12.56-.83L7.4 14.8zM9.9 16.48l-.56.83L11 18.43l.56-.83-1.66-1.12zM6.27 16.56l-.5.86 1.74 1 .5-.86-1.74-1zM8.87 18.07l-.5.87 1.73 1 .5-.87-1.73-1zM5.26 18.4l-.44.9 1.8.88.43-.9-1.8-.88zM7.95 19.71l-.44.9 1.8.88.44-.9-1.8-.88zM4.38 20.3l-.38.93 1.86.75.37-.93-1.85-.75zM7.15 21.42l-.37.93 1.86.75.37-.93-1.86-.75zM3.62 22.25l-.3.95 1.9.62.3-.95-1.9-.62zM6.48 23.18l-.31.95 1.9.62.3-.95-1.9-.62zM3.01 24.26l-.24.97 1.94.48.24-.97-1.94-.48zM5.93 24.98l-.25.97 1.94.49.25-.97-1.94-.49zM2.54 26.3l-.17.99 1.97.34.17-.98-1.97-.35zM5.5 26.8l-.17 1 1.97.34.18-.98-1.97-.35zM2.22 28.36l-.1 1 1.98.2.1-.99-1.98-.2zM5.2 28.68l-.1 1 1.98.2.1-.99-1.98-.2zM2.03 30.45l-.03 1 2 .07.03-1-2-.07zM5.03 30.55l-.03 1 2 .07.03-1-2-.07zM4 32.48l-2 .07.03 1 2-.07-.03-1zM7 32.37l-2 .07.04 1 2-.07-.04-1zM4.1 34.43l-1.99.21.1 1 2-.21-.1-1zM7.08 34.12l-1.99.2.1 1 2-.2-.1-1zM4.33 36.37l-1.97.35.18.98 1.97-.34-.18-.99zM7.3 35.85l-1.97.34.17.99 1.97-.35-.17-.98zM4.71 38.3l-1.94.48.24.97 1.94-.48-.24-.97zM7.62 37.56l-1.94.49.24.97 1.94-.48-.24-.98zM5.2 40.17l-1.9.62.31.95 1.9-.61-.3-.96zM8.06 39.25l-1.9.62.3.95 1.91-.62-.3-.95zM5.85 42.02L4 42.77l.37.93 1.85-.75-.37-.93zM8.63 40.9l-1.86.75.38.93L9 41.83l-.37-.93zM6.62 43.83l-1.8.88.44.9 1.8-.89-.44-.9zM9.3 42.52l-1.79.88.44.9 1.8-.88-.44-.9zM7.5 45.56l-1.73 1 .5.87 1.74-1-.5-.87zM10.1 44.07l-1.73 1 .5.86 1.73-1-.5-.86zM8.52 47.25l-1.66 1.11.56.83 1.65-1.11-.55-.83zM11 45.57l-1.66 1.12.56.82 1.65-1.11-.55-.83zM9.86 48.9l-1.58 1.24.62.8 1.58-1.25-.62-.79zM12.22 47.05l-1.58 1.24.62.79 1.58-1.24-.62-.8zM10.04 52.45l-.67-.75 1.49-1.34.67.75-1.49 1.34zM13.1 48.36l-1.49 1.33.67.75 1.49-1.34-.67-.74zM11.52 53.93l-.72-.7 1.39-1.44.72.7-1.39 1.44zM13.6 51.77l-.72-.7 1.39-1.43.72.69-1.39 1.44zM13.62 53.13l-1.29 1.53.77.64 1.28-1.53-.76-.64zM15.55 50.83l-1.29 1.53.77.65 1.28-1.54-.76-.64zM15.13 54.36l-1.17 1.62.8.59 1.18-1.62-.8-.59zM16.9 51.93l-1.18 1.62.81.58 1.18-1.61-.81-.6zM16.73 55.48l-1.05 1.7.84.53 1.06-1.7-.85-.53zM18.33 52.94l-1.06 1.7.85.52 1.06-1.7-.85-.52zM18.41 56.5l-.94 1.77.88.47.94-1.77-.88-.47zM19.82 53.85l-.94 1.77.88.47.94-1.77-.88-.47zM20.16 57.37l-.82 1.83.92.4.81-1.83-.91-.4zM21.37 54.64l-.8 1.83.9.4.82-1.82-.92-.41zM21.95 58.13l-.68 1.88.94.35.68-1.88-.94-.35zM22.98 55.31l-.68 1.88.94.34.68-1.88-.94-.34zM23.8 58.77l-.55 1.93.96.27.55-1.92-.96-.27zM24.62 55.9l-.55 1.91.96.28.55-1.92-.96-.28zM25.7 59.3l-.42 1.95.98.2.42-1.95-.98-.2zM26.3 56.35l-.41 1.96.98.2.42-1.95-.98-.2zM27.6 59.66l-.27 1.98.99.14.27-1.98-.99-.14zM28.03 56.7l-.28 1.97 1 .14.27-1.98-.99-.14zM29.69 59.8l-.14 2 1 .07.14-2-1-.07zM29.9 56.81l-.15 2 1 .07.14-2-1-.07zM32.5 60h-1v2h1v-2zM32.5 57h-1v2h1v-2zM34.45 59.9l-1 .07.14 2 1-.08-.14-2zM34.24 56.9l-1 .08.14 2 1-.08-.14-2zM36.4 59.66l-1 .14.28 1.98 1-.14-.28-1.98zM35.98 56.7l-1 .13.28 1.98 1-.14-.28-1.98zM38.31 59.3l-.98.2.42 1.96.98-.21-.42-1.96zM37.7 56.35l-.99.2.42 1.96.98-.2-.42-1.96zM40.2 58.79l-.97.27.55 1.93.97-.28-.55-1.92zM39.37 55.9l-.96.27.55 1.92.96-.27-.55-1.92zM42.05 58.14l-.94.34.68 1.88.94-.34-.68-1.88zM41.02 55.32l-.94.34.68 1.88.94-.34-.68-1.88zM43.84 57.38l-.9.4.8 1.83.92-.4-.82-1.83zM42.62 54.63l-.9.41.8 1.83.92-.4-.82-1.84zM45.58 56.5l-.88.47.94 1.76.88-.47-.94-1.76zM44.18 53.84l-.88.47.94 1.76.88-.47-.94-1.76zM47.26 55.48l-.85.53 1.06 1.7.85-.53-1.06-1.7zM45.67 52.94l-.84.53 1.06 1.7.84-.53-1.06-1.7zM47.1 51.93l-.81.59 1.17 1.61.81-.58-1.17-1.62z"
opacity=".4"
/>
<path d="M32 1a31 31 0 110 62 31 31 0 010-62zm0-1a32 32 0 100 64 32 32 0 000-64z" opacity=".4" />
<path
d="M32 9a23 23 0 110 46 23 23 0 010-46zm0-1a24 24 0 100 48 24 24 0 000-48zM48.86 54.36l-.8.59 1.17 1.62.8-.6-1.17-1.61zM50.38 53.13l-.76.64 1.28 1.53.77-.64-1.29-1.53z"
opacity=".4"
/>
<path
d="M48.46 50.83l-.77.64L48.98 53l.76-.64-1.28-1.53zM52.48 53.93l-1.39-1.44.72-.7 1.39 1.44-.72.7zM50.4 51.77l-1.39-1.44.72-.69 1.39 1.43-.72.7zM53.96 52.45l-1.49-1.34.67-.75 1.49 1.34-.67.75zM50.91 48.35l-.67.75 1.49 1.34.67-.75-1.49-1.34zM54.37 48.84l-.61.79 1.57 1.23.62-.79-1.58-1.23zM52.33 47.07l-.62.8 1.58 1.23.62-.79-1.58-1.24zM55.5 47.26l-.56.82 1.66 1.12.56-.83-1.66-1.11zM53.01 45.56l-.56.83 1.66 1.12.56-.83L53 45.56zM56.5 45.56l-.5.86 1.73 1 .5-.86-1.73-1zM53.9 44.06l-.5.87 1.73 1 .5-.87-1.73-1zM57.37 43.82l-.44.9 1.8.88.44-.9-1.8-.88zM54.69 42.5l-.44.9 1.8.88.43-.9-1.8-.88zM58.14 42.01l-.37.93 1.85.75.38-.93-1.86-.75zM55.36 40.9l-.37.92 1.85.75.38-.93-1.86-.75zM58.78 40.18l-.3.95 1.9.62.3-.95-1.9-.62zM55.94 39.24l-.3.96 1.9.61.3-.95-1.9-.62zM59.3 38.29l-.24.97 1.94.48.24-.97-1.94-.48zM56.38 37.56l-.24.97 1.94.49.25-.97-1.95-.49zM59.67 36.37l-.18.98 1.97.35.18-.98-1.97-.35zM56.71 35.84l-.17.98 1.97.35.17-.98-1.97-.35zM59.9 34.43l-.1 1 1.98.2.1-.99-1.98-.2zM56.92 34.11l-.1 1 1.98.2.1-.99-1.98-.2zM60 32.48l-.03 1 2 .07.03-1-2-.07zM57 32.38l-.03 1 2 .06.03-1-2-.06zM61.96 30.46l-2 .07.04 1 2-.07-.04-1zM58.96 30.56l-2 .07.03 1 2-.07-.03-1zM61.78 28.38l-1.99.2.1 1 2-.2-.1-1zM58.8 28.68l-1.99.21.1 1 2-.21-.1-1zM61.45 26.3l-1.97.34.18.99 1.97-.35-.18-.98zM58.5 26.83l-1.96.35.17.98 1.97-.34-.17-.99zM60.99 24.25l-1.94.48.24.97 1.94-.48-.24-.97zM58.08 24.98l-1.94.49.24.97 1.94-.49-.24-.97zM60.38 22.26l-1.9.62.3.95 1.9-.62-.3-.95zM57.52 23.2l-1.9.61.31.95 1.9-.61-.3-.96zM59.63 20.3l-1.85.75.37.93 1.86-.75-.38-.93zM56.85 21.42l-1.85.75.37.93 1.86-.75-.38-.93zM58.75 18.4l-1.8.88.44.9 1.8-.88-.44-.9zM56.05 19.71l-1.8.88.44.9 1.8-.88-.44-.9zM57.73 16.57l-1.73 1 .5.86 1.73-1-.5-.86zM55.14 18.07l-1.73 1 .5.87 1.73-1-.5-.87zM56.66 14.78L55 15.9l.56.83 1.66-1.12-.56-.83zM54.16 16.46l-1.66 1.12.56.83 1.66-1.12-.56-.83zM55.5 12.94l-1.58 1.24.62.79 1.58-1.24-.62-.8zM53.15 14.8l-1.58 1.23.62.8 1.58-1.25-.62-.79zM53.14 13.64l-.67-.75 1.49-1.34.67.75-1.49 1.34zM51.73 13.56l-1.49 1.34.67.74 1.49-1.34-.67-.74zM51.81 12.21l-.72-.7 1.39-1.44.72.7-1.39 1.44zM49.73 14.36l-.72-.69 1.39-1.44.72.7-1.39 1.43zM50.9 8.7l-1.28 1.53.77.64 1.28-1.53-.76-.64zM48.97 11l-1.29 1.53.77.65 1.29-1.54-.77-.64zM49.24 7.44l-1.18 1.61.8.6 1.18-1.62-.8-.6zM47.47 9.87l-1.18 1.62.81.58 1.18-1.61-.81-.6zM47.48 6.3l-1.06 1.69.85.53 1.06-1.7-.85-.53zM45.88 8.83l-1.06 1.7.85.53 1.06-1.7-.85-.53zM45.64 5.28l-.94 1.77.88.47.94-1.77-.88-.47zM44.24 7.93l-.94 1.76.88.47.94-1.76-.88-.47zM43.75 4.4l-.81 1.82.9.4.82-1.82-.91-.4zM42.53 7.12l-.81 1.83.91.4.81-1.82-.91-.4zM41.79 3.64l-.69 1.88.94.34.69-1.88-.94-.34zM40.76 6.46l-.68 1.88.94.34.68-1.88-.94-.34zM39.78 3.02l-.55 1.93.96.27.55-1.92-.96-.28zM38.96 5.9l-.55 1.93.96.28.56-1.93-.97-.27zM37.75 2.56l-.42 1.95.98.21.41-1.96-.97-.2zM37.13 5.49l-.42 1.95.98.21.42-1.96-.98-.2zM35.68 2.22L35.4 4.2l1 .14.27-1.98-1-.14zM35.26 5.2l-.28 1.97 1 .14.27-1.98-.99-.14zM33.59 2.04l-.14 2 1 .07.14-2-1-.07zM33.39 4.95l-.14 2 1 .07.14-2-1-.07z"
opacity=".4"
/>
</g>
<g clip-path="url(#clip1_loader)" class="loader__circle">
<path
fill="#fff"
d="M54.63 9.37A31.9 31.9 0 0032 0v9a23 23 0 0111.5 42.91l4.5 7.8a32 32 0 006.63-50.34z"
opacity=".4"
/>
</g>
<g clip-path="url(#clip2_loader)" class="loader__circle_mini">
<path
fill="#fff"
fill-rule="evenodd"
d="M32 19.5a12.5 12.5 0 100 25 12.5 12.5 0 000-25zM18.5 32a13.5 13.5 0 1127 0 13.5 13.5 0 01-27 0z"
clip-rule="evenodd"
opacity=".4"
/>
<path
fill="#fff"
fill-rule="evenodd"
d="M32 20c-2.75 0-5.34 1.01-7.39 2.6A1 1 0 1123.4 21c2.35-1.81 5.36-3 8.61-3a1 1 0 110 2z"
clip-rule="evenodd"
opacity=".4"
/>
<path
fill="#fff"
fill-rule="evenodd"
d="M26.87 20a1 1 0 01-.37 1.37c-.72.4-1.34.76-1.86 1.2a1 1 0 01-1.28-1.54c.67-.55 1.43-1 2.1-1.38l.04-.02a1 1 0 011.37.37z"
clip-rule="evenodd"
/>
<path
fill="#fff"
fill-rule="evenodd"
d="M20.21 37.63a1 1 0 011.36.38 11.4 11.4 0 005.89 5.16 1 1 0 01-.72 1.86A13.4 13.4 0 0119.83 39a1 1 0 01.38-1.36z"
clip-rule="evenodd"
opacity=".4"
/>
<path
fill="#fff"
fill-rule="evenodd"
d="M24.13 42.5a1 1 0 011.37-.37c.7.4 1.36.78 2 1.05a1 1 0 11-.8 1.84c-.75-.32-1.49-.75-2.17-1.14l-.03-.01a1 1 0 01-.37-1.37z"
clip-rule="evenodd"
/>
<path
fill="#fff"
fill-rule="evenodd"
d="M44.76 29.21a1 1 0 011.13.85c.43 3.01-.1 6.14-1.72 8.94a1 1 0 01-1.74-1 11.87 11.87 0 001.48-7.66 1 1 0 01.85-1.13z"
clip-rule="evenodd"
opacity=".4"
/>
<path
fill="#fff"
fill-rule="evenodd"
d="M44.78 29.2a1 1 0 011.11.88c.11.86.11 1.71.11 2.5v.02a1 1 0 11-2 0c0-.81 0-1.55-.1-2.28a1 1 0 01.88-1.11z"
clip-rule="evenodd"
/>
</g>
<defs>
<clipPath id="clip0_loader">
<path fill="#fff" d="M0 0h64v64H0z" />
</clipPath>
<clipPath id="clip1_loader">
<path fill="#fff" d="M0 0h64v64H0z" />
</clipPath>
<clipPath id="clip2_loader">
<path fill="#fff" d="M0 0h64v64H0z" />
</clipPath>
</defs>
</svg>
</template>

View File

@ -0,0 +1,7 @@
<template>
<svg viewBox="0 0 39.9 39.9">
<path
d="M40 19.4A17.3 17.3 0 0022.8 2.8a17.1 17.1 0 00-14.2 7.6A11.3 11.3 0 0119.3 0 17.1 17.1 0 002.8 17.1a16.8 16.8 0 007.7 14.2A11.3 11.3 0 010 20.6a17.1 17.1 0 0031.3 9 11.4 11.4 0 01-10.7 10.3 17.1 17.1 0 0016.5-17.1 17.3 17.3 0 00-7.6-14.2A11.8 11.8 0 0140 19.4zm-20 7.8a7.4 7.4 0 01-5.2-2.1 7.1 7.1 0 01-2-5.1 7.2 7.2 0 117.2 7.2z"
/>
</svg>
</template>

View File

@ -0,0 +1,28 @@
<template>
<svg fill="none" viewBox="0 0 319 113">
<path
fill="#fff"
fill-rule="evenodd"
d="M19.32 48.6V26.4h10.92v-9.3H19.32V3.6H8.41v13.5H.83v9.3H8.4v21.3c0 9.3 5.45 15 14.55 15 2.43 0 4.85-.6 7.28-1.5v-8.7c-1.82.6-3.64.9-5.46.9-3.94 0-5.46-.9-5.46-4.8Zm40.94 14.1c13.64 0 21.22-8.1 21.22-23.1 0-15-7.27-23.1-21.22-23.1s-21.53 8.1-21.53 23.1c0 15 7.88 23.1 21.53 23.1Zm0-37.5c6.37 0 10.3 2.4 10.3 14.4 0 11.7-3.63 14.1-10.3 14.1-6.67 0-10.61-2.1-10.61-14.1s4.24-14.4 10.6-14.4Zm43.06 2.1c3.64-1.2 7.58-1.5 11.52-1.5v-9.6c-7.58.3-15.47 1.8-22.44 4.8v41.1h10.92V27.3Zm62.76 34.8v-27c0-11.7-7.58-18.9-20-18.9-7.29 0-14.56 1.8-20.93 5.1v40.8h10.91V26.7c2.73-.6 5.77-.9 8.5-.9 10 0 10.6 4.2 10.6 8.4v27.9h10.92Zm49.13-14.4V35.4c0-12.3-6.98-19.2-20.02-19.2-4.85 0-9.4.9-13.94 2.7v8.7c4.24-1.8 8.79-2.4 13.34-2.4 7.27 0 9.7 3.6 9.7 8.7-2.73-.6-5.16-.6-7.88-.6-18.2 0-19.71 6.6-19.71 14.1s5.15 15.3 19.4 15.3c14.25 0 19.1-7.8 19.1-15Zm-17.29-7.2h6.37v6c0 4.2-2.43 6.9-8.19 6.9s-8.49-3.6-8.49-7.2 2.73-5.7 10.31-5.7Zm56.1-23.4-7.58-.9c-13.65 0-21.23 8.1-21.23 22.8 0 21.3 14.25 23.7 20.32 23.7 14.25 0 19.4-7.8 19.4-15V0h-10.91v17.1Zm0 31.5c0 3.6-3.64 4.8-8.5 4.8-6.97 0-9.4-4.5-9.4-15s4.25-13.5 10.62-13.5l7.28.6v23.1Zm42.45 14.1c13.95 0 21.53-8.1 21.53-23.1 0-15-7.58-23.1-21.53-23.1-13.95 0-21.53 8.1-21.53 23.1 0 15 7.58 23.1 21.53 23.1Zm0-37.5c6.37 0 10.61 2.4 10.61 14.4 0 11.7-4.24 14.1-10.6 14.1-6.38 0-10.62-2.1-10.62-14.1s4.24-14.4 10.61-14.4Zm-36.08 83.78c1.4 1.47 3.4 2.2 5.98 2.2 2.64 0 4.64-.75 6-2.26 1.4-1.5 2.09-3.73 2.09-6.68 0-3.01-.7-5.26-2.1-6.73-1.41-1.5-3.4-2.24-5.99-2.24-2.61 0-4.62.76-6 2.26-1.37 1.51-2.06 3.75-2.06 6.71 0 3 .7 5.25 2.08 6.74Zm9.83-1.77c-.83 1-2.11 1.5-3.85 1.5-1.73 0-3.02-.5-3.87-1.5-.83-1.02-1.25-2.68-1.25-4.97 0-2.29.42-3.93 1.25-4.94.85-1.02 2.14-1.53 3.87-1.53 1.74 0 3.02.5 3.85 1.53.85 1 1.27 2.64 1.27 4.92 0 2.3-.42 3.97-1.27 4.99ZM235 93.56v17.34h2.73V98.03l9.39 12.87h2.57V93.56h-2.73v12.74l-9.2-12.74H235Zm52.39 17.34-6.58-17.34h3.22l5.05 13.96 4.99-13.94 3.01-.02-6.7 17.34h-3Zm21.02-17.34-6.76 17.34h2.86l1.71-4.7h7.08l1.71 4.7h3.02l-6.58-17.34h-3.04Zm1.35 2.88 2.7 7.41h-5.4l2.7-7.4Z"
clip-rule="evenodd"
/>
<path class="logoStar" fill="url(#a_logoStar)" fill-rule="evenodd" d="M199.43 102H1v2h198.43v-2Z" clip-rule="evenodd" />
<path
class="logoStar"
fill="url(#b_logoStar)"
fill-rule="evenodd"
d="M206.46 99.47 205 93l-1.46 6.47-5.61-3.54 3.54 5.6L195 103l6.47 1.46-3.54 5.61 5.6-3.54L205 113l1.46-6.47 5.61 3.54-3.54-5.6L215 103l-6.47-1.46 3.54-5.61-5.6 3.54Z"
clip-rule="evenodd"
/>
<defs>
<linearGradient id="a_logoStar" x1="1" x2="199" y1="103" y2="103" gradientUnits="userSpaceOnUse">
<stop stop-color="#69db99" stop-opacity="0" />
<stop offset="1" stop-color="#69db99" />
</linearGradient>
<linearGradient id="b_logoStar" x1="213" x2="-1" y1="102" y2="102" gradientUnits="userSpaceOnUse">
<stop stop-color="#69db99" />
<stop offset="1" stop-color="#69db99" stop-opacity="0" />
</linearGradient>
</defs>
</svg>
</template>

View File

@ -0,0 +1,9 @@
<template>
<svg viewBox="0 0 24 24">
<path
fill-rule="evenodd"
d="M5.75 3.02A.16.16 0 005.63 3a.15.15 0 00-.1.07L3.77 5.95a.14.14 0 00-.02.08l.2 3.17-.33.28a.14.14 0 00-.05.11c0 .05.02.09.05.11l.48.38-.3.29a.14.14 0 000 .2l.49.47-.21.2a.14.14 0 00-.01.2l.81.96-1.87 4.25a.14.14 0 000 .1l1.11 4.14c.01.04.04.07.08.1.03.01.08.02.12 0l5.66-1.72 1.33.55h.02l4 .93h.06l2.31-.35c.05 0 .1-.04.12-.08l.61-1.28.03-.01a.15.15 0 00.06-.07l.27.1c.04 0 .09 0 .12-.02a.15.15 0 00.08-.09l1.1-3.49v-.07l-.55-3.24.64-.77a.14.14 0 00-.02-.21l-.18-.14.36-.32a.14.14 0 00.05-.12.15.15 0 00-.06-.1l-.25-.2.35-.27a.15.15 0 00.06-.11.15.15 0 00-.06-.12l-.28-.2.84-2.36.01-.06-.15-2.4a.15.15 0 00-.06-.1.16.16 0 00-.13-.03l-6.1 1.37-4.52-.34-4.3-2.65zm12.5 15.72v.05a.15.15 0 00-.08.08l-1.99.26h-.01l-.36.12.22-1.36.3-.25 1.6-.18.26.17.24.15.13.17-.19.68-.04.01a.15.15 0 00-.07.1zm1.5-3.2l-1 3.18-.23-.07.2-.7a.07.07 0 00-.01-.06l-.16-.2-.02-.02-.23-.15-.32-.7.85-1.1.91-.18zM5.15 12.27l-.76-.92.22-.21a.14.14 0 000-.2l-.49-.47.3-.3a.14.14 0 000-.22l-.47-.36.25-.22a.14.14 0 00.05-.12l-.2-3.2 1.66-2.7.22.14 6.12 5.46L9 11.05l-3.84 1.22zm-1.8 4.36l1.84-4.2.01-.02 3.76-1.2.17 1.8a.07.07 0 000 .04l2.11 3.23-2.56.14-5.33.2zM9.85 19l-5.47 1.66-1.05-3.88 5.31-.2L9.84 19zm.52.1l5.5-1.16-.23 1.39-.56.56-3.87-.6-.81-.17-.03-.01zm7.72-.07l-.52 1.1-2.2.33-3.95-.92-.3-.12.06.01 3.91.62c.03 0 .05 0 .07-.03l.6-.6.45-.15 1.88-.24zM6.67 3.95L9.9 5.94l.08.02H10l1.75 2.5-5.08-4.51zm13.88 1.02l.14 2.19-.87 2.43c-.02.06 0 .13.05.17l.22.15-.35.27a.15.15 0 00-.06.12c0 .04.02.09.06.11l.26.2-.36.33a.14.14 0 00-.05.1c0 .05.03.09.06.12l.2.15-.58.69-2.92-.95-1.63-2.02 5.83-4.06zm-5.9 1.33l5.53-1.25-5.5 3.82-.03-2.57zm-4.45-.32l4.29.33.04 2.7v.02l.91 4.04.38 1.29.01.02.03.04.34.5c.02.03.07.05.1.03l.97-.5.1 1.4v.03l.45.97.24.52-.07-.04a.08.08 0 00-.05-.02l-1.6.18-2.07-2.95-.6-1.45-1.41-4.16a.08.08 0 00-.01-.01L10.2 5.98zm9.02 6.16l.56 3.24-1.01.2-1.22.18.9-2.98c0-.03 0-.06-.03-.08l-1.75-1.39 2.55.83zm-7.08-3.06l-3.02 2.07.17 1.79 4.2.1-1.35-3.96zm-.93 5.5l-1.78-1.5 4.08.1-.12 1.75-.7-1.02a.08.08 0 00-.1-.02l-1.38.68zm1.38-.53l.69 1-1.86-.42 1.17-.58zm-3.04-.66l1.57 1.3.15 1.34-1.72-2.64zm4.1.05l-.12 1.69 2.37 2-1.77-2.51v-.02l-.48-1.16zm1.1-4.12l1.5 1.84v.01l1.93 1.53-2.6.28-.82-3.66zm.87 3.8l2.6-.27-.9 1.38-1.02-.5a.08.08 0 00-.07 0 .07.07 0 00-.04.05l-.12.68-.08-.12-.02-.03-.35-1.19zm.7.79l-.12.74.1.13.88-.46-.85-.41zm1.24 2l.35.76.7-.91-1.05.15zm-4.15-.69l-2.12-.46.17 1.53 4.48 1.48.25-.2-2.78-2.35zm-4.6 1.35l2.45-.14-1.27 2.51-1.18-2.37zm2.62-.13L10.13 19l5.54-1.18-4.24-1.4zm6.06-1.02l-.07-1.08.73-1.1-.66 2.18z"
clip-rule="evenodd"
/>
</svg>
</template>

View File

@ -0,0 +1,12 @@
<template>
<svg viewBox="0 0 24 24" fill="#fafafa">
<path
fill-rule="evenodd"
d="M12 .9a11.2 11.2 0 110 22.4A11.2 11.2 0 0112 .9zm0-.8a12 12 0 110 24 12 12 0 010-24z"
clip-rule="evenodd"
/>
<path
d="M13.83 11.53c0 3.59-2.9 6.59-6.63 6.02 1.84-.86 3.39-2.77 3.39-6.02h-2a.27.27 0 01-.21-.44l3.7-4.57c.1-.13.31-.13.42 0l3.66 4.57c.14.17.02.44-.21.44h-2.12z"
/>
</svg>
</template>

Some files were not shown because too many files have changed in this diff Show More