mirror of
https://github.com/tornadocash/tornado-relayer.git
synced 2024-10-01 08:25:37 -04:00
update libs, docker file, lint
This commit is contained in:
parent
362605702e
commit
bd0f8d2a2e
@ -1,3 +1,5 @@
|
||||
node_modules
|
||||
.env
|
||||
.git
|
||||
.git
|
||||
build
|
||||
test
|
||||
|
@ -4,30 +4,16 @@
|
||||
"commonjs": true,
|
||||
"es2020": true
|
||||
},
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended"
|
||||
],
|
||||
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 11
|
||||
},
|
||||
"plugins": [
|
||||
"@typescript-eslint"
|
||||
],
|
||||
"plugins": ["@typescript-eslint"],
|
||||
"rules": {
|
||||
"linebreak-style": [
|
||||
"error",
|
||||
"unix"
|
||||
],
|
||||
"quotes": [
|
||||
"error",
|
||||
"single"
|
||||
],
|
||||
"semi": [
|
||||
"error",
|
||||
"always"
|
||||
],
|
||||
"linebreak-style": ["error", "unix"],
|
||||
"quotes": ["error", "single"],
|
||||
"semi": ["error", "always"],
|
||||
"no-useless-catch": "off",
|
||||
"@typescript-eslint/no-var-requires": "off",
|
||||
"@typescript-eslint/explicit-module-boundary-types": "off"
|
||||
|
148
.github/workflows/build.yml
vendored
148
.github/workflows/build.yml
vendored
@ -2,8 +2,8 @@ name: build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ '*' ]
|
||||
tags: [ 'v[0-9]+.[0-9]+.[0-9]+' ]
|
||||
branches: ['*']
|
||||
tags: ['v[0-9]+.[0-9]+.[0-9]+']
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
@ -16,7 +16,7 @@ jobs:
|
||||
with:
|
||||
node-version: 16
|
||||
- run: yarn install
|
||||
- run: yarn test
|
||||
# - run: yarn test
|
||||
- run: yarn lint
|
||||
- name: Telegram Failure Notification
|
||||
uses: appleboy/telegram-action@master
|
||||
@ -26,74 +26,74 @@ jobs:
|
||||
format: markdown
|
||||
to: ${{ secrets.TELEGRAM_CHAT_ID }}
|
||||
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
|
||||
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: startsWith(github.ref, 'refs/tags')
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set vars
|
||||
id: vars
|
||||
run: |
|
||||
echo "::set-output name=version::$(echo ${GITHUB_REF#refs/tags/v})"
|
||||
echo "::set-output name=repo_name::$(echo ${GITHUB_REPOSITORY#*/})"
|
||||
|
||||
- name: Check package.json version vs tag
|
||||
run: |
|
||||
[ ${{ steps.vars.outputs.version }} = $(grep '"version":' package.json | grep -o "[0-9.]*") ] || (echo "Git tag doesn't match version in package.json" && false)
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v1.1.0
|
||||
with:
|
||||
dockerfile: Dockerfile
|
||||
repository: tornadocash/relayer
|
||||
tag_with_ref: true
|
||||
tags: candidate
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_TOKEN }}
|
||||
|
||||
- name: Telegram Message Notify
|
||||
uses: appleboy/telegram-action@master
|
||||
with:
|
||||
to: ${{ secrets.TELEGRAM_CHAT_ID }}
|
||||
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
|
||||
message: 🚀 Published a [${{ steps.vars.outputs.repo_name }}](https://github.com/${{ github.repository }}) version ${{ steps.vars.outputs.version }} to docker hub
|
||||
debug: true
|
||||
format: markdown
|
||||
|
||||
- name: Telegram Relayer Channel Notification
|
||||
uses: appleboy/telegram-action@master
|
||||
with:
|
||||
to: ${{ secrets.TELEGRAM_RELAYER_CHAT_ID }}
|
||||
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
|
||||
message: |
|
||||
🚀 Published a new version of the relayer node service for mainnet to docker hub: `tornadocash/relayer:v${{ steps.vars.outputs.version }}` and `tornadocash/relayer:mining`.
|
||||
|
||||
❗️Please update your mainnet nodes ❗️
|
||||
DO NOT TOUCH SIDECHAINS AND NOVA RELAYERS.
|
||||
|
||||
debug: true
|
||||
format: markdown
|
||||
|
||||
- name: Discord Relayer Channel Notification
|
||||
env:
|
||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_RELAYER_WEBHOOK }}
|
||||
uses: Ilshidur/action-discord@master
|
||||
with:
|
||||
args: |
|
||||
🚀 Published a new version of the relayer node service for mainnet to docker hub: `tornadocash/relayer:v${{ steps.vars.outputs.version }}` and `tornadocash/relayer:mining`.
|
||||
|
||||
❗️Please update your mainnet nodes ❗️
|
||||
DO NOT TOUCH SIDECHAINS AND NOVA RELAYERS.
|
||||
|
||||
- name: Telegram Failure Notification
|
||||
uses: appleboy/telegram-action@master
|
||||
if: failure()
|
||||
with:
|
||||
message: ❗ Failed to publish [${{ steps.vars.outputs.repo_name }}](https://github.com/${{ github.repository }}/actions):v${{ steps.vars.outputs.version }} for mainnet because of ${{ github.actor }}
|
||||
format: markdown
|
||||
to: ${{ secrets.TELEGRAM_CHAT_ID }}
|
||||
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
|
||||
# TODO: Edit this step
|
||||
# publish:
|
||||
# runs-on: ubuntu-latest
|
||||
# needs: build
|
||||
# if: startsWith(github.ref, 'refs/tags')
|
||||
# steps:
|
||||
# - name: Checkout
|
||||
# uses: actions/checkout@v2
|
||||
#
|
||||
# - name: Set vars
|
||||
# id: vars
|
||||
# run: |
|
||||
# echo "::set-output name=version::$(echo ${GITHUB_REF#refs/tags/v})"
|
||||
# echo "::set-output name=repo_name::$(echo ${GITHUB_REPOSITORY#*/})"
|
||||
#
|
||||
# - name: Check package.json version vs tag
|
||||
# run: |
|
||||
# [ ${{ steps.vars.outputs.version }} = $(grep '"version":' package.json | grep -o "[0-9.]*") ] || (echo "Git tag doesn't match version in package.json" && false)
|
||||
#
|
||||
# - name: Build and push Docker image
|
||||
# uses: docker/build-push-action@v1.1.0
|
||||
# with:
|
||||
# dockerfile: Dockerfile
|
||||
# repository: tornadocash/relayer
|
||||
# tag_with_ref: true
|
||||
# tags: candidate
|
||||
# username: ${{ secrets.DOCKER_USERNAME }}
|
||||
# password: ${{ secrets.DOCKER_TOKEN }}
|
||||
#
|
||||
# - name: Telegram Message Notify
|
||||
# uses: appleboy/telegram-action@master
|
||||
# with:
|
||||
# to: ${{ secrets.TELEGRAM_CHAT_ID }}
|
||||
# token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
|
||||
# message: 🚀 Published a [${{ steps.vars.outputs.repo_name }}](https://github.com/${{ github.repository }}) version ${{ steps.vars.outputs.version }} to docker hub
|
||||
# debug: true
|
||||
# format: markdown
|
||||
#
|
||||
# - name: Telegram Relayer Channel Notification
|
||||
# uses: appleboy/telegram-action@master
|
||||
# with:
|
||||
# to: ${{ secrets.TELEGRAM_RELAYER_CHAT_ID }}
|
||||
# token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
|
||||
# message: |
|
||||
# 🚀 Published a new version of the relayer node service for mainnet to docker hub: `tornadocash/relayer:v${{ steps.vars.outputs.version }}` and `tornadocash/relayer:mining`.
|
||||
#
|
||||
# ❗️Please update your mainnet nodes ❗️
|
||||
# DO NOT TOUCH SIDECHAINS AND NOVA RELAYERS.
|
||||
#
|
||||
# debug: true
|
||||
# format: markdown
|
||||
#
|
||||
# - name: Discord Relayer Channel Notification
|
||||
# env:
|
||||
# DISCORD_WEBHOOK: ${{ secrets.DISCORD_RELAYER_WEBHOOK }}
|
||||
# uses: Ilshidur/action-discord@master
|
||||
# with:
|
||||
# args: |
|
||||
# 🚀 Published a new version of the relayer node service for mainnet to docker hub: `tornadocash/relayer:v${{ steps.vars.outputs.version }}` and `tornadocash/relayer:mining`.
|
||||
#
|
||||
# ❗️Please update your mainnet nodes ❗️
|
||||
# DO NOT TOUCH SIDECHAINS AND NOVA RELAYERS.
|
||||
#
|
||||
# - name: Telegram Failure Notification
|
||||
# uses: appleboy/telegram-action@master
|
||||
# if: failure()
|
||||
# with:
|
||||
# message: ❗ Failed to publish [${{ steps.vars.outputs.repo_name }}](https://github.com/${{ github.repository }}/actions):v${{ steps.vars.outputs.version }} for mainnet because of ${{ github.actor }}
|
||||
# format: markdown
|
||||
# to: ${{ secrets.TELEGRAM_CHAT_ID }}
|
||||
# token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
|
||||
|
7
.prettierrc
Normal file
7
.prettierrc
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"semi": true,
|
||||
"trailingComma": "all",
|
||||
"singleQuote": true,
|
||||
"printWidth": 130,
|
||||
"tabWidth": 2
|
||||
}
|
18
Dockerfile
18
Dockerfile
@ -6,25 +6,23 @@ WORKDIR /usr/app
|
||||
|
||||
COPY yarn.lock .
|
||||
COPY package.json .
|
||||
|
||||
RUN yarn install && yarn cache clean
|
||||
|
||||
COPY . .
|
||||
RUN apk update && apk add --no-cache g++ make python3 git openssh && rm -rf /var/cache/apk/*
|
||||
RUN yarn install && yarn cache clean -f
|
||||
COPY . ./
|
||||
|
||||
RUN yarn build
|
||||
|
||||
FROM node:16-alpine as production
|
||||
FROM node:16-alpine as prod
|
||||
ENV NODE_ENV=production
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk update && apk add --no-cache g++ make python3 git openssh && rm -rf /var/cache/apk/*
|
||||
|
||||
COPY --from=dev /usr/app/build /app
|
||||
COPY --from=dev /usr/app/package.json /app/
|
||||
COPY --from=dev /usr/app/yarn.lock /app/
|
||||
|
||||
RUN chown -R node: .
|
||||
RUN yarn install && yarn cache clean -f
|
||||
|
||||
USER node
|
||||
RUN yarn install --non-interactive --frozen-lockfile && yarn cache clean
|
||||
|
||||
CMD ["node", "index.js"]
|
||||
ENTRYPOINT ["yarn"]
|
||||
|
@ -1,596 +0,0 @@
|
||||
/* Autogenerated file. Do not edit manually. */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type {
|
||||
BaseContract,
|
||||
BigNumber,
|
||||
BigNumberish,
|
||||
BytesLike,
|
||||
CallOverrides,
|
||||
ContractTransaction,
|
||||
Overrides,
|
||||
PopulatedTransaction,
|
||||
Signer,
|
||||
utils,
|
||||
} from "ethers";
|
||||
import type {
|
||||
FunctionFragment,
|
||||
Result,
|
||||
EventFragment,
|
||||
} from "@ethersproject/abi";
|
||||
import type { Listener, Provider } from "@ethersproject/providers";
|
||||
import type {
|
||||
TypedEventFilter,
|
||||
TypedEvent,
|
||||
TypedListener,
|
||||
OnEvent,
|
||||
} from "./common";
|
||||
|
||||
export interface AggregatorAbiInterface extends utils.Interface {
|
||||
contractName: "AggregatorAbi";
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
getFunction(
|
||||
nameOrSignatureOrTopic:
|
||||
| "addConnector"
|
||||
| "addOracle"
|
||||
| "connectors"
|
||||
| "getRate"
|
||||
| "getRateToEth"
|
||||
| "multiWrapper"
|
||||
| "oracles"
|
||||
| "owner"
|
||||
| "removeConnector"
|
||||
| "removeOracle"
|
||||
| "renounceOwnership"
|
||||
| "setMultiWrapper"
|
||||
| "transferOwnership"
|
||||
): 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 interface ConnectorAddedEventObject {
|
||||
connector: string;
|
||||
}
|
||||
export type ConnectorAddedEvent = TypedEvent<
|
||||
[string],
|
||||
ConnectorAddedEventObject
|
||||
>;
|
||||
|
||||
export type ConnectorAddedEventFilter = TypedEventFilter<ConnectorAddedEvent>;
|
||||
|
||||
export interface ConnectorRemovedEventObject {
|
||||
connector: string;
|
||||
}
|
||||
export type ConnectorRemovedEvent = TypedEvent<
|
||||
[string],
|
||||
ConnectorRemovedEventObject
|
||||
>;
|
||||
|
||||
export type ConnectorRemovedEventFilter =
|
||||
TypedEventFilter<ConnectorRemovedEvent>;
|
||||
|
||||
export interface MultiWrapperUpdatedEventObject {
|
||||
multiWrapper: string;
|
||||
}
|
||||
export type MultiWrapperUpdatedEvent = TypedEvent<
|
||||
[string],
|
||||
MultiWrapperUpdatedEventObject
|
||||
>;
|
||||
|
||||
export type MultiWrapperUpdatedEventFilter =
|
||||
TypedEventFilter<MultiWrapperUpdatedEvent>;
|
||||
|
||||
export interface OracleAddedEventObject {
|
||||
oracle: string;
|
||||
oracleType: number;
|
||||
}
|
||||
export type OracleAddedEvent = TypedEvent<
|
||||
[string, number],
|
||||
OracleAddedEventObject
|
||||
>;
|
||||
|
||||
export type OracleAddedEventFilter = TypedEventFilter<OracleAddedEvent>;
|
||||
|
||||
export interface OracleRemovedEventObject {
|
||||
oracle: string;
|
||||
oracleType: number;
|
||||
}
|
||||
export type OracleRemovedEvent = TypedEvent<
|
||||
[string, number],
|
||||
OracleRemovedEventObject
|
||||
>;
|
||||
|
||||
export type OracleRemovedEventFilter = TypedEventFilter<OracleRemovedEvent>;
|
||||
|
||||
export interface OwnershipTransferredEventObject {
|
||||
previousOwner: string;
|
||||
newOwner: string;
|
||||
}
|
||||
export type OwnershipTransferredEvent = TypedEvent<
|
||||
[string, string],
|
||||
OwnershipTransferredEventObject
|
||||
>;
|
||||
|
||||
export type OwnershipTransferredEventFilter =
|
||||
TypedEventFilter<OwnershipTransferredEvent>;
|
||||
|
||||
export interface AggregatorAbi extends BaseContract {
|
||||
contractName: "AggregatorAbi";
|
||||
|
||||
connect(signerOrProvider: Signer | Provider | string): this;
|
||||
attach(addressOrName: string): this;
|
||||
deployed(): Promise<this>;
|
||||
|
||||
interface: AggregatorAbiInterface;
|
||||
|
||||
queryFilter<TEvent extends TypedEvent>(
|
||||
event: TypedEventFilter<TEvent>,
|
||||
fromBlockOrBlockhash?: string | number | undefined,
|
||||
toBlock?: string | number | undefined
|
||||
): Promise<Array<TEvent>>;
|
||||
|
||||
listeners<TEvent extends TypedEvent>(
|
||||
eventFilter?: TypedEventFilter<TEvent>
|
||||
): Array<TypedListener<TEvent>>;
|
||||
listeners(eventName?: string): Array<Listener>;
|
||||
removeAllListeners<TEvent extends TypedEvent>(
|
||||
eventFilter: TypedEventFilter<TEvent>
|
||||
): this;
|
||||
removeAllListeners(eventName?: string): this;
|
||||
off: OnEvent<this>;
|
||||
on: OnEvent<this>;
|
||||
once: OnEvent<this>;
|
||||
removeListener: OnEvent<this>;
|
||||
|
||||
functions: {
|
||||
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): ConnectorAddedEventFilter;
|
||||
ConnectorAdded(connector?: null): ConnectorAddedEventFilter;
|
||||
|
||||
"ConnectorRemoved(address)"(connector?: null): ConnectorRemovedEventFilter;
|
||||
ConnectorRemoved(connector?: null): ConnectorRemovedEventFilter;
|
||||
|
||||
"MultiWrapperUpdated(address)"(
|
||||
multiWrapper?: null
|
||||
): MultiWrapperUpdatedEventFilter;
|
||||
MultiWrapperUpdated(multiWrapper?: null): MultiWrapperUpdatedEventFilter;
|
||||
|
||||
"OracleAdded(address,uint8)"(
|
||||
oracle?: null,
|
||||
oracleType?: null
|
||||
): OracleAddedEventFilter;
|
||||
OracleAdded(oracle?: null, oracleType?: null): OracleAddedEventFilter;
|
||||
|
||||
"OracleRemoved(address,uint8)"(
|
||||
oracle?: null,
|
||||
oracleType?: null
|
||||
): OracleRemovedEventFilter;
|
||||
OracleRemoved(oracle?: null, oracleType?: null): OracleRemovedEventFilter;
|
||||
|
||||
"OwnershipTransferred(address,address)"(
|
||||
previousOwner?: string | null,
|
||||
newOwner?: string | null
|
||||
): OwnershipTransferredEventFilter;
|
||||
OwnershipTransferred(
|
||||
previousOwner?: string | null,
|
||||
newOwner?: string | null
|
||||
): OwnershipTransferredEventFilter;
|
||||
};
|
||||
|
||||
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>;
|
||||
};
|
||||
}
|
@ -1,116 +0,0 @@
|
||||
/* Autogenerated file. Do not edit manually. */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type {
|
||||
BaseContract,
|
||||
BigNumber,
|
||||
BytesLike,
|
||||
CallOverrides,
|
||||
PopulatedTransaction,
|
||||
Signer,
|
||||
utils,
|
||||
} from "ethers";
|
||||
import type { FunctionFragment, Result } from "@ethersproject/abi";
|
||||
import type { Listener, Provider } from "@ethersproject/providers";
|
||||
import type {
|
||||
TypedEventFilter,
|
||||
TypedEvent,
|
||||
TypedListener,
|
||||
OnEvent,
|
||||
} from "./common";
|
||||
|
||||
export declare namespace MultiCall {
|
||||
export type CallStruct = { to: string; data: BytesLike };
|
||||
|
||||
export type CallStructOutput = [string, string] & {
|
||||
to: string;
|
||||
data: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface MulticallAbiInterface extends utils.Interface {
|
||||
contractName: "MulticallAbi";
|
||||
|
||||
functions: {
|
||||
"multicall((address,bytes)[])": FunctionFragment;
|
||||
};
|
||||
|
||||
getFunction(nameOrSignatureOrTopic: "multicall"): FunctionFragment;
|
||||
|
||||
encodeFunctionData(
|
||||
functionFragment: "multicall",
|
||||
values: [MultiCall.CallStruct[]]
|
||||
): string;
|
||||
|
||||
decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result;
|
||||
|
||||
events: {};
|
||||
}
|
||||
|
||||
export interface MulticallAbi extends BaseContract {
|
||||
contractName: "MulticallAbi";
|
||||
|
||||
connect(signerOrProvider: Signer | Provider | string): this;
|
||||
attach(addressOrName: string): this;
|
||||
deployed(): Promise<this>;
|
||||
|
||||
interface: MulticallAbiInterface;
|
||||
|
||||
queryFilter<TEvent extends TypedEvent>(
|
||||
event: TypedEventFilter<TEvent>,
|
||||
fromBlockOrBlockhash?: string | number | undefined,
|
||||
toBlock?: string | number | undefined
|
||||
): Promise<Array<TEvent>>;
|
||||
|
||||
listeners<TEvent extends TypedEvent>(
|
||||
eventFilter?: TypedEventFilter<TEvent>
|
||||
): Array<TypedListener<TEvent>>;
|
||||
listeners(eventName?: string): Array<Listener>;
|
||||
removeAllListeners<TEvent extends TypedEvent>(
|
||||
eventFilter: TypedEventFilter<TEvent>
|
||||
): this;
|
||||
removeAllListeners(eventName?: string): this;
|
||||
off: OnEvent<this>;
|
||||
on: OnEvent<this>;
|
||||
once: OnEvent<this>;
|
||||
removeListener: OnEvent<this>;
|
||||
|
||||
functions: {
|
||||
multicall(
|
||||
calls: MultiCall.CallStruct[],
|
||||
overrides?: CallOverrides
|
||||
): Promise<
|
||||
[string[], boolean[]] & { results: string[]; success: boolean[] }
|
||||
>;
|
||||
};
|
||||
|
||||
multicall(
|
||||
calls: MultiCall.CallStruct[],
|
||||
overrides?: CallOverrides
|
||||
): Promise<[string[], boolean[]] & { results: string[]; success: boolean[] }>;
|
||||
|
||||
callStatic: {
|
||||
multicall(
|
||||
calls: MultiCall.CallStruct[],
|
||||
overrides?: CallOverrides
|
||||
): Promise<
|
||||
[string[], boolean[]] & { results: string[]; success: boolean[] }
|
||||
>;
|
||||
};
|
||||
|
||||
filters: {};
|
||||
|
||||
estimateGas: {
|
||||
multicall(
|
||||
calls: MultiCall.CallStruct[],
|
||||
overrides?: CallOverrides
|
||||
): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
populateTransaction: {
|
||||
multicall(
|
||||
calls: MultiCall.CallStruct[],
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
};
|
||||
}
|
@ -1,596 +0,0 @@
|
||||
/* Autogenerated file. Do not edit manually. */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type {
|
||||
BaseContract,
|
||||
BigNumber,
|
||||
BigNumberish,
|
||||
BytesLike,
|
||||
CallOverrides,
|
||||
ContractTransaction,
|
||||
Overrides,
|
||||
PopulatedTransaction,
|
||||
Signer,
|
||||
utils,
|
||||
} from "ethers";
|
||||
import type {
|
||||
FunctionFragment,
|
||||
Result,
|
||||
EventFragment,
|
||||
} from "@ethersproject/abi";
|
||||
import type { Listener, Provider } from "@ethersproject/providers";
|
||||
import type {
|
||||
TypedEventFilter,
|
||||
TypedEvent,
|
||||
TypedListener,
|
||||
OnEvent,
|
||||
} from "./common";
|
||||
|
||||
export interface OffchainOracleAbiInterface extends utils.Interface {
|
||||
contractName: "OffchainOracleAbi";
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
getFunction(
|
||||
nameOrSignatureOrTopic:
|
||||
| "addConnector"
|
||||
| "addOracle"
|
||||
| "connectors"
|
||||
| "getRate"
|
||||
| "getRateToEth"
|
||||
| "multiWrapper"
|
||||
| "oracles"
|
||||
| "owner"
|
||||
| "removeConnector"
|
||||
| "removeOracle"
|
||||
| "renounceOwnership"
|
||||
| "setMultiWrapper"
|
||||
| "transferOwnership"
|
||||
): 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 interface ConnectorAddedEventObject {
|
||||
connector: string;
|
||||
}
|
||||
export type ConnectorAddedEvent = TypedEvent<
|
||||
[string],
|
||||
ConnectorAddedEventObject
|
||||
>;
|
||||
|
||||
export type ConnectorAddedEventFilter = TypedEventFilter<ConnectorAddedEvent>;
|
||||
|
||||
export interface ConnectorRemovedEventObject {
|
||||
connector: string;
|
||||
}
|
||||
export type ConnectorRemovedEvent = TypedEvent<
|
||||
[string],
|
||||
ConnectorRemovedEventObject
|
||||
>;
|
||||
|
||||
export type ConnectorRemovedEventFilter =
|
||||
TypedEventFilter<ConnectorRemovedEvent>;
|
||||
|
||||
export interface MultiWrapperUpdatedEventObject {
|
||||
multiWrapper: string;
|
||||
}
|
||||
export type MultiWrapperUpdatedEvent = TypedEvent<
|
||||
[string],
|
||||
MultiWrapperUpdatedEventObject
|
||||
>;
|
||||
|
||||
export type MultiWrapperUpdatedEventFilter =
|
||||
TypedEventFilter<MultiWrapperUpdatedEvent>;
|
||||
|
||||
export interface OracleAddedEventObject {
|
||||
oracle: string;
|
||||
oracleType: number;
|
||||
}
|
||||
export type OracleAddedEvent = TypedEvent<
|
||||
[string, number],
|
||||
OracleAddedEventObject
|
||||
>;
|
||||
|
||||
export type OracleAddedEventFilter = TypedEventFilter<OracleAddedEvent>;
|
||||
|
||||
export interface OracleRemovedEventObject {
|
||||
oracle: string;
|
||||
oracleType: number;
|
||||
}
|
||||
export type OracleRemovedEvent = TypedEvent<
|
||||
[string, number],
|
||||
OracleRemovedEventObject
|
||||
>;
|
||||
|
||||
export type OracleRemovedEventFilter = TypedEventFilter<OracleRemovedEvent>;
|
||||
|
||||
export interface OwnershipTransferredEventObject {
|
||||
previousOwner: string;
|
||||
newOwner: string;
|
||||
}
|
||||
export type OwnershipTransferredEvent = TypedEvent<
|
||||
[string, string],
|
||||
OwnershipTransferredEventObject
|
||||
>;
|
||||
|
||||
export type OwnershipTransferredEventFilter =
|
||||
TypedEventFilter<OwnershipTransferredEvent>;
|
||||
|
||||
export interface OffchainOracleAbi extends BaseContract {
|
||||
contractName: "OffchainOracleAbi";
|
||||
|
||||
connect(signerOrProvider: Signer | Provider | string): this;
|
||||
attach(addressOrName: string): this;
|
||||
deployed(): Promise<this>;
|
||||
|
||||
interface: OffchainOracleAbiInterface;
|
||||
|
||||
queryFilter<TEvent extends TypedEvent>(
|
||||
event: TypedEventFilter<TEvent>,
|
||||
fromBlockOrBlockhash?: string | number | undefined,
|
||||
toBlock?: string | number | undefined
|
||||
): Promise<Array<TEvent>>;
|
||||
|
||||
listeners<TEvent extends TypedEvent>(
|
||||
eventFilter?: TypedEventFilter<TEvent>
|
||||
): Array<TypedListener<TEvent>>;
|
||||
listeners(eventName?: string): Array<Listener>;
|
||||
removeAllListeners<TEvent extends TypedEvent>(
|
||||
eventFilter: TypedEventFilter<TEvent>
|
||||
): this;
|
||||
removeAllListeners(eventName?: string): this;
|
||||
off: OnEvent<this>;
|
||||
on: OnEvent<this>;
|
||||
once: OnEvent<this>;
|
||||
removeListener: OnEvent<this>;
|
||||
|
||||
functions: {
|
||||
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): ConnectorAddedEventFilter;
|
||||
ConnectorAdded(connector?: null): ConnectorAddedEventFilter;
|
||||
|
||||
"ConnectorRemoved(address)"(connector?: null): ConnectorRemovedEventFilter;
|
||||
ConnectorRemoved(connector?: null): ConnectorRemovedEventFilter;
|
||||
|
||||
"MultiWrapperUpdated(address)"(
|
||||
multiWrapper?: null
|
||||
): MultiWrapperUpdatedEventFilter;
|
||||
MultiWrapperUpdated(multiWrapper?: null): MultiWrapperUpdatedEventFilter;
|
||||
|
||||
"OracleAdded(address,uint8)"(
|
||||
oracle?: null,
|
||||
oracleType?: null
|
||||
): OracleAddedEventFilter;
|
||||
OracleAdded(oracle?: null, oracleType?: null): OracleAddedEventFilter;
|
||||
|
||||
"OracleRemoved(address,uint8)"(
|
||||
oracle?: null,
|
||||
oracleType?: null
|
||||
): OracleRemovedEventFilter;
|
||||
OracleRemoved(oracle?: null, oracleType?: null): OracleRemovedEventFilter;
|
||||
|
||||
"OwnershipTransferred(address,address)"(
|
||||
previousOwner?: string | null,
|
||||
newOwner?: string | null
|
||||
): OwnershipTransferredEventFilter;
|
||||
OwnershipTransferred(
|
||||
previousOwner?: string | null,
|
||||
newOwner?: string | null
|
||||
): OwnershipTransferredEventFilter;
|
||||
};
|
||||
|
||||
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>;
|
||||
};
|
||||
}
|
@ -1,695 +0,0 @@
|
||||
/* Autogenerated file. Do not edit manually. */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type {
|
||||
BaseContract,
|
||||
BigNumber,
|
||||
BigNumberish,
|
||||
BytesLike,
|
||||
CallOverrides,
|
||||
ContractTransaction,
|
||||
Overrides,
|
||||
PayableOverrides,
|
||||
PopulatedTransaction,
|
||||
Signer,
|
||||
utils,
|
||||
} from "ethers";
|
||||
import type {
|
||||
FunctionFragment,
|
||||
Result,
|
||||
EventFragment,
|
||||
} from "@ethersproject/abi";
|
||||
import type { Listener, Provider } from "@ethersproject/providers";
|
||||
import type {
|
||||
TypedEventFilter,
|
||||
TypedEvent,
|
||||
TypedListener,
|
||||
OnEvent,
|
||||
} from "./common";
|
||||
|
||||
export interface TornadoABIInterface extends utils.Interface {
|
||||
contractName: "TornadoABI";
|
||||
|
||||
functions: {
|
||||
"changeOperator(address)": FunctionFragment;
|
||||
"nullifierHashes(bytes32)": FunctionFragment;
|
||||
"withdraw(bytes,bytes32,bytes32,address,address,uint256,uint256)": FunctionFragment;
|
||||
"verifier()": FunctionFragment;
|
||||
"hashLeftRight(bytes32,bytes32)": FunctionFragment;
|
||||
"FIELD_SIZE()": FunctionFragment;
|
||||
"levels()": FunctionFragment;
|
||||
"operator()": FunctionFragment;
|
||||
"isKnownRoot(bytes32)": FunctionFragment;
|
||||
"commitments(bytes32)": FunctionFragment;
|
||||
"denomination()": FunctionFragment;
|
||||
"currentRootIndex()": FunctionFragment;
|
||||
"updateVerifier(address)": FunctionFragment;
|
||||
"deposit(bytes32)": FunctionFragment;
|
||||
"getLastRoot()": FunctionFragment;
|
||||
"roots(uint256)": FunctionFragment;
|
||||
"ROOT_HISTORY_SIZE()": FunctionFragment;
|
||||
"isSpent(bytes32)": FunctionFragment;
|
||||
"zeros(uint256)": FunctionFragment;
|
||||
"ZERO_VALUE()": FunctionFragment;
|
||||
"filledSubtrees(uint256)": FunctionFragment;
|
||||
"nextIndex()": FunctionFragment;
|
||||
};
|
||||
|
||||
getFunction(
|
||||
nameOrSignatureOrTopic:
|
||||
| "changeOperator"
|
||||
| "nullifierHashes"
|
||||
| "withdraw"
|
||||
| "verifier"
|
||||
| "hashLeftRight"
|
||||
| "FIELD_SIZE"
|
||||
| "levels"
|
||||
| "operator"
|
||||
| "isKnownRoot"
|
||||
| "commitments"
|
||||
| "denomination"
|
||||
| "currentRootIndex"
|
||||
| "updateVerifier"
|
||||
| "deposit"
|
||||
| "getLastRoot"
|
||||
| "roots"
|
||||
| "ROOT_HISTORY_SIZE"
|
||||
| "isSpent"
|
||||
| "zeros"
|
||||
| "ZERO_VALUE"
|
||||
| "filledSubtrees"
|
||||
| "nextIndex"
|
||||
): FunctionFragment;
|
||||
|
||||
encodeFunctionData(
|
||||
functionFragment: "changeOperator",
|
||||
values: [string]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "nullifierHashes",
|
||||
values: [BytesLike]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "withdraw",
|
||||
values: [
|
||||
BytesLike,
|
||||
BytesLike,
|
||||
BytesLike,
|
||||
string,
|
||||
string,
|
||||
BigNumberish,
|
||||
BigNumberish
|
||||
]
|
||||
): string;
|
||||
encodeFunctionData(functionFragment: "verifier", values?: undefined): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "hashLeftRight",
|
||||
values: [BytesLike, BytesLike]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "FIELD_SIZE",
|
||||
values?: undefined
|
||||
): string;
|
||||
encodeFunctionData(functionFragment: "levels", values?: undefined): string;
|
||||
encodeFunctionData(functionFragment: "operator", values?: undefined): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "isKnownRoot",
|
||||
values: [BytesLike]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "commitments",
|
||||
values: [BytesLike]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "denomination",
|
||||
values?: undefined
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "currentRootIndex",
|
||||
values?: undefined
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "updateVerifier",
|
||||
values: [string]
|
||||
): string;
|
||||
encodeFunctionData(functionFragment: "deposit", values: [BytesLike]): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "getLastRoot",
|
||||
values?: undefined
|
||||
): string;
|
||||
encodeFunctionData(functionFragment: "roots", values: [BigNumberish]): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "ROOT_HISTORY_SIZE",
|
||||
values?: undefined
|
||||
): string;
|
||||
encodeFunctionData(functionFragment: "isSpent", values: [BytesLike]): string;
|
||||
encodeFunctionData(functionFragment: "zeros", values: [BigNumberish]): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "ZERO_VALUE",
|
||||
values?: undefined
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "filledSubtrees",
|
||||
values: [BigNumberish]
|
||||
): string;
|
||||
encodeFunctionData(functionFragment: "nextIndex", values?: undefined): string;
|
||||
|
||||
decodeFunctionResult(
|
||||
functionFragment: "changeOperator",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "nullifierHashes",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "verifier", data: BytesLike): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "hashLeftRight",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(functionFragment: "FIELD_SIZE", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "levels", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "operator", data: BytesLike): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "isKnownRoot",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "commitments",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "denomination",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "currentRootIndex",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "updateVerifier",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "getLastRoot",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(functionFragment: "roots", data: BytesLike): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "ROOT_HISTORY_SIZE",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(functionFragment: "isSpent", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "zeros", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "ZERO_VALUE", data: BytesLike): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "filledSubtrees",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(functionFragment: "nextIndex", data: BytesLike): Result;
|
||||
|
||||
events: {
|
||||
"Deposit(bytes32,uint32,uint256)": EventFragment;
|
||||
"Withdrawal(address,bytes32,address,uint256)": EventFragment;
|
||||
};
|
||||
|
||||
getEvent(nameOrSignatureOrTopic: "Deposit"): EventFragment;
|
||||
getEvent(nameOrSignatureOrTopic: "Withdrawal"): EventFragment;
|
||||
}
|
||||
|
||||
export interface DepositEventObject {
|
||||
commitment: string;
|
||||
leafIndex: number;
|
||||
timestamp: BigNumber;
|
||||
}
|
||||
export type DepositEvent = TypedEvent<
|
||||
[string, number, BigNumber],
|
||||
DepositEventObject
|
||||
>;
|
||||
|
||||
export type DepositEventFilter = TypedEventFilter<DepositEvent>;
|
||||
|
||||
export interface WithdrawalEventObject {
|
||||
to: string;
|
||||
nullifierHash: string;
|
||||
relayer: string;
|
||||
fee: BigNumber;
|
||||
}
|
||||
export type WithdrawalEvent = TypedEvent<
|
||||
[string, string, string, BigNumber],
|
||||
WithdrawalEventObject
|
||||
>;
|
||||
|
||||
export type WithdrawalEventFilter = TypedEventFilter<WithdrawalEvent>;
|
||||
|
||||
export interface TornadoABI extends BaseContract {
|
||||
contractName: "TornadoABI";
|
||||
|
||||
connect(signerOrProvider: Signer | Provider | string): this;
|
||||
attach(addressOrName: string): this;
|
||||
deployed(): Promise<this>;
|
||||
|
||||
interface: TornadoABIInterface;
|
||||
|
||||
queryFilter<TEvent extends TypedEvent>(
|
||||
event: TypedEventFilter<TEvent>,
|
||||
fromBlockOrBlockhash?: string | number | undefined,
|
||||
toBlock?: string | number | undefined
|
||||
): Promise<Array<TEvent>>;
|
||||
|
||||
listeners<TEvent extends TypedEvent>(
|
||||
eventFilter?: TypedEventFilter<TEvent>
|
||||
): Array<TypedListener<TEvent>>;
|
||||
listeners(eventName?: string): Array<Listener>;
|
||||
removeAllListeners<TEvent extends TypedEvent>(
|
||||
eventFilter: TypedEventFilter<TEvent>
|
||||
): this;
|
||||
removeAllListeners(eventName?: string): this;
|
||||
off: OnEvent<this>;
|
||||
on: OnEvent<this>;
|
||||
once: OnEvent<this>;
|
||||
removeListener: OnEvent<this>;
|
||||
|
||||
functions: {
|
||||
changeOperator(
|
||||
_newOperator: string,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
nullifierHashes(
|
||||
arg0: BytesLike,
|
||||
overrides?: CallOverrides
|
||||
): Promise<[boolean]>;
|
||||
|
||||
withdraw(
|
||||
_proof: BytesLike,
|
||||
_root: BytesLike,
|
||||
_nullifierHash: BytesLike,
|
||||
_recipient: string,
|
||||
_relayer: string,
|
||||
_fee: BigNumberish,
|
||||
_refund: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
verifier(overrides?: CallOverrides): Promise<[string]>;
|
||||
|
||||
hashLeftRight(
|
||||
_left: BytesLike,
|
||||
_right: BytesLike,
|
||||
overrides?: CallOverrides
|
||||
): Promise<[string]>;
|
||||
|
||||
FIELD_SIZE(overrides?: CallOverrides): Promise<[BigNumber]>;
|
||||
|
||||
levels(overrides?: CallOverrides): Promise<[number]>;
|
||||
|
||||
operator(overrides?: CallOverrides): Promise<[string]>;
|
||||
|
||||
isKnownRoot(
|
||||
_root: BytesLike,
|
||||
overrides?: CallOverrides
|
||||
): Promise<[boolean]>;
|
||||
|
||||
commitments(arg0: BytesLike, overrides?: CallOverrides): Promise<[boolean]>;
|
||||
|
||||
denomination(overrides?: CallOverrides): Promise<[BigNumber]>;
|
||||
|
||||
currentRootIndex(overrides?: CallOverrides): Promise<[number]>;
|
||||
|
||||
updateVerifier(
|
||||
_newVerifier: string,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
deposit(
|
||||
_commitment: BytesLike,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
getLastRoot(overrides?: CallOverrides): Promise<[string]>;
|
||||
|
||||
roots(arg0: BigNumberish, overrides?: CallOverrides): Promise<[string]>;
|
||||
|
||||
ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise<[number]>;
|
||||
|
||||
isSpent(
|
||||
_nullifierHash: BytesLike,
|
||||
overrides?: CallOverrides
|
||||
): Promise<[boolean]>;
|
||||
|
||||
zeros(arg0: BigNumberish, overrides?: CallOverrides): Promise<[string]>;
|
||||
|
||||
ZERO_VALUE(overrides?: CallOverrides): Promise<[BigNumber]>;
|
||||
|
||||
filledSubtrees(
|
||||
arg0: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<[string]>;
|
||||
|
||||
nextIndex(overrides?: CallOverrides): Promise<[number]>;
|
||||
};
|
||||
|
||||
changeOperator(
|
||||
_newOperator: string,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
nullifierHashes(arg0: BytesLike, overrides?: CallOverrides): Promise<boolean>;
|
||||
|
||||
withdraw(
|
||||
_proof: BytesLike,
|
||||
_root: BytesLike,
|
||||
_nullifierHash: BytesLike,
|
||||
_recipient: string,
|
||||
_relayer: string,
|
||||
_fee: BigNumberish,
|
||||
_refund: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
verifier(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
hashLeftRight(
|
||||
_left: BytesLike,
|
||||
_right: BytesLike,
|
||||
overrides?: CallOverrides
|
||||
): Promise<string>;
|
||||
|
||||
FIELD_SIZE(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
levels(overrides?: CallOverrides): Promise<number>;
|
||||
|
||||
operator(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
isKnownRoot(_root: BytesLike, overrides?: CallOverrides): Promise<boolean>;
|
||||
|
||||
commitments(arg0: BytesLike, overrides?: CallOverrides): Promise<boolean>;
|
||||
|
||||
denomination(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
currentRootIndex(overrides?: CallOverrides): Promise<number>;
|
||||
|
||||
updateVerifier(
|
||||
_newVerifier: string,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
deposit(
|
||||
_commitment: BytesLike,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
getLastRoot(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
roots(arg0: BigNumberish, overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise<number>;
|
||||
|
||||
isSpent(
|
||||
_nullifierHash: BytesLike,
|
||||
overrides?: CallOverrides
|
||||
): Promise<boolean>;
|
||||
|
||||
zeros(arg0: BigNumberish, overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
ZERO_VALUE(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
filledSubtrees(
|
||||
arg0: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<string>;
|
||||
|
||||
nextIndex(overrides?: CallOverrides): Promise<number>;
|
||||
|
||||
callStatic: {
|
||||
changeOperator(
|
||||
_newOperator: string,
|
||||
overrides?: CallOverrides
|
||||
): Promise<void>;
|
||||
|
||||
nullifierHashes(
|
||||
arg0: BytesLike,
|
||||
overrides?: CallOverrides
|
||||
): Promise<boolean>;
|
||||
|
||||
withdraw(
|
||||
_proof: BytesLike,
|
||||
_root: BytesLike,
|
||||
_nullifierHash: BytesLike,
|
||||
_recipient: string,
|
||||
_relayer: string,
|
||||
_fee: BigNumberish,
|
||||
_refund: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<void>;
|
||||
|
||||
verifier(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
hashLeftRight(
|
||||
_left: BytesLike,
|
||||
_right: BytesLike,
|
||||
overrides?: CallOverrides
|
||||
): Promise<string>;
|
||||
|
||||
FIELD_SIZE(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
levels(overrides?: CallOverrides): Promise<number>;
|
||||
|
||||
operator(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
isKnownRoot(_root: BytesLike, overrides?: CallOverrides): Promise<boolean>;
|
||||
|
||||
commitments(arg0: BytesLike, overrides?: CallOverrides): Promise<boolean>;
|
||||
|
||||
denomination(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
currentRootIndex(overrides?: CallOverrides): Promise<number>;
|
||||
|
||||
updateVerifier(
|
||||
_newVerifier: string,
|
||||
overrides?: CallOverrides
|
||||
): Promise<void>;
|
||||
|
||||
deposit(_commitment: BytesLike, overrides?: CallOverrides): Promise<void>;
|
||||
|
||||
getLastRoot(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
roots(arg0: BigNumberish, overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise<number>;
|
||||
|
||||
isSpent(
|
||||
_nullifierHash: BytesLike,
|
||||
overrides?: CallOverrides
|
||||
): Promise<boolean>;
|
||||
|
||||
zeros(arg0: BigNumberish, overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
ZERO_VALUE(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
filledSubtrees(
|
||||
arg0: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<string>;
|
||||
|
||||
nextIndex(overrides?: CallOverrides): Promise<number>;
|
||||
};
|
||||
|
||||
filters: {
|
||||
"Deposit(bytes32,uint32,uint256)"(
|
||||
commitment?: BytesLike | null,
|
||||
leafIndex?: null,
|
||||
timestamp?: null
|
||||
): DepositEventFilter;
|
||||
Deposit(
|
||||
commitment?: BytesLike | null,
|
||||
leafIndex?: null,
|
||||
timestamp?: null
|
||||
): DepositEventFilter;
|
||||
|
||||
"Withdrawal(address,bytes32,address,uint256)"(
|
||||
to?: null,
|
||||
nullifierHash?: null,
|
||||
relayer?: string | null,
|
||||
fee?: null
|
||||
): WithdrawalEventFilter;
|
||||
Withdrawal(
|
||||
to?: null,
|
||||
nullifierHash?: null,
|
||||
relayer?: string | null,
|
||||
fee?: null
|
||||
): WithdrawalEventFilter;
|
||||
};
|
||||
|
||||
estimateGas: {
|
||||
changeOperator(
|
||||
_newOperator: string,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<BigNumber>;
|
||||
|
||||
nullifierHashes(
|
||||
arg0: BytesLike,
|
||||
overrides?: CallOverrides
|
||||
): Promise<BigNumber>;
|
||||
|
||||
withdraw(
|
||||
_proof: BytesLike,
|
||||
_root: BytesLike,
|
||||
_nullifierHash: BytesLike,
|
||||
_recipient: string,
|
||||
_relayer: string,
|
||||
_fee: BigNumberish,
|
||||
_refund: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
): Promise<BigNumber>;
|
||||
|
||||
verifier(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
hashLeftRight(
|
||||
_left: BytesLike,
|
||||
_right: BytesLike,
|
||||
overrides?: CallOverrides
|
||||
): Promise<BigNumber>;
|
||||
|
||||
FIELD_SIZE(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
levels(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
operator(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
isKnownRoot(
|
||||
_root: BytesLike,
|
||||
overrides?: CallOverrides
|
||||
): Promise<BigNumber>;
|
||||
|
||||
commitments(arg0: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
denomination(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
currentRootIndex(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
updateVerifier(
|
||||
_newVerifier: string,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<BigNumber>;
|
||||
|
||||
deposit(
|
||||
_commitment: BytesLike,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
): Promise<BigNumber>;
|
||||
|
||||
getLastRoot(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
roots(arg0: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
isSpent(
|
||||
_nullifierHash: BytesLike,
|
||||
overrides?: CallOverrides
|
||||
): Promise<BigNumber>;
|
||||
|
||||
zeros(arg0: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
ZERO_VALUE(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
filledSubtrees(
|
||||
arg0: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<BigNumber>;
|
||||
|
||||
nextIndex(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
populateTransaction: {
|
||||
changeOperator(
|
||||
_newOperator: string,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
nullifierHashes(
|
||||
arg0: BytesLike,
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
withdraw(
|
||||
_proof: BytesLike,
|
||||
_root: BytesLike,
|
||||
_nullifierHash: BytesLike,
|
||||
_recipient: string,
|
||||
_relayer: string,
|
||||
_fee: BigNumberish,
|
||||
_refund: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
verifier(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
hashLeftRight(
|
||||
_left: BytesLike,
|
||||
_right: BytesLike,
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
FIELD_SIZE(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
levels(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
operator(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
isKnownRoot(
|
||||
_root: BytesLike,
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
commitments(
|
||||
arg0: BytesLike,
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
denomination(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
currentRootIndex(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
updateVerifier(
|
||||
_newVerifier: string,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
deposit(
|
||||
_commitment: BytesLike,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
getLastRoot(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
roots(
|
||||
arg0: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
isSpent(
|
||||
_nullifierHash: BytesLike,
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
zeros(
|
||||
arg0: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
ZERO_VALUE(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
filledSubtrees(
|
||||
arg0: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
nextIndex(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
};
|
||||
}
|
@ -1,355 +0,0 @@
|
||||
/* Autogenerated file. Do not edit manually. */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import { Contract, Signer, utils } from "ethers";
|
||||
import type { Provider } from "@ethersproject/providers";
|
||||
import type { AggregatorAbi, AggregatorAbiInterface } from "../AggregatorAbi";
|
||||
|
||||
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 AggregatorAbi__factory {
|
||||
static readonly abi = _abi;
|
||||
static createInterface(): AggregatorAbiInterface {
|
||||
return new utils.Interface(_abi) as AggregatorAbiInterface;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): AggregatorAbi {
|
||||
return new Contract(address, _abi, signerOrProvider) as AggregatorAbi;
|
||||
}
|
||||
}
|
@ -1,277 +0,0 @@
|
||||
/* Autogenerated file. Do not edit manually. */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import { Contract, Signer, utils } from "ethers";
|
||||
import type { Provider } from "@ethersproject/providers";
|
||||
import type { ERC20Abi, ERC20AbiInterface } from "../ERC20Abi";
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
constant: true,
|
||||
inputs: [],
|
||||
name: "totalSupply",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "uint256",
|
||||
name: "",
|
||||
type: "uint256",
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: "view",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [],
|
||||
name: "_totalSupply",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "uint256",
|
||||
name: "",
|
||||
type: "uint256",
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: "view",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [
|
||||
{
|
||||
internalType: "address",
|
||||
name: "who",
|
||||
type: "address",
|
||||
},
|
||||
],
|
||||
name: "balanceOf",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "uint256",
|
||||
name: "",
|
||||
type: "uint256",
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: "view",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
constant: false,
|
||||
inputs: [
|
||||
{
|
||||
internalType: "address",
|
||||
name: "to",
|
||||
type: "address",
|
||||
},
|
||||
{
|
||||
internalType: "uint256",
|
||||
name: "value",
|
||||
type: "uint256",
|
||||
},
|
||||
],
|
||||
name: "transfer",
|
||||
outputs: [],
|
||||
payable: false,
|
||||
stateMutability: "nonpayable",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "address",
|
||||
name: "owner",
|
||||
type: "address",
|
||||
},
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "address",
|
||||
name: "spender",
|
||||
type: "address",
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "uint256",
|
||||
name: "value",
|
||||
type: "uint256",
|
||||
},
|
||||
],
|
||||
name: "Approval",
|
||||
type: "event",
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "address",
|
||||
name: "from",
|
||||
type: "address",
|
||||
},
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "address",
|
||||
name: "to",
|
||||
type: "address",
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "uint256",
|
||||
name: "value",
|
||||
type: "uint256",
|
||||
},
|
||||
],
|
||||
name: "Transfer",
|
||||
type: "event",
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [
|
||||
{
|
||||
internalType: "address",
|
||||
name: "owner",
|
||||
type: "address",
|
||||
},
|
||||
{
|
||||
internalType: "address",
|
||||
name: "spender",
|
||||
type: "address",
|
||||
},
|
||||
],
|
||||
name: "allowance",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "uint256",
|
||||
name: "",
|
||||
type: "uint256",
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: "view",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
constant: false,
|
||||
inputs: [
|
||||
{
|
||||
internalType: "address",
|
||||
name: "from",
|
||||
type: "address",
|
||||
},
|
||||
{
|
||||
internalType: "address",
|
||||
name: "to",
|
||||
type: "address",
|
||||
},
|
||||
{
|
||||
internalType: "uint256",
|
||||
name: "value",
|
||||
type: "uint256",
|
||||
},
|
||||
],
|
||||
name: "transferFrom",
|
||||
outputs: [],
|
||||
payable: false,
|
||||
stateMutability: "nonpayable",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
constant: false,
|
||||
inputs: [
|
||||
{
|
||||
internalType: "address",
|
||||
name: "spender",
|
||||
type: "address",
|
||||
},
|
||||
{
|
||||
internalType: "uint256",
|
||||
name: "value",
|
||||
type: "uint256",
|
||||
},
|
||||
],
|
||||
name: "approve",
|
||||
outputs: [],
|
||||
payable: false,
|
||||
stateMutability: "nonpayable",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "address",
|
||||
name: "owner",
|
||||
type: "address",
|
||||
},
|
||||
],
|
||||
name: "nonces",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "uint256",
|
||||
name: "",
|
||||
type: "uint256",
|
||||
},
|
||||
],
|
||||
stateMutability: "view",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "address",
|
||||
name: "owner",
|
||||
type: "address",
|
||||
},
|
||||
{
|
||||
internalType: "address",
|
||||
name: "spender",
|
||||
type: "address",
|
||||
},
|
||||
{
|
||||
internalType: "uint256",
|
||||
name: "amount",
|
||||
type: "uint256",
|
||||
},
|
||||
{
|
||||
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: "permit",
|
||||
outputs: [],
|
||||
stateMutability: "nonpayable",
|
||||
type: "function",
|
||||
},
|
||||
];
|
||||
|
||||
export class ERC20Abi__factory {
|
||||
static readonly abi = _abi;
|
||||
static createInterface(): ERC20AbiInterface {
|
||||
return new utils.Interface(_abi) as ERC20AbiInterface;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): ERC20Abi {
|
||||
return new Contract(address, _abi, signerOrProvider) as ERC20Abi;
|
||||
}
|
||||
}
|
@ -1,59 +0,0 @@
|
||||
/* Autogenerated file. Do not edit manually. */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import { Contract, Signer, utils } from "ethers";
|
||||
import type { Provider } from "@ethersproject/providers";
|
||||
import type { MulticallAbi, MulticallAbiInterface } from "../MulticallAbi";
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
components: [
|
||||
{
|
||||
internalType: "address",
|
||||
name: "to",
|
||||
type: "address",
|
||||
},
|
||||
{
|
||||
internalType: "bytes",
|
||||
name: "data",
|
||||
type: "bytes",
|
||||
},
|
||||
],
|
||||
internalType: "struct MultiCall.Call[]",
|
||||
name: "calls",
|
||||
type: "tuple[]",
|
||||
},
|
||||
],
|
||||
name: "multicall",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "bytes[]",
|
||||
name: "results",
|
||||
type: "bytes[]",
|
||||
},
|
||||
{
|
||||
internalType: "bool[]",
|
||||
name: "success",
|
||||
type: "bool[]",
|
||||
},
|
||||
],
|
||||
stateMutability: "view",
|
||||
type: "function",
|
||||
},
|
||||
];
|
||||
|
||||
export class MulticallAbi__factory {
|
||||
static readonly abi = _abi;
|
||||
static createInterface(): MulticallAbiInterface {
|
||||
return new utils.Interface(_abi) as MulticallAbiInterface;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): MulticallAbi {
|
||||
return new Contract(address, _abi, signerOrProvider) as MulticallAbi;
|
||||
}
|
||||
}
|
@ -1,358 +0,0 @@
|
||||
/* Autogenerated file. Do not edit manually. */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import { Contract, Signer, utils } from "ethers";
|
||||
import type { Provider } from "@ethersproject/providers";
|
||||
import type {
|
||||
OffchainOracleAbi,
|
||||
OffchainOracleAbiInterface,
|
||||
} from "../OffchainOracleAbi";
|
||||
|
||||
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 OffchainOracleAbi__factory {
|
||||
static readonly abi = _abi;
|
||||
static createInterface(): OffchainOracleAbiInterface {
|
||||
return new utils.Interface(_abi) as OffchainOracleAbiInterface;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): OffchainOracleAbi {
|
||||
return new Contract(address, _abi, signerOrProvider) as OffchainOracleAbi;
|
||||
}
|
||||
}
|
@ -1,126 +0,0 @@
|
||||
/* Autogenerated file. Do not edit manually. */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import { Contract, Signer, utils } from "ethers";
|
||||
import type { Provider } from "@ethersproject/providers";
|
||||
import type { ProxyLightABI, ProxyLightABIInterface } from "../ProxyLightABI";
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "address",
|
||||
name: "sender",
|
||||
type: "address",
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "bytes",
|
||||
name: "encryptedNote",
|
||||
type: "bytes",
|
||||
},
|
||||
],
|
||||
name: "EncryptedNote",
|
||||
type: "event",
|
||||
},
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "bytes[]",
|
||||
name: "_encryptedNotes",
|
||||
type: "bytes[]",
|
||||
},
|
||||
],
|
||||
name: "backupNotes",
|
||||
outputs: [],
|
||||
stateMutability: "nonpayable",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "contract ITornadoInstance",
|
||||
name: "_tornado",
|
||||
type: "address",
|
||||
},
|
||||
{
|
||||
internalType: "bytes32",
|
||||
name: "_commitment",
|
||||
type: "bytes32",
|
||||
},
|
||||
{
|
||||
internalType: "bytes",
|
||||
name: "_encryptedNote",
|
||||
type: "bytes",
|
||||
},
|
||||
],
|
||||
name: "deposit",
|
||||
outputs: [],
|
||||
stateMutability: "payable",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "contract ITornadoInstance",
|
||||
name: "_tornado",
|
||||
type: "address",
|
||||
},
|
||||
{
|
||||
internalType: "bytes",
|
||||
name: "_proof",
|
||||
type: "bytes",
|
||||
},
|
||||
{
|
||||
internalType: "bytes32",
|
||||
name: "_root",
|
||||
type: "bytes32",
|
||||
},
|
||||
{
|
||||
internalType: "bytes32",
|
||||
name: "_nullifierHash",
|
||||
type: "bytes32",
|
||||
},
|
||||
{
|
||||
internalType: "address payable",
|
||||
name: "_recipient",
|
||||
type: "address",
|
||||
},
|
||||
{
|
||||
internalType: "address payable",
|
||||
name: "_relayer",
|
||||
type: "address",
|
||||
},
|
||||
{
|
||||
internalType: "uint256",
|
||||
name: "_fee",
|
||||
type: "uint256",
|
||||
},
|
||||
{
|
||||
internalType: "uint256",
|
||||
name: "_refund",
|
||||
type: "uint256",
|
||||
},
|
||||
],
|
||||
name: "withdraw",
|
||||
outputs: [],
|
||||
stateMutability: "payable",
|
||||
type: "function",
|
||||
},
|
||||
];
|
||||
|
||||
export class ProxyLightABI__factory {
|
||||
static readonly abi = _abi;
|
||||
static createInterface(): ProxyLightABIInterface {
|
||||
return new utils.Interface(_abi) as ProxyLightABIInterface;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): ProxyLightABI {
|
||||
return new Contract(address, _abi, signerOrProvider) as ProxyLightABI;
|
||||
}
|
||||
}
|
@ -1,519 +0,0 @@
|
||||
/* Autogenerated file. Do not edit manually. */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import { Contract, Signer, utils } from "ethers";
|
||||
import type { Provider } from "@ethersproject/providers";
|
||||
import type { TornadoABI, TornadoABIInterface } from "../TornadoABI";
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
constant: false,
|
||||
inputs: [
|
||||
{
|
||||
internalType: "address",
|
||||
name: "_newOperator",
|
||||
type: "address",
|
||||
},
|
||||
],
|
||||
name: "changeOperator",
|
||||
outputs: [],
|
||||
payable: false,
|
||||
stateMutability: "nonpayable",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [
|
||||
{
|
||||
internalType: "bytes32",
|
||||
name: "",
|
||||
type: "bytes32",
|
||||
},
|
||||
],
|
||||
name: "nullifierHashes",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "bool",
|
||||
name: "",
|
||||
type: "bool",
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: "view",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
constant: false,
|
||||
inputs: [
|
||||
{
|
||||
internalType: "bytes",
|
||||
name: "_proof",
|
||||
type: "bytes",
|
||||
},
|
||||
{
|
||||
internalType: "bytes32",
|
||||
name: "_root",
|
||||
type: "bytes32",
|
||||
},
|
||||
{
|
||||
internalType: "bytes32",
|
||||
name: "_nullifierHash",
|
||||
type: "bytes32",
|
||||
},
|
||||
{
|
||||
internalType: "address payable",
|
||||
name: "_recipient",
|
||||
type: "address",
|
||||
},
|
||||
{
|
||||
internalType: "address payable",
|
||||
name: "_relayer",
|
||||
type: "address",
|
||||
},
|
||||
{
|
||||
internalType: "uint256",
|
||||
name: "_fee",
|
||||
type: "uint256",
|
||||
},
|
||||
{
|
||||
internalType: "uint256",
|
||||
name: "_refund",
|
||||
type: "uint256",
|
||||
},
|
||||
],
|
||||
name: "withdraw",
|
||||
outputs: [],
|
||||
payable: true,
|
||||
stateMutability: "payable",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [],
|
||||
name: "verifier",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "contract IVerifier",
|
||||
name: "",
|
||||
type: "address",
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: "view",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [
|
||||
{
|
||||
internalType: "bytes32",
|
||||
name: "_left",
|
||||
type: "bytes32",
|
||||
},
|
||||
{
|
||||
internalType: "bytes32",
|
||||
name: "_right",
|
||||
type: "bytes32",
|
||||
},
|
||||
],
|
||||
name: "hashLeftRight",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "bytes32",
|
||||
name: "",
|
||||
type: "bytes32",
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: "pure",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [],
|
||||
name: "FIELD_SIZE",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "uint256",
|
||||
name: "",
|
||||
type: "uint256",
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: "view",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [],
|
||||
name: "levels",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "uint32",
|
||||
name: "",
|
||||
type: "uint32",
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: "view",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [],
|
||||
name: "operator",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "address",
|
||||
name: "",
|
||||
type: "address",
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: "view",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [
|
||||
{
|
||||
internalType: "bytes32",
|
||||
name: "_root",
|
||||
type: "bytes32",
|
||||
},
|
||||
],
|
||||
name: "isKnownRoot",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "bool",
|
||||
name: "",
|
||||
type: "bool",
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: "view",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [
|
||||
{
|
||||
internalType: "bytes32",
|
||||
name: "",
|
||||
type: "bytes32",
|
||||
},
|
||||
],
|
||||
name: "commitments",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "bool",
|
||||
name: "",
|
||||
type: "bool",
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: "view",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [],
|
||||
name: "denomination",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "uint256",
|
||||
name: "",
|
||||
type: "uint256",
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: "view",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [],
|
||||
name: "currentRootIndex",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "uint32",
|
||||
name: "",
|
||||
type: "uint32",
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: "view",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
constant: false,
|
||||
inputs: [
|
||||
{
|
||||
internalType: "address",
|
||||
name: "_newVerifier",
|
||||
type: "address",
|
||||
},
|
||||
],
|
||||
name: "updateVerifier",
|
||||
outputs: [],
|
||||
payable: false,
|
||||
stateMutability: "nonpayable",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
constant: false,
|
||||
inputs: [
|
||||
{
|
||||
internalType: "bytes32",
|
||||
name: "_commitment",
|
||||
type: "bytes32",
|
||||
},
|
||||
],
|
||||
name: "deposit",
|
||||
outputs: [],
|
||||
payable: true,
|
||||
stateMutability: "payable",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [],
|
||||
name: "getLastRoot",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "bytes32",
|
||||
name: "",
|
||||
type: "bytes32",
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: "view",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [
|
||||
{
|
||||
internalType: "uint256",
|
||||
name: "",
|
||||
type: "uint256",
|
||||
},
|
||||
],
|
||||
name: "roots",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "bytes32",
|
||||
name: "",
|
||||
type: "bytes32",
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: "view",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [],
|
||||
name: "ROOT_HISTORY_SIZE",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "uint32",
|
||||
name: "",
|
||||
type: "uint32",
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: "view",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [
|
||||
{
|
||||
internalType: "bytes32",
|
||||
name: "_nullifierHash",
|
||||
type: "bytes32",
|
||||
},
|
||||
],
|
||||
name: "isSpent",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "bool",
|
||||
name: "",
|
||||
type: "bool",
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: "view",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [
|
||||
{
|
||||
internalType: "uint256",
|
||||
name: "",
|
||||
type: "uint256",
|
||||
},
|
||||
],
|
||||
name: "zeros",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "bytes32",
|
||||
name: "",
|
||||
type: "bytes32",
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: "view",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [],
|
||||
name: "ZERO_VALUE",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "uint256",
|
||||
name: "",
|
||||
type: "uint256",
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: "view",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [
|
||||
{
|
||||
internalType: "uint256",
|
||||
name: "",
|
||||
type: "uint256",
|
||||
},
|
||||
],
|
||||
name: "filledSubtrees",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "bytes32",
|
||||
name: "",
|
||||
type: "bytes32",
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: "view",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [],
|
||||
name: "nextIndex",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "uint32",
|
||||
name: "",
|
||||
type: "uint32",
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: "view",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "contract IVerifier",
|
||||
name: "_verifier",
|
||||
type: "address",
|
||||
},
|
||||
{
|
||||
internalType: "uint256",
|
||||
name: "_denomination",
|
||||
type: "uint256",
|
||||
},
|
||||
{
|
||||
internalType: "uint32",
|
||||
name: "_merkleTreeHeight",
|
||||
type: "uint32",
|
||||
},
|
||||
{
|
||||
internalType: "address",
|
||||
name: "_operator",
|
||||
type: "address",
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: "nonpayable",
|
||||
type: "constructor",
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "bytes32",
|
||||
name: "commitment",
|
||||
type: "bytes32",
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "uint32",
|
||||
name: "leafIndex",
|
||||
type: "uint32",
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "uint256",
|
||||
name: "timestamp",
|
||||
type: "uint256",
|
||||
},
|
||||
],
|
||||
name: "Deposit",
|
||||
type: "event",
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "address",
|
||||
name: "to",
|
||||
type: "address",
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "bytes32",
|
||||
name: "nullifierHash",
|
||||
type: "bytes32",
|
||||
},
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "address",
|
||||
name: "relayer",
|
||||
type: "address",
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "uint256",
|
||||
name: "fee",
|
||||
type: "uint256",
|
||||
},
|
||||
],
|
||||
name: "Withdrawal",
|
||||
type: "event",
|
||||
},
|
||||
];
|
||||
|
||||
export class TornadoABI__factory {
|
||||
static readonly abi = _abi;
|
||||
static createInterface(): TornadoABIInterface {
|
||||
return new utils.Interface(_abi) as TornadoABIInterface;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): TornadoABI {
|
||||
return new Contract(address, _abi, signerOrProvider) as TornadoABI;
|
||||
}
|
||||
}
|
@ -1,195 +0,0 @@
|
||||
/* Autogenerated file. Do not edit manually. */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import { Contract, Signer, utils } from "ethers";
|
||||
import type { Provider } from "@ethersproject/providers";
|
||||
import type {
|
||||
TornadoProxyABI,
|
||||
TornadoProxyABIInterface,
|
||||
} from "../TornadoProxyABI";
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "bytes32",
|
||||
name: "_tornadoTrees",
|
||||
type: "bytes32",
|
||||
},
|
||||
{
|
||||
internalType: "bytes32",
|
||||
name: "_governance",
|
||||
type: "bytes32",
|
||||
},
|
||||
{
|
||||
internalType: "contract ITornado[]",
|
||||
name: "_instances",
|
||||
type: "address[]",
|
||||
},
|
||||
],
|
||||
stateMutability: "nonpayable",
|
||||
type: "constructor",
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: "governance",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "address",
|
||||
name: "",
|
||||
type: "address",
|
||||
},
|
||||
],
|
||||
stateMutability: "view",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "contract ITornado",
|
||||
name: "",
|
||||
type: "address",
|
||||
},
|
||||
],
|
||||
name: "instances",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "bool",
|
||||
name: "",
|
||||
type: "bool",
|
||||
},
|
||||
],
|
||||
stateMutability: "view",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "bytes32",
|
||||
name: "node",
|
||||
type: "bytes32",
|
||||
},
|
||||
],
|
||||
name: "resolve",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "address",
|
||||
name: "",
|
||||
type: "address",
|
||||
},
|
||||
],
|
||||
stateMutability: "view",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: "tornadoTrees",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "contract ITornadoTrees",
|
||||
name: "",
|
||||
type: "address",
|
||||
},
|
||||
],
|
||||
stateMutability: "view",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "contract ITornado",
|
||||
name: "tornado",
|
||||
type: "address",
|
||||
},
|
||||
{
|
||||
internalType: "bytes32",
|
||||
name: "commitment",
|
||||
type: "bytes32",
|
||||
},
|
||||
],
|
||||
name: "deposit",
|
||||
outputs: [],
|
||||
stateMutability: "payable",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "contract ITornado",
|
||||
name: "instance",
|
||||
type: "address",
|
||||
},
|
||||
{
|
||||
internalType: "bool",
|
||||
name: "update",
|
||||
type: "bool",
|
||||
},
|
||||
],
|
||||
name: "updateInstances",
|
||||
outputs: [],
|
||||
stateMutability: "nonpayable",
|
||||
type: "function",
|
||||
},
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "contract ITornado",
|
||||
name: "tornado",
|
||||
type: "address",
|
||||
},
|
||||
{
|
||||
internalType: "bytes",
|
||||
name: "proof",
|
||||
type: "bytes",
|
||||
},
|
||||
{
|
||||
internalType: "bytes32",
|
||||
name: "root",
|
||||
type: "bytes32",
|
||||
},
|
||||
{
|
||||
internalType: "bytes32",
|
||||
name: "nullifierHash",
|
||||
type: "bytes32",
|
||||
},
|
||||
{
|
||||
internalType: "address payable",
|
||||
name: "recipient",
|
||||
type: "address",
|
||||
},
|
||||
{
|
||||
internalType: "address payable",
|
||||
name: "relayer",
|
||||
type: "address",
|
||||
},
|
||||
{
|
||||
internalType: "uint256",
|
||||
name: "fee",
|
||||
type: "uint256",
|
||||
},
|
||||
{
|
||||
internalType: "uint256",
|
||||
name: "refund",
|
||||
type: "uint256",
|
||||
},
|
||||
],
|
||||
name: "withdraw",
|
||||
outputs: [],
|
||||
stateMutability: "payable",
|
||||
type: "function",
|
||||
},
|
||||
];
|
||||
|
||||
export class TornadoProxyABI__factory {
|
||||
static readonly abi = _abi;
|
||||
static createInterface(): TornadoProxyABIInterface {
|
||||
return new utils.Interface(_abi) as TornadoProxyABIInterface;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): TornadoProxyABI {
|
||||
return new Contract(address, _abi, signerOrProvider) as TornadoProxyABI;
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
/* Autogenerated file. Do not edit manually. */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export { AggregatorAbi__factory } from "./AggregatorAbi__factory";
|
||||
export { ERC20Abi__factory } from "./ERC20Abi__factory";
|
||||
export { MulticallAbi__factory } from "./MulticallAbi__factory";
|
||||
export { OffchainOracleAbi__factory } from "./OffchainOracleAbi__factory";
|
||||
export { ProxyLightABI__factory } from "./ProxyLightABI__factory";
|
||||
export { TornadoABI__factory } from "./TornadoABI__factory";
|
||||
export { TornadoProxyABI__factory } from "./TornadoProxyABI__factory";
|
@ -1,18 +0,0 @@
|
||||
/* Autogenerated file. Do not edit manually. */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type { AggregatorAbi } from "./AggregatorAbi";
|
||||
export type { ERC20Abi } from "./ERC20Abi";
|
||||
export type { MulticallAbi } from "./MulticallAbi";
|
||||
export type { OffchainOracleAbi } from "./OffchainOracleAbi";
|
||||
export type { ProxyLightABI } from "./ProxyLightABI";
|
||||
export type { TornadoABI } from "./TornadoABI";
|
||||
export type { TornadoProxyABI } from "./TornadoProxyABI";
|
||||
export * as factories from "./factories";
|
||||
export { AggregatorAbi__factory } from "./factories/AggregatorAbi__factory";
|
||||
export { ERC20Abi__factory } from "./factories/ERC20Abi__factory";
|
||||
export { MulticallAbi__factory } from "./factories/MulticallAbi__factory";
|
||||
export { OffchainOracleAbi__factory } from "./factories/OffchainOracleAbi__factory";
|
||||
export { ProxyLightABI__factory } from "./factories/ProxyLightABI__factory";
|
||||
export { TornadoABI__factory } from "./factories/TornadoABI__factory";
|
||||
export { TornadoProxyABI__factory } from "./factories/TornadoProxyABI__factory";
|
@ -1,45 +1,38 @@
|
||||
version: '2'
|
||||
version: '3'
|
||||
|
||||
# ssh-agent && ssh-add -K ~/.ssh/id_rsa
|
||||
# DOCKER_BUILDKIT=1 docker build --ssh default -t tornadocash/relayer .
|
||||
services:
|
||||
server:
|
||||
image: tornadocash/relayer
|
||||
image: tornadocash/relayer:v5.0.0
|
||||
restart: always
|
||||
command: server
|
||||
command: 'server'
|
||||
env_file: .env
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- 8000:8000
|
||||
environment:
|
||||
REDIS_URL: redis://redis/0
|
||||
nginx_proxy_read_timeout: 600
|
||||
depends_on: [ redis ]
|
||||
depends_on: [redis]
|
||||
|
||||
worker1:
|
||||
image: tornadocash/relayer
|
||||
txWorker:
|
||||
image: tornadocash/relayer:v5.0.0
|
||||
restart: always
|
||||
command: worker
|
||||
command: 'txWorker'
|
||||
env_file: .env
|
||||
environment:
|
||||
REDIS_URL: redis://redis/0
|
||||
depends_on: [ redis ]
|
||||
depends_on: [redis]
|
||||
|
||||
# worker2:
|
||||
# image: tornadocash/relayer
|
||||
# restart: always
|
||||
# command: worker
|
||||
# env_file: .env
|
||||
# environment:
|
||||
# PRIVATE_KEY: qwe
|
||||
# REDIS_URL: redis://redis/0
|
||||
healthWorker:
|
||||
image: tornadocash/relayer:v5.0.0
|
||||
restart: always
|
||||
command: 'healthWorker'
|
||||
env_file: .env
|
||||
depends_on: [redis]
|
||||
|
||||
redis:
|
||||
image: redis
|
||||
restart: always
|
||||
command: [ redis-server, --appendonly, 'yes' ]
|
||||
environment:
|
||||
- REDIS_APPENDONLY=yes
|
||||
- REDIS_APPENDFSYNC=always
|
||||
volumes:
|
||||
- redis:/data
|
||||
|
||||
|
20
package.json
20
package.json
@ -3,14 +3,16 @@
|
||||
"version": "5.0.0",
|
||||
"description": "Relayer for Tornado.cash privacy solution. https://tornado.cash",
|
||||
"scripts": {
|
||||
"dev:app": "nodemon --watch './src/**/*.ts' --exec ts-node src/app/index.ts",
|
||||
"server": "node app/index.js",
|
||||
"txWorker": "node txWorker.js",
|
||||
"healthWorker": "node healthWorker.js",
|
||||
"dev:server": "nodemon --watch './src/**/*.ts' --exec ts-node src/app/index.ts",
|
||||
"dev:worker": "nodemon --watch './src/**/*.ts' --exec ts-node src/worker.ts",
|
||||
"build": "tsc",
|
||||
"eslint": "eslint --ext .js --ignore-path .gitignore .",
|
||||
"eslint": "eslint --ext .ts --ignore-path .gitignore .",
|
||||
"prettier:check": "npx prettier --check . --config .prettierrc",
|
||||
"prettier:fix": "npx prettier --write . --config .prettierrc",
|
||||
"lint": "yarn eslint && yarn prettier:check",
|
||||
"test": "mocha"
|
||||
"lint": "yarn eslint && yarn prettier:check"
|
||||
},
|
||||
"author": "tornado.cash",
|
||||
"license": "MIT",
|
||||
@ -20,18 +22,17 @@
|
||||
"@fastify/sensible": "^4.1.0",
|
||||
"bullmq": "^1.80.6",
|
||||
"dotenv": "^8.2.0",
|
||||
"eth-ens-namehash": "^2.0.8",
|
||||
"ethers": "^5.6.4",
|
||||
"fastify": "^3.28.0",
|
||||
"gas-price-oracle": "^0.4.6",
|
||||
"gas-price-oracle": "git+https://github.com/peppersec/gas-price-oracle.git#da3de92dea7c75afc2c8ba141f23c4eea597a614",
|
||||
"ioredis": "^5.0.6",
|
||||
"json-schema-to-ts": "^2.2.0",
|
||||
"node-fetch": "^2.6.7",
|
||||
"reflect-metadata": "^0.1.13",
|
||||
"telegraf": "^4.8.2",
|
||||
"torn-token": "link:../torn-token",
|
||||
"torn-token": "^1.0.8",
|
||||
"tsyringe": "^4.6.0",
|
||||
"tx-manager": "link:../tx-manager",
|
||||
"tx-manager": "git+https://github.com/tornadocash/tx-manager.git#b4235ec8f7d4937a088ae862ca82f3866cd2aaee",
|
||||
"uuid": "^8.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -43,8 +44,7 @@
|
||||
"@typescript-eslint/parser": "^5.20.0",
|
||||
"chai": "^4.2.0",
|
||||
"eslint": "^8.14.0",
|
||||
"eslint-config-prettier": "^6.12.0",
|
||||
"eslint-plugin-prettier": "^3.1.4",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"mocha": "^8.1.3",
|
||||
"nodemon": "^2.0.15",
|
||||
"ts-node": "^10.7.0",
|
||||
|
@ -1,11 +1,9 @@
|
||||
import 'reflect-metadata';
|
||||
import createServer from './server';
|
||||
import { utils } from 'ethers';
|
||||
import { port, rewardAccount } from '../config';
|
||||
import { version } from '../../package.json';
|
||||
import { port, relayerVersion, rewardAccount } from '../config';
|
||||
import { configService, getJobService, getNotifierService } from '../services';
|
||||
|
||||
|
||||
if (!utils.isAddress(rewardAccount)) {
|
||||
throw new Error('No REWARD_ACCOUNT specified');
|
||||
}
|
||||
@ -17,12 +15,10 @@ server.listen(port, '0.0.0.0', async (err, address) => {
|
||||
await getJobService().setupRepeatableJobs();
|
||||
await getNotifierService().subscribe();
|
||||
|
||||
console.log(`Relayer ${version} started on port ${address}`);
|
||||
console.log(`Relayer ${relayerVersion} started on port ${address}`);
|
||||
});
|
||||
|
||||
process
|
||||
.on('uncaughtException', (e) => {
|
||||
console.log('uncaughtException', e);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
process.on('uncaughtException', (e) => {
|
||||
console.log('uncaughtException', e);
|
||||
process.exit(1);
|
||||
});
|
||||
|
@ -4,7 +4,7 @@ import { rewardAccount } from '../../config';
|
||||
import { getAddress, isAddress } from 'ethers/lib/utils';
|
||||
import { configService } from '../../services';
|
||||
|
||||
export default fp(async server => {
|
||||
export default fp(async (server) => {
|
||||
const ajv = new Ajv();
|
||||
|
||||
ajv.addKeyword('isAddress', {
|
||||
|
@ -5,56 +5,55 @@ import { rewardAccount, tornadoServiceFee } from '../config';
|
||||
import { configService, getHealthService, getJobService, getPriceService } from '../services';
|
||||
import { RelayerJobType } from '../types';
|
||||
|
||||
|
||||
export function mainHandler(server: FastifyInstance, options, next) {
|
||||
const jobService = getJobService();
|
||||
const priceService = getPriceService();
|
||||
const healthService = getHealthService();
|
||||
|
||||
server.get('/',
|
||||
async (req, res) => {
|
||||
res.type('text/html')
|
||||
.send('<h1>This is <a href=https://tornado.cash>tornado.cash</a> Relayer service.' +
|
||||
' Check the <a href=/v1/status>/status</a> for settings</h1>');
|
||||
});
|
||||
server.get('/', async (req, res) => {
|
||||
res
|
||||
.type('text/html')
|
||||
.send(
|
||||
'<h1>This is <a href=https://tornado.cash>tornado.cash</a> Relayer service.' +
|
||||
' Check the <a href=/v1/status>/status</a> for settings</h1>',
|
||||
);
|
||||
});
|
||||
|
||||
server.get('/status',
|
||||
{ schema: statusSchema },
|
||||
async (req, res) => {
|
||||
const ethPrices = await priceService.getPrices();
|
||||
const currentQueue = await jobService.getQueueCount();
|
||||
const health = await healthService.getStatus();
|
||||
res.send({
|
||||
rewardAccount,
|
||||
instances: configService.instances,
|
||||
netId: configService.netId,
|
||||
ethPrices,
|
||||
tornadoServiceFee,
|
||||
miningServiceFee: 0,
|
||||
version: '4.5.0',
|
||||
health,
|
||||
currentQueue,
|
||||
});
|
||||
server.get('/status', { schema: statusSchema }, async (req, res) => {
|
||||
const ethPrices = await priceService.getPrices();
|
||||
const currentQueue = await jobService.getQueueCount();
|
||||
const health = await healthService.getStatus();
|
||||
res.send({
|
||||
rewardAccount,
|
||||
instances: configService.instances,
|
||||
netId: configService.netId,
|
||||
ethPrices,
|
||||
tornadoServiceFee,
|
||||
miningServiceFee: 0,
|
||||
version: '4.5.0',
|
||||
health,
|
||||
currentQueue,
|
||||
});
|
||||
});
|
||||
next();
|
||||
}
|
||||
|
||||
export function relayerHandler(server: FastifyInstance, options, next) {
|
||||
const jobService = getJobService();
|
||||
server.get<{ Params: { id: string } }>('/jobs/:id',
|
||||
{ schema: jobsSchema },
|
||||
async (req, res) => {
|
||||
const job = await jobService.getJob(req.params.id);
|
||||
if (!job) return server.httpErrors.notFound();
|
||||
res.send({ ...job.data, failedReason: job.failedReason });
|
||||
});
|
||||
server.get<{ Params: { id: string } }>('/jobs/:id', { schema: jobsSchema }, async (req, res) => {
|
||||
const job = await jobService.getJob(req.params.id);
|
||||
if (!job) return server.httpErrors.notFound();
|
||||
res.send({ ...job.data, failedReason: job.failedReason });
|
||||
});
|
||||
|
||||
server.post<{ Body: FromSchema<typeof withdrawBodySchema> }>('/tornadoWithdraw',
|
||||
server.post<{ Body: FromSchema<typeof withdrawBodySchema> }>(
|
||||
'/tornadoWithdraw',
|
||||
{ schema: withdrawSchema },
|
||||
async (req, res) => {
|
||||
console.log(req.body);
|
||||
const id = await jobService.postJob(RelayerJobType.TORNADO_WITHDRAW, req.body);
|
||||
res.send({ id });
|
||||
});
|
||||
},
|
||||
);
|
||||
next();
|
||||
}
|
||||
|
@ -27,14 +27,7 @@ export const withdrawBodySchema = {
|
||||
type: 'array',
|
||||
maxItems: 6,
|
||||
minItems: 6,
|
||||
items: [
|
||||
bytes32Type,
|
||||
bytes32Type,
|
||||
addressType,
|
||||
relayerType,
|
||||
bytes32Type,
|
||||
bytes32Type,
|
||||
],
|
||||
items: [bytes32Type, bytes32Type, addressType, relayerType, bytes32Type, bytes32Type],
|
||||
},
|
||||
},
|
||||
additionalProperties: false,
|
||||
|
@ -6,7 +6,6 @@ import helmet from '@fastify/helmet';
|
||||
import validator from './plugins/validator';
|
||||
import { mainHandler, relayerHandler } from './routes';
|
||||
|
||||
|
||||
function createServer() {
|
||||
const server = fastify({
|
||||
logger: true,
|
||||
@ -21,7 +20,6 @@ function createServer() {
|
||||
server.register(mainHandler, { prefix: '/v1' });
|
||||
server.register(relayerHandler, { prefix: '/v1' });
|
||||
|
||||
|
||||
server.setErrorHandler((error, req, res) => {
|
||||
req.log.error(error.toString());
|
||||
res.code(500).send({ error });
|
||||
|
@ -2,7 +2,8 @@ import { RelayerJobType } from './types';
|
||||
import tornConfig, { availableIds } from 'torn-token';
|
||||
|
||||
require('dotenv').config();
|
||||
|
||||
const isProduction = process.env.NODE_ENV === 'production';
|
||||
export const relayerVersion = require(`${isProduction ? '.' : '..'}/package.json`).version;
|
||||
export const netId = <availableIds>Number(process.env.NET_ID || 1);
|
||||
export const redisUrl = process.env.REDIS_URL || 'redis://127.0.0.1:6379';
|
||||
export const rpcUrl = process.env.RPC_URL;
|
||||
@ -14,7 +15,7 @@ export const privateKey = process.env.PRIVATE_KEY;
|
||||
export const instances = tornConfig.instances;
|
||||
export const torn = tornConfig;
|
||||
export const port = process.env.APP_PORT || 8000;
|
||||
export const host = process.env.NODE_ENV === 'production' ? 'https://' + process.env.VIRTUAL_HOST : `http://localhost:${port}`;
|
||||
export const host = isProduction ? 'https://' + process.env.VIRTUAL_HOST : `http://localhost:${port}`;
|
||||
export const tornadoServiceFee = Number(process.env.REGULAR_TORNADO_WITHDRAW_FEE);
|
||||
export const rewardAccount = process.env.REWARD_ACCOUNT;
|
||||
export const governanceAddress = '0x5efda50f22d34F262c29268506C5Fa42cB56A1Ce';
|
||||
|
389
src/contracts/AggregatorAbi.ts
Normal file
389
src/contracts/AggregatorAbi.ts
Normal file
@ -0,0 +1,389 @@
|
||||
/* Autogenerated file. Do not edit manually. */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type {
|
||||
BaseContract,
|
||||
BigNumber,
|
||||
BigNumberish,
|
||||
BytesLike,
|
||||
CallOverrides,
|
||||
ContractTransaction,
|
||||
Overrides,
|
||||
PopulatedTransaction,
|
||||
Signer,
|
||||
utils,
|
||||
} from 'ethers';
|
||||
import type { FunctionFragment, Result, EventFragment } from '@ethersproject/abi';
|
||||
import type { Listener, Provider } from '@ethersproject/providers';
|
||||
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common';
|
||||
|
||||
export interface AggregatorAbiInterface extends utils.Interface {
|
||||
contractName: 'AggregatorAbi';
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
getFunction(
|
||||
nameOrSignatureOrTopic:
|
||||
| 'addConnector'
|
||||
| 'addOracle'
|
||||
| 'connectors'
|
||||
| 'getRate'
|
||||
| 'getRateToEth'
|
||||
| 'multiWrapper'
|
||||
| 'oracles'
|
||||
| 'owner'
|
||||
| 'removeConnector'
|
||||
| 'removeOracle'
|
||||
| 'renounceOwnership'
|
||||
| 'setMultiWrapper'
|
||||
| 'transferOwnership',
|
||||
): 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 interface ConnectorAddedEventObject {
|
||||
connector: string;
|
||||
}
|
||||
export type ConnectorAddedEvent = TypedEvent<[string], ConnectorAddedEventObject>;
|
||||
|
||||
export type ConnectorAddedEventFilter = TypedEventFilter<ConnectorAddedEvent>;
|
||||
|
||||
export interface ConnectorRemovedEventObject {
|
||||
connector: string;
|
||||
}
|
||||
export type ConnectorRemovedEvent = TypedEvent<[string], ConnectorRemovedEventObject>;
|
||||
|
||||
export type ConnectorRemovedEventFilter = TypedEventFilter<ConnectorRemovedEvent>;
|
||||
|
||||
export interface MultiWrapperUpdatedEventObject {
|
||||
multiWrapper: string;
|
||||
}
|
||||
export type MultiWrapperUpdatedEvent = TypedEvent<[string], MultiWrapperUpdatedEventObject>;
|
||||
|
||||
export type MultiWrapperUpdatedEventFilter = TypedEventFilter<MultiWrapperUpdatedEvent>;
|
||||
|
||||
export interface OracleAddedEventObject {
|
||||
oracle: string;
|
||||
oracleType: number;
|
||||
}
|
||||
export type OracleAddedEvent = TypedEvent<[string, number], OracleAddedEventObject>;
|
||||
|
||||
export type OracleAddedEventFilter = TypedEventFilter<OracleAddedEvent>;
|
||||
|
||||
export interface OracleRemovedEventObject {
|
||||
oracle: string;
|
||||
oracleType: number;
|
||||
}
|
||||
export type OracleRemovedEvent = TypedEvent<[string, number], OracleRemovedEventObject>;
|
||||
|
||||
export type OracleRemovedEventFilter = TypedEventFilter<OracleRemovedEvent>;
|
||||
|
||||
export interface OwnershipTransferredEventObject {
|
||||
previousOwner: string;
|
||||
newOwner: string;
|
||||
}
|
||||
export type OwnershipTransferredEvent = TypedEvent<[string, string], OwnershipTransferredEventObject>;
|
||||
|
||||
export type OwnershipTransferredEventFilter = TypedEventFilter<OwnershipTransferredEvent>;
|
||||
|
||||
export interface AggregatorAbi extends BaseContract {
|
||||
contractName: 'AggregatorAbi';
|
||||
|
||||
connect(signerOrProvider: Signer | Provider | string): this;
|
||||
attach(addressOrName: string): this;
|
||||
deployed(): Promise<this>;
|
||||
|
||||
interface: AggregatorAbiInterface;
|
||||
|
||||
queryFilter<TEvent extends TypedEvent>(
|
||||
event: TypedEventFilter<TEvent>,
|
||||
fromBlockOrBlockhash?: string | number | undefined,
|
||||
toBlock?: string | number | undefined,
|
||||
): Promise<Array<TEvent>>;
|
||||
|
||||
listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
|
||||
listeners(eventName?: string): Array<Listener>;
|
||||
removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
|
||||
removeAllListeners(eventName?: string): this;
|
||||
off: OnEvent<this>;
|
||||
on: OnEvent<this>;
|
||||
once: OnEvent<this>;
|
||||
removeListener: OnEvent<this>;
|
||||
|
||||
functions: {
|
||||
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): ConnectorAddedEventFilter;
|
||||
ConnectorAdded(connector?: null): ConnectorAddedEventFilter;
|
||||
|
||||
'ConnectorRemoved(address)'(connector?: null): ConnectorRemovedEventFilter;
|
||||
ConnectorRemoved(connector?: null): ConnectorRemovedEventFilter;
|
||||
|
||||
'MultiWrapperUpdated(address)'(multiWrapper?: null): MultiWrapperUpdatedEventFilter;
|
||||
MultiWrapperUpdated(multiWrapper?: null): MultiWrapperUpdatedEventFilter;
|
||||
|
||||
'OracleAdded(address,uint8)'(oracle?: null, oracleType?: null): OracleAddedEventFilter;
|
||||
OracleAdded(oracle?: null, oracleType?: null): OracleAddedEventFilter;
|
||||
|
||||
'OracleRemoved(address,uint8)'(oracle?: null, oracleType?: null): OracleRemovedEventFilter;
|
||||
OracleRemoved(oracle?: null, oracleType?: null): OracleRemovedEventFilter;
|
||||
|
||||
'OwnershipTransferred(address,address)'(
|
||||
previousOwner?: string | null,
|
||||
newOwner?: string | null,
|
||||
): OwnershipTransferredEventFilter;
|
||||
OwnershipTransferred(previousOwner?: string | null, newOwner?: string | null): OwnershipTransferredEventFilter;
|
||||
};
|
||||
|
||||
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>;
|
||||
};
|
||||
}
|
@ -12,113 +12,69 @@ import type {
|
||||
PopulatedTransaction,
|
||||
Signer,
|
||||
utils,
|
||||
} from "ethers";
|
||||
import type {
|
||||
FunctionFragment,
|
||||
Result,
|
||||
EventFragment,
|
||||
} from "@ethersproject/abi";
|
||||
import type { Listener, Provider } from "@ethersproject/providers";
|
||||
import type {
|
||||
TypedEventFilter,
|
||||
TypedEvent,
|
||||
TypedListener,
|
||||
OnEvent,
|
||||
} from "./common";
|
||||
} from 'ethers';
|
||||
import type { FunctionFragment, Result, EventFragment } from '@ethersproject/abi';
|
||||
import type { Listener, Provider } from '@ethersproject/providers';
|
||||
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common';
|
||||
|
||||
export interface ERC20AbiInterface extends utils.Interface {
|
||||
contractName: "ERC20Abi";
|
||||
contractName: 'ERC20Abi';
|
||||
|
||||
functions: {
|
||||
"totalSupply()": FunctionFragment;
|
||||
"_totalSupply()": FunctionFragment;
|
||||
"balanceOf(address)": FunctionFragment;
|
||||
"transfer(address,uint256)": FunctionFragment;
|
||||
"allowance(address,address)": FunctionFragment;
|
||||
"transferFrom(address,address,uint256)": FunctionFragment;
|
||||
"approve(address,uint256)": FunctionFragment;
|
||||
"nonces(address)": FunctionFragment;
|
||||
"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment;
|
||||
'totalSupply()': FunctionFragment;
|
||||
'_totalSupply()': FunctionFragment;
|
||||
'balanceOf(address)': FunctionFragment;
|
||||
'transfer(address,uint256)': FunctionFragment;
|
||||
'allowance(address,address)': FunctionFragment;
|
||||
'transferFrom(address,address,uint256)': FunctionFragment;
|
||||
'approve(address,uint256)': FunctionFragment;
|
||||
'nonces(address)': FunctionFragment;
|
||||
'permit(address,address,uint256,uint256,uint8,bytes32,bytes32)': FunctionFragment;
|
||||
};
|
||||
|
||||
getFunction(
|
||||
nameOrSignatureOrTopic:
|
||||
| "totalSupply"
|
||||
| "_totalSupply"
|
||||
| "balanceOf"
|
||||
| "transfer"
|
||||
| "allowance"
|
||||
| "transferFrom"
|
||||
| "approve"
|
||||
| "nonces"
|
||||
| "permit"
|
||||
| 'totalSupply'
|
||||
| '_totalSupply'
|
||||
| 'balanceOf'
|
||||
| 'transfer'
|
||||
| 'allowance'
|
||||
| 'transferFrom'
|
||||
| 'approve'
|
||||
| 'nonces'
|
||||
| 'permit',
|
||||
): FunctionFragment;
|
||||
|
||||
encodeFunctionData(functionFragment: 'totalSupply', values?: undefined): string;
|
||||
encodeFunctionData(functionFragment: '_totalSupply', values?: undefined): string;
|
||||
encodeFunctionData(functionFragment: 'balanceOf', values: [string]): string;
|
||||
encodeFunctionData(functionFragment: 'transfer', values: [string, BigNumberish]): string;
|
||||
encodeFunctionData(functionFragment: 'allowance', values: [string, string]): string;
|
||||
encodeFunctionData(functionFragment: 'transferFrom', values: [string, string, BigNumberish]): string;
|
||||
encodeFunctionData(functionFragment: 'approve', values: [string, BigNumberish]): string;
|
||||
encodeFunctionData(functionFragment: 'nonces', values: [string]): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "totalSupply",
|
||||
values?: undefined
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "_totalSupply",
|
||||
values?: undefined
|
||||
): string;
|
||||
encodeFunctionData(functionFragment: "balanceOf", values: [string]): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "transfer",
|
||||
values: [string, BigNumberish]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "allowance",
|
||||
values: [string, string]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "transferFrom",
|
||||
values: [string, string, BigNumberish]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "approve",
|
||||
values: [string, BigNumberish]
|
||||
): string;
|
||||
encodeFunctionData(functionFragment: "nonces", values: [string]): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "permit",
|
||||
values: [
|
||||
string,
|
||||
string,
|
||||
BigNumberish,
|
||||
BigNumberish,
|
||||
BigNumberish,
|
||||
BytesLike,
|
||||
BytesLike
|
||||
]
|
||||
functionFragment: 'permit',
|
||||
values: [string, string, BigNumberish, BigNumberish, BigNumberish, BytesLike, BytesLike],
|
||||
): string;
|
||||
|
||||
decodeFunctionResult(
|
||||
functionFragment: "totalSupply",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "_totalSupply",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "transferFrom",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'totalSupply', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: '_totalSupply', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'balanceOf', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'transfer', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'allowance', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'transferFrom', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'approve', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'nonces', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'permit', data: BytesLike): Result;
|
||||
|
||||
events: {
|
||||
"Approval(address,address,uint256)": EventFragment;
|
||||
"Transfer(address,address,uint256)": EventFragment;
|
||||
'Approval(address,address,uint256)': EventFragment;
|
||||
'Transfer(address,address,uint256)': EventFragment;
|
||||
};
|
||||
|
||||
getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment;
|
||||
getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment;
|
||||
getEvent(nameOrSignatureOrTopic: 'Approval'): EventFragment;
|
||||
getEvent(nameOrSignatureOrTopic: 'Transfer'): EventFragment;
|
||||
}
|
||||
|
||||
export interface ApprovalEventObject {
|
||||
@ -126,10 +82,7 @@ export interface ApprovalEventObject {
|
||||
spender: string;
|
||||
value: BigNumber;
|
||||
}
|
||||
export type ApprovalEvent = TypedEvent<
|
||||
[string, string, BigNumber],
|
||||
ApprovalEventObject
|
||||
>;
|
||||
export type ApprovalEvent = TypedEvent<[string, string, BigNumber], ApprovalEventObject>;
|
||||
|
||||
export type ApprovalEventFilter = TypedEventFilter<ApprovalEvent>;
|
||||
|
||||
@ -138,15 +91,12 @@ export interface TransferEventObject {
|
||||
to: string;
|
||||
value: BigNumber;
|
||||
}
|
||||
export type TransferEvent = TypedEvent<
|
||||
[string, string, BigNumber],
|
||||
TransferEventObject
|
||||
>;
|
||||
export type TransferEvent = TypedEvent<[string, string, BigNumber], TransferEventObject>;
|
||||
|
||||
export type TransferEventFilter = TypedEventFilter<TransferEvent>;
|
||||
|
||||
export interface ERC20Abi extends BaseContract {
|
||||
contractName: "ERC20Abi";
|
||||
contractName: 'ERC20Abi';
|
||||
|
||||
connect(signerOrProvider: Signer | Provider | string): this;
|
||||
attach(addressOrName: string): this;
|
||||
@ -157,16 +107,12 @@ export interface ERC20Abi extends BaseContract {
|
||||
queryFilter<TEvent extends TypedEvent>(
|
||||
event: TypedEventFilter<TEvent>,
|
||||
fromBlockOrBlockhash?: string | number | undefined,
|
||||
toBlock?: string | number | undefined
|
||||
toBlock?: string | number | undefined,
|
||||
): Promise<Array<TEvent>>;
|
||||
|
||||
listeners<TEvent extends TypedEvent>(
|
||||
eventFilter?: TypedEventFilter<TEvent>
|
||||
): Array<TypedListener<TEvent>>;
|
||||
listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
|
||||
listeners(eventName?: string): Array<Listener>;
|
||||
removeAllListeners<TEvent extends TypedEvent>(
|
||||
eventFilter: TypedEventFilter<TEvent>
|
||||
): this;
|
||||
removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
|
||||
removeAllListeners(eventName?: string): this;
|
||||
off: OnEvent<this>;
|
||||
on: OnEvent<this>;
|
||||
@ -183,26 +129,22 @@ export interface ERC20Abi extends BaseContract {
|
||||
transfer(
|
||||
to: string,
|
||||
value: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
overrides?: Overrides & { from?: string | Promise<string> },
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
allowance(
|
||||
owner: string,
|
||||
spender: string,
|
||||
overrides?: CallOverrides
|
||||
): Promise<[BigNumber]>;
|
||||
allowance(owner: string, spender: string, overrides?: CallOverrides): Promise<[BigNumber]>;
|
||||
|
||||
transferFrom(
|
||||
from: string,
|
||||
to: string,
|
||||
value: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
overrides?: Overrides & { from?: string | Promise<string> },
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
approve(
|
||||
spender: string,
|
||||
value: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
overrides?: Overrides & { from?: string | Promise<string> },
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
nonces(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>;
|
||||
@ -215,7 +157,7 @@ export interface ERC20Abi extends BaseContract {
|
||||
v: BigNumberish,
|
||||
r: BytesLike,
|
||||
s: BytesLike,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
overrides?: Overrides & { from?: string | Promise<string> },
|
||||
): Promise<ContractTransaction>;
|
||||
};
|
||||
|
||||
@ -228,26 +170,22 @@ export interface ERC20Abi extends BaseContract {
|
||||
transfer(
|
||||
to: string,
|
||||
value: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
overrides?: Overrides & { from?: string | Promise<string> },
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
allowance(
|
||||
owner: string,
|
||||
spender: string,
|
||||
overrides?: CallOverrides
|
||||
): Promise<BigNumber>;
|
||||
allowance(owner: string, spender: string, overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
transferFrom(
|
||||
from: string,
|
||||
to: string,
|
||||
value: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
overrides?: Overrides & { from?: string | Promise<string> },
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
approve(
|
||||
spender: string,
|
||||
value: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
overrides?: Overrides & { from?: string | Promise<string> },
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
nonces(owner: string, overrides?: CallOverrides): Promise<BigNumber>;
|
||||
@ -260,7 +198,7 @@ export interface ERC20Abi extends BaseContract {
|
||||
v: BigNumberish,
|
||||
r: BytesLike,
|
||||
s: BytesLike,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
overrides?: Overrides & { from?: string | Promise<string> },
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
callStatic: {
|
||||
@ -270,30 +208,13 @@ export interface ERC20Abi extends BaseContract {
|
||||
|
||||
balanceOf(who: string, overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
transfer(
|
||||
to: string,
|
||||
value: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<void>;
|
||||
transfer(to: string, value: BigNumberish, overrides?: CallOverrides): Promise<void>;
|
||||
|
||||
allowance(
|
||||
owner: string,
|
||||
spender: string,
|
||||
overrides?: CallOverrides
|
||||
): Promise<BigNumber>;
|
||||
allowance(owner: string, spender: string, overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
transferFrom(
|
||||
from: string,
|
||||
to: string,
|
||||
value: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<void>;
|
||||
transferFrom(from: string, to: string, value: BigNumberish, overrides?: CallOverrides): Promise<void>;
|
||||
|
||||
approve(
|
||||
spender: string,
|
||||
value: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
): Promise<void>;
|
||||
approve(spender: string, value: BigNumberish, overrides?: CallOverrides): Promise<void>;
|
||||
|
||||
nonces(owner: string, overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
@ -305,32 +226,16 @@ export interface ERC20Abi extends BaseContract {
|
||||
v: BigNumberish,
|
||||
r: BytesLike,
|
||||
s: BytesLike,
|
||||
overrides?: CallOverrides
|
||||
overrides?: CallOverrides,
|
||||
): Promise<void>;
|
||||
};
|
||||
|
||||
filters: {
|
||||
"Approval(address,address,uint256)"(
|
||||
owner?: string | null,
|
||||
spender?: string | null,
|
||||
value?: null
|
||||
): ApprovalEventFilter;
|
||||
Approval(
|
||||
owner?: string | null,
|
||||
spender?: string | null,
|
||||
value?: null
|
||||
): ApprovalEventFilter;
|
||||
'Approval(address,address,uint256)'(owner?: string | null, spender?: string | null, value?: null): ApprovalEventFilter;
|
||||
Approval(owner?: string | null, spender?: string | null, value?: null): ApprovalEventFilter;
|
||||
|
||||
"Transfer(address,address,uint256)"(
|
||||
from?: string | null,
|
||||
to?: string | null,
|
||||
value?: null
|
||||
): TransferEventFilter;
|
||||
Transfer(
|
||||
from?: string | null,
|
||||
to?: string | null,
|
||||
value?: null
|
||||
): TransferEventFilter;
|
||||
'Transfer(address,address,uint256)'(from?: string | null, to?: string | null, value?: null): TransferEventFilter;
|
||||
Transfer(from?: string | null, to?: string | null, value?: null): TransferEventFilter;
|
||||
};
|
||||
|
||||
estimateGas: {
|
||||
@ -340,29 +245,21 @@ export interface ERC20Abi extends BaseContract {
|
||||
|
||||
balanceOf(who: string, overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
transfer(
|
||||
to: string,
|
||||
value: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<BigNumber>;
|
||||
transfer(to: string, value: BigNumberish, overrides?: Overrides & { from?: string | Promise<string> }): Promise<BigNumber>;
|
||||
|
||||
allowance(
|
||||
owner: string,
|
||||
spender: string,
|
||||
overrides?: CallOverrides
|
||||
): Promise<BigNumber>;
|
||||
allowance(owner: string, spender: string, overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
transferFrom(
|
||||
from: string,
|
||||
to: string,
|
||||
value: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
overrides?: Overrides & { from?: string | Promise<string> },
|
||||
): Promise<BigNumber>;
|
||||
|
||||
approve(
|
||||
spender: string,
|
||||
value: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
overrides?: Overrides & { from?: string | Promise<string> },
|
||||
): Promise<BigNumber>;
|
||||
|
||||
nonces(owner: string, overrides?: CallOverrides): Promise<BigNumber>;
|
||||
@ -375,7 +272,7 @@ export interface ERC20Abi extends BaseContract {
|
||||
v: BigNumberish,
|
||||
r: BytesLike,
|
||||
s: BytesLike,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
overrides?: Overrides & { from?: string | Promise<string> },
|
||||
): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
@ -384,40 +281,30 @@ export interface ERC20Abi extends BaseContract {
|
||||
|
||||
_totalSupply(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
balanceOf(
|
||||
who: string,
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
balanceOf(who: string, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
transfer(
|
||||
to: string,
|
||||
value: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
overrides?: Overrides & { from?: string | Promise<string> },
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
allowance(
|
||||
owner: string,
|
||||
spender: string,
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
allowance(owner: string, spender: string, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
transferFrom(
|
||||
from: string,
|
||||
to: string,
|
||||
value: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
overrides?: Overrides & { from?: string | Promise<string> },
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
approve(
|
||||
spender: string,
|
||||
value: BigNumberish,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
overrides?: Overrides & { from?: string | Promise<string> },
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
nonces(
|
||||
owner: string,
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
nonces(owner: string, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
permit(
|
||||
owner: string,
|
||||
@ -427,7 +314,7 @@ export interface ERC20Abi extends BaseContract {
|
||||
v: BigNumberish,
|
||||
r: BytesLike,
|
||||
s: BytesLike,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
overrides?: Overrides & { from?: string | Promise<string> },
|
||||
): Promise<PopulatedTransaction>;
|
||||
};
|
||||
}
|
86
src/contracts/MulticallAbi.ts
Normal file
86
src/contracts/MulticallAbi.ts
Normal file
@ -0,0 +1,86 @@
|
||||
/* Autogenerated file. Do not edit manually. */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { BaseContract, BigNumber, BytesLike, CallOverrides, PopulatedTransaction, Signer, utils } from 'ethers';
|
||||
import type { FunctionFragment, Result } from '@ethersproject/abi';
|
||||
import type { Listener, Provider } from '@ethersproject/providers';
|
||||
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common';
|
||||
|
||||
export declare namespace MultiCall {
|
||||
export type CallStruct = { to: string; data: BytesLike };
|
||||
|
||||
export type CallStructOutput = [string, string] & {
|
||||
to: string;
|
||||
data: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface MulticallAbiInterface extends utils.Interface {
|
||||
contractName: 'MulticallAbi';
|
||||
|
||||
functions: {
|
||||
'multicall((address,bytes)[])': FunctionFragment;
|
||||
};
|
||||
|
||||
getFunction(nameOrSignatureOrTopic: 'multicall'): FunctionFragment;
|
||||
|
||||
encodeFunctionData(functionFragment: 'multicall', values: [MultiCall.CallStruct[]]): string;
|
||||
|
||||
decodeFunctionResult(functionFragment: 'multicall', data: BytesLike): Result;
|
||||
|
||||
events: {};
|
||||
}
|
||||
|
||||
export interface MulticallAbi extends BaseContract {
|
||||
contractName: 'MulticallAbi';
|
||||
|
||||
connect(signerOrProvider: Signer | Provider | string): this;
|
||||
attach(addressOrName: string): this;
|
||||
deployed(): Promise<this>;
|
||||
|
||||
interface: MulticallAbiInterface;
|
||||
|
||||
queryFilter<TEvent extends TypedEvent>(
|
||||
event: TypedEventFilter<TEvent>,
|
||||
fromBlockOrBlockhash?: string | number | undefined,
|
||||
toBlock?: string | number | undefined,
|
||||
): Promise<Array<TEvent>>;
|
||||
|
||||
listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
|
||||
listeners(eventName?: string): Array<Listener>;
|
||||
removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
|
||||
removeAllListeners(eventName?: string): this;
|
||||
off: OnEvent<this>;
|
||||
on: OnEvent<this>;
|
||||
once: OnEvent<this>;
|
||||
removeListener: OnEvent<this>;
|
||||
|
||||
functions: {
|
||||
multicall(
|
||||
calls: MultiCall.CallStruct[],
|
||||
overrides?: CallOverrides,
|
||||
): Promise<[string[], boolean[]] & { results: string[]; success: boolean[] }>;
|
||||
};
|
||||
|
||||
multicall(
|
||||
calls: MultiCall.CallStruct[],
|
||||
overrides?: CallOverrides,
|
||||
): Promise<[string[], boolean[]] & { results: string[]; success: boolean[] }>;
|
||||
|
||||
callStatic: {
|
||||
multicall(
|
||||
calls: MultiCall.CallStruct[],
|
||||
overrides?: CallOverrides,
|
||||
): Promise<[string[], boolean[]] & { results: string[]; success: boolean[] }>;
|
||||
};
|
||||
|
||||
filters: {};
|
||||
|
||||
estimateGas: {
|
||||
multicall(calls: MultiCall.CallStruct[], overrides?: CallOverrides): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
populateTransaction: {
|
||||
multicall(calls: MultiCall.CallStruct[], overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
};
|
||||
}
|
389
src/contracts/OffchainOracleAbi.ts
Normal file
389
src/contracts/OffchainOracleAbi.ts
Normal file
@ -0,0 +1,389 @@
|
||||
/* Autogenerated file. Do not edit manually. */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type {
|
||||
BaseContract,
|
||||
BigNumber,
|
||||
BigNumberish,
|
||||
BytesLike,
|
||||
CallOverrides,
|
||||
ContractTransaction,
|
||||
Overrides,
|
||||
PopulatedTransaction,
|
||||
Signer,
|
||||
utils,
|
||||
} from 'ethers';
|
||||
import type { FunctionFragment, Result, EventFragment } from '@ethersproject/abi';
|
||||
import type { Listener, Provider } from '@ethersproject/providers';
|
||||
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common';
|
||||
|
||||
export interface OffchainOracleAbiInterface extends utils.Interface {
|
||||
contractName: 'OffchainOracleAbi';
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
getFunction(
|
||||
nameOrSignatureOrTopic:
|
||||
| 'addConnector'
|
||||
| 'addOracle'
|
||||
| 'connectors'
|
||||
| 'getRate'
|
||||
| 'getRateToEth'
|
||||
| 'multiWrapper'
|
||||
| 'oracles'
|
||||
| 'owner'
|
||||
| 'removeConnector'
|
||||
| 'removeOracle'
|
||||
| 'renounceOwnership'
|
||||
| 'setMultiWrapper'
|
||||
| 'transferOwnership',
|
||||
): 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 interface ConnectorAddedEventObject {
|
||||
connector: string;
|
||||
}
|
||||
export type ConnectorAddedEvent = TypedEvent<[string], ConnectorAddedEventObject>;
|
||||
|
||||
export type ConnectorAddedEventFilter = TypedEventFilter<ConnectorAddedEvent>;
|
||||
|
||||
export interface ConnectorRemovedEventObject {
|
||||
connector: string;
|
||||
}
|
||||
export type ConnectorRemovedEvent = TypedEvent<[string], ConnectorRemovedEventObject>;
|
||||
|
||||
export type ConnectorRemovedEventFilter = TypedEventFilter<ConnectorRemovedEvent>;
|
||||
|
||||
export interface MultiWrapperUpdatedEventObject {
|
||||
multiWrapper: string;
|
||||
}
|
||||
export type MultiWrapperUpdatedEvent = TypedEvent<[string], MultiWrapperUpdatedEventObject>;
|
||||
|
||||
export type MultiWrapperUpdatedEventFilter = TypedEventFilter<MultiWrapperUpdatedEvent>;
|
||||
|
||||
export interface OracleAddedEventObject {
|
||||
oracle: string;
|
||||
oracleType: number;
|
||||
}
|
||||
export type OracleAddedEvent = TypedEvent<[string, number], OracleAddedEventObject>;
|
||||
|
||||
export type OracleAddedEventFilter = TypedEventFilter<OracleAddedEvent>;
|
||||
|
||||
export interface OracleRemovedEventObject {
|
||||
oracle: string;
|
||||
oracleType: number;
|
||||
}
|
||||
export type OracleRemovedEvent = TypedEvent<[string, number], OracleRemovedEventObject>;
|
||||
|
||||
export type OracleRemovedEventFilter = TypedEventFilter<OracleRemovedEvent>;
|
||||
|
||||
export interface OwnershipTransferredEventObject {
|
||||
previousOwner: string;
|
||||
newOwner: string;
|
||||
}
|
||||
export type OwnershipTransferredEvent = TypedEvent<[string, string], OwnershipTransferredEventObject>;
|
||||
|
||||
export type OwnershipTransferredEventFilter = TypedEventFilter<OwnershipTransferredEvent>;
|
||||
|
||||
export interface OffchainOracleAbi extends BaseContract {
|
||||
contractName: 'OffchainOracleAbi';
|
||||
|
||||
connect(signerOrProvider: Signer | Provider | string): this;
|
||||
attach(addressOrName: string): this;
|
||||
deployed(): Promise<this>;
|
||||
|
||||
interface: OffchainOracleAbiInterface;
|
||||
|
||||
queryFilter<TEvent extends TypedEvent>(
|
||||
event: TypedEventFilter<TEvent>,
|
||||
fromBlockOrBlockhash?: string | number | undefined,
|
||||
toBlock?: string | number | undefined,
|
||||
): Promise<Array<TEvent>>;
|
||||
|
||||
listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
|
||||
listeners(eventName?: string): Array<Listener>;
|
||||
removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
|
||||
removeAllListeners(eventName?: string): this;
|
||||
off: OnEvent<this>;
|
||||
on: OnEvent<this>;
|
||||
once: OnEvent<this>;
|
||||
removeListener: OnEvent<this>;
|
||||
|
||||
functions: {
|
||||
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): ConnectorAddedEventFilter;
|
||||
ConnectorAdded(connector?: null): ConnectorAddedEventFilter;
|
||||
|
||||
'ConnectorRemoved(address)'(connector?: null): ConnectorRemovedEventFilter;
|
||||
ConnectorRemoved(connector?: null): ConnectorRemovedEventFilter;
|
||||
|
||||
'MultiWrapperUpdated(address)'(multiWrapper?: null): MultiWrapperUpdatedEventFilter;
|
||||
MultiWrapperUpdated(multiWrapper?: null): MultiWrapperUpdatedEventFilter;
|
||||
|
||||
'OracleAdded(address,uint8)'(oracle?: null, oracleType?: null): OracleAddedEventFilter;
|
||||
OracleAdded(oracle?: null, oracleType?: null): OracleAddedEventFilter;
|
||||
|
||||
'OracleRemoved(address,uint8)'(oracle?: null, oracleType?: null): OracleRemovedEventFilter;
|
||||
OracleRemoved(oracle?: null, oracleType?: null): OracleRemovedEventFilter;
|
||||
|
||||
'OwnershipTransferred(address,address)'(
|
||||
previousOwner?: string | null,
|
||||
newOwner?: string | null,
|
||||
): OwnershipTransferredEventFilter;
|
||||
OwnershipTransferred(previousOwner?: string | null, newOwner?: string | null): OwnershipTransferredEventFilter;
|
||||
};
|
||||
|
||||
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>;
|
||||
};
|
||||
}
|
@ -13,82 +13,50 @@ import type {
|
||||
PopulatedTransaction,
|
||||
Signer,
|
||||
utils,
|
||||
} from "ethers";
|
||||
import type {
|
||||
FunctionFragment,
|
||||
Result,
|
||||
EventFragment,
|
||||
} from "@ethersproject/abi";
|
||||
import type { Listener, Provider } from "@ethersproject/providers";
|
||||
import type {
|
||||
TypedEventFilter,
|
||||
TypedEvent,
|
||||
TypedListener,
|
||||
OnEvent,
|
||||
} from "./common";
|
||||
} from 'ethers';
|
||||
import type { FunctionFragment, Result, EventFragment } from '@ethersproject/abi';
|
||||
import type { Listener, Provider } from '@ethersproject/providers';
|
||||
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common';
|
||||
|
||||
export interface ProxyLightABIInterface extends utils.Interface {
|
||||
contractName: "ProxyLightABI";
|
||||
contractName: 'ProxyLightABI';
|
||||
|
||||
functions: {
|
||||
"backupNotes(bytes[])": FunctionFragment;
|
||||
"deposit(address,bytes32,bytes)": FunctionFragment;
|
||||
"withdraw(address,bytes,bytes32,bytes32,address,address,uint256,uint256)": FunctionFragment;
|
||||
'backupNotes(bytes[])': FunctionFragment;
|
||||
'deposit(address,bytes32,bytes)': FunctionFragment;
|
||||
'withdraw(address,bytes,bytes32,bytes32,address,address,uint256,uint256)': FunctionFragment;
|
||||
};
|
||||
|
||||
getFunction(
|
||||
nameOrSignatureOrTopic: "backupNotes" | "deposit" | "withdraw"
|
||||
): FunctionFragment;
|
||||
getFunction(nameOrSignatureOrTopic: 'backupNotes' | 'deposit' | 'withdraw'): FunctionFragment;
|
||||
|
||||
encodeFunctionData(functionFragment: 'backupNotes', values: [BytesLike[]]): string;
|
||||
encodeFunctionData(functionFragment: 'deposit', values: [string, BytesLike, BytesLike]): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "backupNotes",
|
||||
values: [BytesLike[]]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "deposit",
|
||||
values: [string, BytesLike, BytesLike]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "withdraw",
|
||||
values: [
|
||||
string,
|
||||
BytesLike,
|
||||
BytesLike,
|
||||
BytesLike,
|
||||
string,
|
||||
string,
|
||||
BigNumberish,
|
||||
BigNumberish
|
||||
]
|
||||
functionFragment: 'withdraw',
|
||||
values: [string, BytesLike, BytesLike, BytesLike, string, string, BigNumberish, BigNumberish],
|
||||
): string;
|
||||
|
||||
decodeFunctionResult(
|
||||
functionFragment: "backupNotes",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'backupNotes', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'deposit', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'withdraw', data: BytesLike): Result;
|
||||
|
||||
events: {
|
||||
"EncryptedNote(address,bytes)": EventFragment;
|
||||
'EncryptedNote(address,bytes)': EventFragment;
|
||||
};
|
||||
|
||||
getEvent(nameOrSignatureOrTopic: "EncryptedNote"): EventFragment;
|
||||
getEvent(nameOrSignatureOrTopic: 'EncryptedNote'): EventFragment;
|
||||
}
|
||||
|
||||
export interface EncryptedNoteEventObject {
|
||||
sender: string;
|
||||
encryptedNote: string;
|
||||
}
|
||||
export type EncryptedNoteEvent = TypedEvent<
|
||||
[string, string],
|
||||
EncryptedNoteEventObject
|
||||
>;
|
||||
export type EncryptedNoteEvent = TypedEvent<[string, string], EncryptedNoteEventObject>;
|
||||
|
||||
export type EncryptedNoteEventFilter = TypedEventFilter<EncryptedNoteEvent>;
|
||||
|
||||
export interface ProxyLightABI extends BaseContract {
|
||||
contractName: "ProxyLightABI";
|
||||
contractName: 'ProxyLightABI';
|
||||
|
||||
connect(signerOrProvider: Signer | Provider | string): this;
|
||||
attach(addressOrName: string): this;
|
||||
@ -99,16 +67,12 @@ export interface ProxyLightABI extends BaseContract {
|
||||
queryFilter<TEvent extends TypedEvent>(
|
||||
event: TypedEventFilter<TEvent>,
|
||||
fromBlockOrBlockhash?: string | number | undefined,
|
||||
toBlock?: string | number | undefined
|
||||
toBlock?: string | number | undefined,
|
||||
): Promise<Array<TEvent>>;
|
||||
|
||||
listeners<TEvent extends TypedEvent>(
|
||||
eventFilter?: TypedEventFilter<TEvent>
|
||||
): Array<TypedListener<TEvent>>;
|
||||
listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
|
||||
listeners(eventName?: string): Array<Listener>;
|
||||
removeAllListeners<TEvent extends TypedEvent>(
|
||||
eventFilter: TypedEventFilter<TEvent>
|
||||
): this;
|
||||
removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
|
||||
removeAllListeners(eventName?: string): this;
|
||||
off: OnEvent<this>;
|
||||
on: OnEvent<this>;
|
||||
@ -118,14 +82,14 @@ export interface ProxyLightABI extends BaseContract {
|
||||
functions: {
|
||||
backupNotes(
|
||||
_encryptedNotes: BytesLike[],
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
overrides?: Overrides & { from?: string | Promise<string> },
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
deposit(
|
||||
_tornado: string,
|
||||
_commitment: BytesLike,
|
||||
_encryptedNote: BytesLike,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> },
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
withdraw(
|
||||
@ -137,20 +101,20 @@ export interface ProxyLightABI extends BaseContract {
|
||||
_relayer: string,
|
||||
_fee: BigNumberish,
|
||||
_refund: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> },
|
||||
): Promise<ContractTransaction>;
|
||||
};
|
||||
|
||||
backupNotes(
|
||||
_encryptedNotes: BytesLike[],
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
overrides?: Overrides & { from?: string | Promise<string> },
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
deposit(
|
||||
_tornado: string,
|
||||
_commitment: BytesLike,
|
||||
_encryptedNote: BytesLike,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> },
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
withdraw(
|
||||
@ -162,21 +126,13 @@ export interface ProxyLightABI extends BaseContract {
|
||||
_relayer: string,
|
||||
_fee: BigNumberish,
|
||||
_refund: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> },
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
callStatic: {
|
||||
backupNotes(
|
||||
_encryptedNotes: BytesLike[],
|
||||
overrides?: CallOverrides
|
||||
): Promise<void>;
|
||||
backupNotes(_encryptedNotes: BytesLike[], overrides?: CallOverrides): Promise<void>;
|
||||
|
||||
deposit(
|
||||
_tornado: string,
|
||||
_commitment: BytesLike,
|
||||
_encryptedNote: BytesLike,
|
||||
overrides?: CallOverrides
|
||||
): Promise<void>;
|
||||
deposit(_tornado: string, _commitment: BytesLike, _encryptedNote: BytesLike, overrides?: CallOverrides): Promise<void>;
|
||||
|
||||
withdraw(
|
||||
_tornado: string,
|
||||
@ -187,32 +143,23 @@ export interface ProxyLightABI extends BaseContract {
|
||||
_relayer: string,
|
||||
_fee: BigNumberish,
|
||||
_refund: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
overrides?: CallOverrides,
|
||||
): Promise<void>;
|
||||
};
|
||||
|
||||
filters: {
|
||||
"EncryptedNote(address,bytes)"(
|
||||
sender?: string | null,
|
||||
encryptedNote?: null
|
||||
): EncryptedNoteEventFilter;
|
||||
EncryptedNote(
|
||||
sender?: string | null,
|
||||
encryptedNote?: null
|
||||
): EncryptedNoteEventFilter;
|
||||
'EncryptedNote(address,bytes)'(sender?: string | null, encryptedNote?: null): EncryptedNoteEventFilter;
|
||||
EncryptedNote(sender?: string | null, encryptedNote?: null): EncryptedNoteEventFilter;
|
||||
};
|
||||
|
||||
estimateGas: {
|
||||
backupNotes(
|
||||
_encryptedNotes: BytesLike[],
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
): Promise<BigNumber>;
|
||||
backupNotes(_encryptedNotes: BytesLike[], overrides?: Overrides & { from?: string | Promise<string> }): Promise<BigNumber>;
|
||||
|
||||
deposit(
|
||||
_tornado: string,
|
||||
_commitment: BytesLike,
|
||||
_encryptedNote: BytesLike,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> },
|
||||
): Promise<BigNumber>;
|
||||
|
||||
withdraw(
|
||||
@ -224,21 +171,21 @@ export interface ProxyLightABI extends BaseContract {
|
||||
_relayer: string,
|
||||
_fee: BigNumberish,
|
||||
_refund: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> },
|
||||
): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
populateTransaction: {
|
||||
backupNotes(
|
||||
_encryptedNotes: BytesLike[],
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
overrides?: Overrides & { from?: string | Promise<string> },
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
deposit(
|
||||
_tornado: string,
|
||||
_commitment: BytesLike,
|
||||
_encryptedNote: BytesLike,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> },
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
withdraw(
|
||||
@ -250,7 +197,7 @@ export interface ProxyLightABI extends BaseContract {
|
||||
_relayer: string,
|
||||
_fee: BigNumberish,
|
||||
_refund: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> },
|
||||
): Promise<PopulatedTransaction>;
|
||||
};
|
||||
}
|
482
src/contracts/TornadoABI.ts
Normal file
482
src/contracts/TornadoABI.ts
Normal file
@ -0,0 +1,482 @@
|
||||
/* Autogenerated file. Do not edit manually. */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type {
|
||||
BaseContract,
|
||||
BigNumber,
|
||||
BigNumberish,
|
||||
BytesLike,
|
||||
CallOverrides,
|
||||
ContractTransaction,
|
||||
Overrides,
|
||||
PayableOverrides,
|
||||
PopulatedTransaction,
|
||||
Signer,
|
||||
utils,
|
||||
} from 'ethers';
|
||||
import type { FunctionFragment, Result, EventFragment } from '@ethersproject/abi';
|
||||
import type { Listener, Provider } from '@ethersproject/providers';
|
||||
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common';
|
||||
|
||||
export interface TornadoABIInterface extends utils.Interface {
|
||||
contractName: 'TornadoABI';
|
||||
|
||||
functions: {
|
||||
'changeOperator(address)': FunctionFragment;
|
||||
'nullifierHashes(bytes32)': FunctionFragment;
|
||||
'withdraw(bytes,bytes32,bytes32,address,address,uint256,uint256)': FunctionFragment;
|
||||
'verifier()': FunctionFragment;
|
||||
'hashLeftRight(bytes32,bytes32)': FunctionFragment;
|
||||
'FIELD_SIZE()': FunctionFragment;
|
||||
'levels()': FunctionFragment;
|
||||
'operator()': FunctionFragment;
|
||||
'isKnownRoot(bytes32)': FunctionFragment;
|
||||
'commitments(bytes32)': FunctionFragment;
|
||||
'denomination()': FunctionFragment;
|
||||
'currentRootIndex()': FunctionFragment;
|
||||
'updateVerifier(address)': FunctionFragment;
|
||||
'deposit(bytes32)': FunctionFragment;
|
||||
'getLastRoot()': FunctionFragment;
|
||||
'roots(uint256)': FunctionFragment;
|
||||
'ROOT_HISTORY_SIZE()': FunctionFragment;
|
||||
'isSpent(bytes32)': FunctionFragment;
|
||||
'zeros(uint256)': FunctionFragment;
|
||||
'ZERO_VALUE()': FunctionFragment;
|
||||
'filledSubtrees(uint256)': FunctionFragment;
|
||||
'nextIndex()': FunctionFragment;
|
||||
};
|
||||
|
||||
getFunction(
|
||||
nameOrSignatureOrTopic:
|
||||
| 'changeOperator'
|
||||
| 'nullifierHashes'
|
||||
| 'withdraw'
|
||||
| 'verifier'
|
||||
| 'hashLeftRight'
|
||||
| 'FIELD_SIZE'
|
||||
| 'levels'
|
||||
| 'operator'
|
||||
| 'isKnownRoot'
|
||||
| 'commitments'
|
||||
| 'denomination'
|
||||
| 'currentRootIndex'
|
||||
| 'updateVerifier'
|
||||
| 'deposit'
|
||||
| 'getLastRoot'
|
||||
| 'roots'
|
||||
| 'ROOT_HISTORY_SIZE'
|
||||
| 'isSpent'
|
||||
| 'zeros'
|
||||
| 'ZERO_VALUE'
|
||||
| 'filledSubtrees'
|
||||
| 'nextIndex',
|
||||
): FunctionFragment;
|
||||
|
||||
encodeFunctionData(functionFragment: 'changeOperator', values: [string]): string;
|
||||
encodeFunctionData(functionFragment: 'nullifierHashes', values: [BytesLike]): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: 'withdraw',
|
||||
values: [BytesLike, BytesLike, BytesLike, string, string, BigNumberish, BigNumberish],
|
||||
): string;
|
||||
encodeFunctionData(functionFragment: 'verifier', values?: undefined): string;
|
||||
encodeFunctionData(functionFragment: 'hashLeftRight', values: [BytesLike, BytesLike]): string;
|
||||
encodeFunctionData(functionFragment: 'FIELD_SIZE', values?: undefined): string;
|
||||
encodeFunctionData(functionFragment: 'levels', values?: undefined): string;
|
||||
encodeFunctionData(functionFragment: 'operator', values?: undefined): string;
|
||||
encodeFunctionData(functionFragment: 'isKnownRoot', values: [BytesLike]): string;
|
||||
encodeFunctionData(functionFragment: 'commitments', values: [BytesLike]): string;
|
||||
encodeFunctionData(functionFragment: 'denomination', values?: undefined): string;
|
||||
encodeFunctionData(functionFragment: 'currentRootIndex', values?: undefined): string;
|
||||
encodeFunctionData(functionFragment: 'updateVerifier', values: [string]): string;
|
||||
encodeFunctionData(functionFragment: 'deposit', values: [BytesLike]): string;
|
||||
encodeFunctionData(functionFragment: 'getLastRoot', values?: undefined): string;
|
||||
encodeFunctionData(functionFragment: 'roots', values: [BigNumberish]): string;
|
||||
encodeFunctionData(functionFragment: 'ROOT_HISTORY_SIZE', values?: undefined): string;
|
||||
encodeFunctionData(functionFragment: 'isSpent', values: [BytesLike]): string;
|
||||
encodeFunctionData(functionFragment: 'zeros', values: [BigNumberish]): string;
|
||||
encodeFunctionData(functionFragment: 'ZERO_VALUE', values?: undefined): string;
|
||||
encodeFunctionData(functionFragment: 'filledSubtrees', values: [BigNumberish]): string;
|
||||
encodeFunctionData(functionFragment: 'nextIndex', values?: undefined): string;
|
||||
|
||||
decodeFunctionResult(functionFragment: 'changeOperator', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'nullifierHashes', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'withdraw', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'verifier', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'hashLeftRight', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'FIELD_SIZE', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'levels', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'operator', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'isKnownRoot', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'commitments', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'denomination', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'currentRootIndex', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'updateVerifier', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'deposit', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'getLastRoot', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'roots', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'ROOT_HISTORY_SIZE', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'isSpent', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'zeros', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'ZERO_VALUE', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'filledSubtrees', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'nextIndex', data: BytesLike): Result;
|
||||
|
||||
events: {
|
||||
'Deposit(bytes32,uint32,uint256)': EventFragment;
|
||||
'Withdrawal(address,bytes32,address,uint256)': EventFragment;
|
||||
};
|
||||
|
||||
getEvent(nameOrSignatureOrTopic: 'Deposit'): EventFragment;
|
||||
getEvent(nameOrSignatureOrTopic: 'Withdrawal'): EventFragment;
|
||||
}
|
||||
|
||||
export interface DepositEventObject {
|
||||
commitment: string;
|
||||
leafIndex: number;
|
||||
timestamp: BigNumber;
|
||||
}
|
||||
export type DepositEvent = TypedEvent<[string, number, BigNumber], DepositEventObject>;
|
||||
|
||||
export type DepositEventFilter = TypedEventFilter<DepositEvent>;
|
||||
|
||||
export interface WithdrawalEventObject {
|
||||
to: string;
|
||||
nullifierHash: string;
|
||||
relayer: string;
|
||||
fee: BigNumber;
|
||||
}
|
||||
export type WithdrawalEvent = TypedEvent<[string, string, string, BigNumber], WithdrawalEventObject>;
|
||||
|
||||
export type WithdrawalEventFilter = TypedEventFilter<WithdrawalEvent>;
|
||||
|
||||
export interface TornadoABI extends BaseContract {
|
||||
contractName: 'TornadoABI';
|
||||
|
||||
connect(signerOrProvider: Signer | Provider | string): this;
|
||||
attach(addressOrName: string): this;
|
||||
deployed(): Promise<this>;
|
||||
|
||||
interface: TornadoABIInterface;
|
||||
|
||||
queryFilter<TEvent extends TypedEvent>(
|
||||
event: TypedEventFilter<TEvent>,
|
||||
fromBlockOrBlockhash?: string | number | undefined,
|
||||
toBlock?: string | number | undefined,
|
||||
): Promise<Array<TEvent>>;
|
||||
|
||||
listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
|
||||
listeners(eventName?: string): Array<Listener>;
|
||||
removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
|
||||
removeAllListeners(eventName?: string): this;
|
||||
off: OnEvent<this>;
|
||||
on: OnEvent<this>;
|
||||
once: OnEvent<this>;
|
||||
removeListener: OnEvent<this>;
|
||||
|
||||
functions: {
|
||||
changeOperator(
|
||||
_newOperator: string,
|
||||
overrides?: Overrides & { from?: string | Promise<string> },
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
nullifierHashes(arg0: BytesLike, overrides?: CallOverrides): Promise<[boolean]>;
|
||||
|
||||
withdraw(
|
||||
_proof: BytesLike,
|
||||
_root: BytesLike,
|
||||
_nullifierHash: BytesLike,
|
||||
_recipient: string,
|
||||
_relayer: string,
|
||||
_fee: BigNumberish,
|
||||
_refund: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> },
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
verifier(overrides?: CallOverrides): Promise<[string]>;
|
||||
|
||||
hashLeftRight(_left: BytesLike, _right: BytesLike, overrides?: CallOverrides): Promise<[string]>;
|
||||
|
||||
FIELD_SIZE(overrides?: CallOverrides): Promise<[BigNumber]>;
|
||||
|
||||
levels(overrides?: CallOverrides): Promise<[number]>;
|
||||
|
||||
operator(overrides?: CallOverrides): Promise<[string]>;
|
||||
|
||||
isKnownRoot(_root: BytesLike, overrides?: CallOverrides): Promise<[boolean]>;
|
||||
|
||||
commitments(arg0: BytesLike, overrides?: CallOverrides): Promise<[boolean]>;
|
||||
|
||||
denomination(overrides?: CallOverrides): Promise<[BigNumber]>;
|
||||
|
||||
currentRootIndex(overrides?: CallOverrides): Promise<[number]>;
|
||||
|
||||
updateVerifier(
|
||||
_newVerifier: string,
|
||||
overrides?: Overrides & { from?: string | Promise<string> },
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
deposit(
|
||||
_commitment: BytesLike,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> },
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
getLastRoot(overrides?: CallOverrides): Promise<[string]>;
|
||||
|
||||
roots(arg0: BigNumberish, overrides?: CallOverrides): Promise<[string]>;
|
||||
|
||||
ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise<[number]>;
|
||||
|
||||
isSpent(_nullifierHash: BytesLike, overrides?: CallOverrides): Promise<[boolean]>;
|
||||
|
||||
zeros(arg0: BigNumberish, overrides?: CallOverrides): Promise<[string]>;
|
||||
|
||||
ZERO_VALUE(overrides?: CallOverrides): Promise<[BigNumber]>;
|
||||
|
||||
filledSubtrees(arg0: BigNumberish, overrides?: CallOverrides): Promise<[string]>;
|
||||
|
||||
nextIndex(overrides?: CallOverrides): Promise<[number]>;
|
||||
};
|
||||
|
||||
changeOperator(_newOperator: string, overrides?: Overrides & { from?: string | Promise<string> }): Promise<ContractTransaction>;
|
||||
|
||||
nullifierHashes(arg0: BytesLike, overrides?: CallOverrides): Promise<boolean>;
|
||||
|
||||
withdraw(
|
||||
_proof: BytesLike,
|
||||
_root: BytesLike,
|
||||
_nullifierHash: BytesLike,
|
||||
_recipient: string,
|
||||
_relayer: string,
|
||||
_fee: BigNumberish,
|
||||
_refund: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> },
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
verifier(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
hashLeftRight(_left: BytesLike, _right: BytesLike, overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
FIELD_SIZE(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
levels(overrides?: CallOverrides): Promise<number>;
|
||||
|
||||
operator(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
isKnownRoot(_root: BytesLike, overrides?: CallOverrides): Promise<boolean>;
|
||||
|
||||
commitments(arg0: BytesLike, overrides?: CallOverrides): Promise<boolean>;
|
||||
|
||||
denomination(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
currentRootIndex(overrides?: CallOverrides): Promise<number>;
|
||||
|
||||
updateVerifier(_newVerifier: string, overrides?: Overrides & { from?: string | Promise<string> }): Promise<ContractTransaction>;
|
||||
|
||||
deposit(
|
||||
_commitment: BytesLike,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> },
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
getLastRoot(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
roots(arg0: BigNumberish, overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise<number>;
|
||||
|
||||
isSpent(_nullifierHash: BytesLike, overrides?: CallOverrides): Promise<boolean>;
|
||||
|
||||
zeros(arg0: BigNumberish, overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
ZERO_VALUE(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
filledSubtrees(arg0: BigNumberish, overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
nextIndex(overrides?: CallOverrides): Promise<number>;
|
||||
|
||||
callStatic: {
|
||||
changeOperator(_newOperator: string, overrides?: CallOverrides): Promise<void>;
|
||||
|
||||
nullifierHashes(arg0: BytesLike, overrides?: CallOverrides): Promise<boolean>;
|
||||
|
||||
withdraw(
|
||||
_proof: BytesLike,
|
||||
_root: BytesLike,
|
||||
_nullifierHash: BytesLike,
|
||||
_recipient: string,
|
||||
_relayer: string,
|
||||
_fee: BigNumberish,
|
||||
_refund: BigNumberish,
|
||||
overrides?: CallOverrides,
|
||||
): Promise<void>;
|
||||
|
||||
verifier(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
hashLeftRight(_left: BytesLike, _right: BytesLike, overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
FIELD_SIZE(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
levels(overrides?: CallOverrides): Promise<number>;
|
||||
|
||||
operator(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
isKnownRoot(_root: BytesLike, overrides?: CallOverrides): Promise<boolean>;
|
||||
|
||||
commitments(arg0: BytesLike, overrides?: CallOverrides): Promise<boolean>;
|
||||
|
||||
denomination(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
currentRootIndex(overrides?: CallOverrides): Promise<number>;
|
||||
|
||||
updateVerifier(_newVerifier: string, overrides?: CallOverrides): Promise<void>;
|
||||
|
||||
deposit(_commitment: BytesLike, overrides?: CallOverrides): Promise<void>;
|
||||
|
||||
getLastRoot(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
roots(arg0: BigNumberish, overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise<number>;
|
||||
|
||||
isSpent(_nullifierHash: BytesLike, overrides?: CallOverrides): Promise<boolean>;
|
||||
|
||||
zeros(arg0: BigNumberish, overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
ZERO_VALUE(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
filledSubtrees(arg0: BigNumberish, overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
nextIndex(overrides?: CallOverrides): Promise<number>;
|
||||
};
|
||||
|
||||
filters: {
|
||||
'Deposit(bytes32,uint32,uint256)'(commitment?: BytesLike | null, leafIndex?: null, timestamp?: null): DepositEventFilter;
|
||||
Deposit(commitment?: BytesLike | null, leafIndex?: null, timestamp?: null): DepositEventFilter;
|
||||
|
||||
'Withdrawal(address,bytes32,address,uint256)'(
|
||||
to?: null,
|
||||
nullifierHash?: null,
|
||||
relayer?: string | null,
|
||||
fee?: null,
|
||||
): WithdrawalEventFilter;
|
||||
Withdrawal(to?: null, nullifierHash?: null, relayer?: string | null, fee?: null): WithdrawalEventFilter;
|
||||
};
|
||||
|
||||
estimateGas: {
|
||||
changeOperator(_newOperator: string, overrides?: Overrides & { from?: string | Promise<string> }): Promise<BigNumber>;
|
||||
|
||||
nullifierHashes(arg0: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
withdraw(
|
||||
_proof: BytesLike,
|
||||
_root: BytesLike,
|
||||
_nullifierHash: BytesLike,
|
||||
_recipient: string,
|
||||
_relayer: string,
|
||||
_fee: BigNumberish,
|
||||
_refund: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> },
|
||||
): Promise<BigNumber>;
|
||||
|
||||
verifier(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
hashLeftRight(_left: BytesLike, _right: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
FIELD_SIZE(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
levels(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
operator(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
isKnownRoot(_root: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
commitments(arg0: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
denomination(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
currentRootIndex(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
updateVerifier(_newVerifier: string, overrides?: Overrides & { from?: string | Promise<string> }): Promise<BigNumber>;
|
||||
|
||||
deposit(_commitment: BytesLike, overrides?: PayableOverrides & { from?: string | Promise<string> }): Promise<BigNumber>;
|
||||
|
||||
getLastRoot(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
roots(arg0: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
isSpent(_nullifierHash: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
zeros(arg0: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
ZERO_VALUE(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
filledSubtrees(arg0: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
|
||||
|
||||
nextIndex(overrides?: CallOverrides): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
populateTransaction: {
|
||||
changeOperator(
|
||||
_newOperator: string,
|
||||
overrides?: Overrides & { from?: string | Promise<string> },
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
nullifierHashes(arg0: BytesLike, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
withdraw(
|
||||
_proof: BytesLike,
|
||||
_root: BytesLike,
|
||||
_nullifierHash: BytesLike,
|
||||
_recipient: string,
|
||||
_relayer: string,
|
||||
_fee: BigNumberish,
|
||||
_refund: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> },
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
verifier(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
hashLeftRight(_left: BytesLike, _right: BytesLike, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
FIELD_SIZE(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
levels(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
operator(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
isKnownRoot(_root: BytesLike, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
commitments(arg0: BytesLike, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
denomination(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
currentRootIndex(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
updateVerifier(
|
||||
_newVerifier: string,
|
||||
overrides?: Overrides & { from?: string | Promise<string> },
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
deposit(
|
||||
_commitment: BytesLike,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> },
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
getLastRoot(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
roots(arg0: BigNumberish, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
ROOT_HISTORY_SIZE(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
isSpent(_nullifierHash: BytesLike, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
zeros(arg0: BigNumberish, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
ZERO_VALUE(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
filledSubtrees(arg0: BigNumberish, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
nextIndex(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
};
|
||||
}
|
@ -13,91 +13,52 @@ import type {
|
||||
PopulatedTransaction,
|
||||
Signer,
|
||||
utils,
|
||||
} from "ethers";
|
||||
import type { FunctionFragment, Result } from "@ethersproject/abi";
|
||||
import type { Listener, Provider } from "@ethersproject/providers";
|
||||
import type {
|
||||
TypedEventFilter,
|
||||
TypedEvent,
|
||||
TypedListener,
|
||||
OnEvent,
|
||||
} from "./common";
|
||||
} from 'ethers';
|
||||
import type { FunctionFragment, Result } from '@ethersproject/abi';
|
||||
import type { Listener, Provider } from '@ethersproject/providers';
|
||||
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from './common';
|
||||
|
||||
export interface TornadoProxyABIInterface extends utils.Interface {
|
||||
contractName: "TornadoProxyABI";
|
||||
contractName: 'TornadoProxyABI';
|
||||
|
||||
functions: {
|
||||
"governance()": FunctionFragment;
|
||||
"instances(address)": FunctionFragment;
|
||||
"resolve(bytes32)": FunctionFragment;
|
||||
"tornadoTrees()": FunctionFragment;
|
||||
"deposit(address,bytes32)": FunctionFragment;
|
||||
"updateInstances(address,bool)": FunctionFragment;
|
||||
"withdraw(address,bytes,bytes32,bytes32,address,address,uint256,uint256)": FunctionFragment;
|
||||
'governance()': FunctionFragment;
|
||||
'instances(address)': FunctionFragment;
|
||||
'resolve(bytes32)': FunctionFragment;
|
||||
'tornadoTrees()': FunctionFragment;
|
||||
'deposit(address,bytes32)': FunctionFragment;
|
||||
'updateInstances(address,bool)': FunctionFragment;
|
||||
'withdraw(address,bytes,bytes32,bytes32,address,address,uint256,uint256)': FunctionFragment;
|
||||
};
|
||||
|
||||
getFunction(
|
||||
nameOrSignatureOrTopic:
|
||||
| "governance"
|
||||
| "instances"
|
||||
| "resolve"
|
||||
| "tornadoTrees"
|
||||
| "deposit"
|
||||
| "updateInstances"
|
||||
| "withdraw"
|
||||
nameOrSignatureOrTopic: 'governance' | 'instances' | 'resolve' | 'tornadoTrees' | 'deposit' | 'updateInstances' | 'withdraw',
|
||||
): FunctionFragment;
|
||||
|
||||
encodeFunctionData(functionFragment: 'governance', values?: undefined): string;
|
||||
encodeFunctionData(functionFragment: 'instances', values: [string]): string;
|
||||
encodeFunctionData(functionFragment: 'resolve', values: [BytesLike]): string;
|
||||
encodeFunctionData(functionFragment: 'tornadoTrees', values?: undefined): string;
|
||||
encodeFunctionData(functionFragment: 'deposit', values: [string, BytesLike]): string;
|
||||
encodeFunctionData(functionFragment: 'updateInstances', values: [string, boolean]): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "governance",
|
||||
values?: undefined
|
||||
): string;
|
||||
encodeFunctionData(functionFragment: "instances", values: [string]): string;
|
||||
encodeFunctionData(functionFragment: "resolve", values: [BytesLike]): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "tornadoTrees",
|
||||
values?: undefined
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "deposit",
|
||||
values: [string, BytesLike]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "updateInstances",
|
||||
values: [string, boolean]
|
||||
): string;
|
||||
encodeFunctionData(
|
||||
functionFragment: "withdraw",
|
||||
values: [
|
||||
string,
|
||||
BytesLike,
|
||||
BytesLike,
|
||||
BytesLike,
|
||||
string,
|
||||
string,
|
||||
BigNumberish,
|
||||
BigNumberish
|
||||
]
|
||||
functionFragment: 'withdraw',
|
||||
values: [string, BytesLike, BytesLike, BytesLike, string, string, BigNumberish, BigNumberish],
|
||||
): string;
|
||||
|
||||
decodeFunctionResult(functionFragment: "governance", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "instances", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: "resolve", data: BytesLike): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "tornadoTrees",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result;
|
||||
decodeFunctionResult(
|
||||
functionFragment: "updateInstances",
|
||||
data: BytesLike
|
||||
): Result;
|
||||
decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'governance', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'instances', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'resolve', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'tornadoTrees', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'deposit', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'updateInstances', data: BytesLike): Result;
|
||||
decodeFunctionResult(functionFragment: 'withdraw', data: BytesLike): Result;
|
||||
|
||||
events: {};
|
||||
}
|
||||
|
||||
export interface TornadoProxyABI extends BaseContract {
|
||||
contractName: "TornadoProxyABI";
|
||||
contractName: 'TornadoProxyABI';
|
||||
|
||||
connect(signerOrProvider: Signer | Provider | string): this;
|
||||
attach(addressOrName: string): this;
|
||||
@ -108,16 +69,12 @@ export interface TornadoProxyABI extends BaseContract {
|
||||
queryFilter<TEvent extends TypedEvent>(
|
||||
event: TypedEventFilter<TEvent>,
|
||||
fromBlockOrBlockhash?: string | number | undefined,
|
||||
toBlock?: string | number | undefined
|
||||
toBlock?: string | number | undefined,
|
||||
): Promise<Array<TEvent>>;
|
||||
|
||||
listeners<TEvent extends TypedEvent>(
|
||||
eventFilter?: TypedEventFilter<TEvent>
|
||||
): Array<TypedListener<TEvent>>;
|
||||
listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
|
||||
listeners(eventName?: string): Array<Listener>;
|
||||
removeAllListeners<TEvent extends TypedEvent>(
|
||||
eventFilter: TypedEventFilter<TEvent>
|
||||
): this;
|
||||
removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
|
||||
removeAllListeners(eventName?: string): this;
|
||||
off: OnEvent<this>;
|
||||
on: OnEvent<this>;
|
||||
@ -136,13 +93,13 @@ export interface TornadoProxyABI extends BaseContract {
|
||||
deposit(
|
||||
tornado: string,
|
||||
commitment: BytesLike,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> },
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
updateInstances(
|
||||
instance: string,
|
||||
update: boolean,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
overrides?: Overrides & { from?: string | Promise<string> },
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
withdraw(
|
||||
@ -154,7 +111,7 @@ export interface TornadoProxyABI extends BaseContract {
|
||||
relayer: string,
|
||||
fee: BigNumberish,
|
||||
refund: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> },
|
||||
): Promise<ContractTransaction>;
|
||||
};
|
||||
|
||||
@ -169,13 +126,13 @@ export interface TornadoProxyABI extends BaseContract {
|
||||
deposit(
|
||||
tornado: string,
|
||||
commitment: BytesLike,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> },
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
updateInstances(
|
||||
instance: string,
|
||||
update: boolean,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
overrides?: Overrides & { from?: string | Promise<string> },
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
withdraw(
|
||||
@ -187,7 +144,7 @@ export interface TornadoProxyABI extends BaseContract {
|
||||
relayer: string,
|
||||
fee: BigNumberish,
|
||||
refund: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> },
|
||||
): Promise<ContractTransaction>;
|
||||
|
||||
callStatic: {
|
||||
@ -199,17 +156,9 @@ export interface TornadoProxyABI extends BaseContract {
|
||||
|
||||
tornadoTrees(overrides?: CallOverrides): Promise<string>;
|
||||
|
||||
deposit(
|
||||
tornado: string,
|
||||
commitment: BytesLike,
|
||||
overrides?: CallOverrides
|
||||
): Promise<void>;
|
||||
deposit(tornado: string, commitment: BytesLike, overrides?: CallOverrides): Promise<void>;
|
||||
|
||||
updateInstances(
|
||||
instance: string,
|
||||
update: boolean,
|
||||
overrides?: CallOverrides
|
||||
): Promise<void>;
|
||||
updateInstances(instance: string, update: boolean, overrides?: CallOverrides): Promise<void>;
|
||||
|
||||
withdraw(
|
||||
tornado: string,
|
||||
@ -220,7 +169,7 @@ export interface TornadoProxyABI extends BaseContract {
|
||||
relayer: string,
|
||||
fee: BigNumberish,
|
||||
refund: BigNumberish,
|
||||
overrides?: CallOverrides
|
||||
overrides?: CallOverrides,
|
||||
): Promise<void>;
|
||||
};
|
||||
|
||||
@ -238,13 +187,13 @@ export interface TornadoProxyABI extends BaseContract {
|
||||
deposit(
|
||||
tornado: string,
|
||||
commitment: BytesLike,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> },
|
||||
): Promise<BigNumber>;
|
||||
|
||||
updateInstances(
|
||||
instance: string,
|
||||
update: boolean,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
overrides?: Overrides & { from?: string | Promise<string> },
|
||||
): Promise<BigNumber>;
|
||||
|
||||
withdraw(
|
||||
@ -256,35 +205,29 @@ export interface TornadoProxyABI extends BaseContract {
|
||||
relayer: string,
|
||||
fee: BigNumberish,
|
||||
refund: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> },
|
||||
): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
populateTransaction: {
|
||||
governance(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
instances(
|
||||
arg0: string,
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
instances(arg0: string, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
resolve(
|
||||
node: BytesLike,
|
||||
overrides?: CallOverrides
|
||||
): Promise<PopulatedTransaction>;
|
||||
resolve(node: BytesLike, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
tornadoTrees(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
||||
|
||||
deposit(
|
||||
tornado: string,
|
||||
commitment: BytesLike,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> },
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
updateInstances(
|
||||
instance: string,
|
||||
update: boolean,
|
||||
overrides?: Overrides & { from?: string | Promise<string> }
|
||||
overrides?: Overrides & { from?: string | Promise<string> },
|
||||
): Promise<PopulatedTransaction>;
|
||||
|
||||
withdraw(
|
||||
@ -296,7 +239,7 @@ export interface TornadoProxyABI extends BaseContract {
|
||||
relayer: string,
|
||||
fee: BigNumberish,
|
||||
refund: BigNumberish,
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> }
|
||||
overrides?: PayableOverrides & { from?: string | Promise<string> },
|
||||
): Promise<PopulatedTransaction>;
|
||||
};
|
||||
}
|
@ -1,18 +1,14 @@
|
||||
/* Autogenerated file. Do not edit manually. */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { Listener } from "@ethersproject/providers";
|
||||
import type { Event, EventFilter } from "ethers";
|
||||
import type { Listener } from '@ethersproject/providers';
|
||||
import type { Event, EventFilter } from 'ethers';
|
||||
|
||||
export interface TypedEvent<
|
||||
TArgsArray extends Array<any> = any,
|
||||
TArgsObject = any
|
||||
> extends Event {
|
||||
export interface TypedEvent<TArgsArray extends Array<any> = any, TArgsObject = any> extends Event {
|
||||
args: TArgsArray & TArgsObject;
|
||||
}
|
||||
|
||||
export interface TypedEventFilter<_TEvent extends TypedEvent>
|
||||
extends EventFilter {}
|
||||
export interface TypedEventFilter<_TEvent extends TypedEvent> extends EventFilter {}
|
||||
|
||||
export interface TypedListener<TEvent extends TypedEvent> {
|
||||
(...listenerArg: [...__TypechainArgsArray<TEvent>, TEvent]): void;
|
||||
@ -21,10 +17,7 @@ export interface TypedListener<TEvent extends TypedEvent> {
|
||||
type __TypechainArgsArray<T> = T extends TypedEvent<infer U> ? U : never;
|
||||
|
||||
export interface OnEvent<TRes> {
|
||||
<TEvent extends TypedEvent>(
|
||||
eventFilter: TypedEventFilter<TEvent>,
|
||||
listener: TypedListener<TEvent>
|
||||
): TRes;
|
||||
<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>, listener: TypedListener<TEvent>): TRes;
|
||||
(eventName: string, listener: Listener): TRes;
|
||||
}
|
||||
|
||||
@ -32,13 +25,6 @@ export type MinEthersFactory<C, ARGS> = {
|
||||
deploy(...a: ARGS[]): Promise<C>;
|
||||
};
|
||||
|
||||
export type GetContractTypeFromFactory<F> = F extends MinEthersFactory<
|
||||
infer C,
|
||||
any
|
||||
>
|
||||
? C
|
||||
: never;
|
||||
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;
|
||||
export type GetARGsTypeFromFactory<F> = F extends MinEthersFactory<any, any> ? Parameters<F['deploy']> : never;
|
352
src/contracts/factories/AggregatorAbi__factory.ts
Normal file
352
src/contracts/factories/AggregatorAbi__factory.ts
Normal file
@ -0,0 +1,352 @@
|
||||
/* Autogenerated file. Do not edit manually. */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import { Contract, Signer, utils } from 'ethers';
|
||||
import type { Provider } from '@ethersproject/providers';
|
||||
import type { AggregatorAbi, AggregatorAbiInterface } from '../AggregatorAbi';
|
||||
|
||||
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 AggregatorAbi__factory {
|
||||
static readonly abi = _abi;
|
||||
static createInterface(): AggregatorAbiInterface {
|
||||
return new utils.Interface(_abi) as AggregatorAbiInterface;
|
||||
}
|
||||
static connect(address: string, signerOrProvider: Signer | Provider): AggregatorAbi {
|
||||
return new Contract(address, _abi, signerOrProvider) as AggregatorAbi;
|
||||
}
|
||||
}
|
274
src/contracts/factories/ERC20Abi__factory.ts
Normal file
274
src/contracts/factories/ERC20Abi__factory.ts
Normal file
@ -0,0 +1,274 @@
|
||||
/* Autogenerated file. Do not edit manually. */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import { Contract, Signer, utils } from 'ethers';
|
||||
import type { Provider } from '@ethersproject/providers';
|
||||
import type { ERC20Abi, ERC20AbiInterface } from '../ERC20Abi';
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
constant: true,
|
||||
inputs: [],
|
||||
name: 'totalSupply',
|
||||
outputs: [
|
||||
{
|
||||
internalType: 'uint256',
|
||||
name: '',
|
||||
type: 'uint256',
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [],
|
||||
name: '_totalSupply',
|
||||
outputs: [
|
||||
{
|
||||
internalType: 'uint256',
|
||||
name: '',
|
||||
type: 'uint256',
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [
|
||||
{
|
||||
internalType: 'address',
|
||||
name: 'who',
|
||||
type: 'address',
|
||||
},
|
||||
],
|
||||
name: 'balanceOf',
|
||||
outputs: [
|
||||
{
|
||||
internalType: 'uint256',
|
||||
name: '',
|
||||
type: 'uint256',
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: false,
|
||||
inputs: [
|
||||
{
|
||||
internalType: 'address',
|
||||
name: 'to',
|
||||
type: 'address',
|
||||
},
|
||||
{
|
||||
internalType: 'uint256',
|
||||
name: 'value',
|
||||
type: 'uint256',
|
||||
},
|
||||
],
|
||||
name: 'transfer',
|
||||
outputs: [],
|
||||
payable: false,
|
||||
stateMutability: 'nonpayable',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: 'address',
|
||||
name: 'owner',
|
||||
type: 'address',
|
||||
},
|
||||
{
|
||||
indexed: true,
|
||||
internalType: 'address',
|
||||
name: 'spender',
|
||||
type: 'address',
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: 'uint256',
|
||||
name: 'value',
|
||||
type: 'uint256',
|
||||
},
|
||||
],
|
||||
name: 'Approval',
|
||||
type: 'event',
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: 'address',
|
||||
name: 'from',
|
||||
type: 'address',
|
||||
},
|
||||
{
|
||||
indexed: true,
|
||||
internalType: 'address',
|
||||
name: 'to',
|
||||
type: 'address',
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: 'uint256',
|
||||
name: 'value',
|
||||
type: 'uint256',
|
||||
},
|
||||
],
|
||||
name: 'Transfer',
|
||||
type: 'event',
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [
|
||||
{
|
||||
internalType: 'address',
|
||||
name: 'owner',
|
||||
type: 'address',
|
||||
},
|
||||
{
|
||||
internalType: 'address',
|
||||
name: 'spender',
|
||||
type: 'address',
|
||||
},
|
||||
],
|
||||
name: 'allowance',
|
||||
outputs: [
|
||||
{
|
||||
internalType: 'uint256',
|
||||
name: '',
|
||||
type: 'uint256',
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: false,
|
||||
inputs: [
|
||||
{
|
||||
internalType: 'address',
|
||||
name: 'from',
|
||||
type: 'address',
|
||||
},
|
||||
{
|
||||
internalType: 'address',
|
||||
name: 'to',
|
||||
type: 'address',
|
||||
},
|
||||
{
|
||||
internalType: 'uint256',
|
||||
name: 'value',
|
||||
type: 'uint256',
|
||||
},
|
||||
],
|
||||
name: 'transferFrom',
|
||||
outputs: [],
|
||||
payable: false,
|
||||
stateMutability: 'nonpayable',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: false,
|
||||
inputs: [
|
||||
{
|
||||
internalType: 'address',
|
||||
name: 'spender',
|
||||
type: 'address',
|
||||
},
|
||||
{
|
||||
internalType: 'uint256',
|
||||
name: 'value',
|
||||
type: 'uint256',
|
||||
},
|
||||
],
|
||||
name: 'approve',
|
||||
outputs: [],
|
||||
payable: false,
|
||||
stateMutability: 'nonpayable',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: 'address',
|
||||
name: 'owner',
|
||||
type: 'address',
|
||||
},
|
||||
],
|
||||
name: 'nonces',
|
||||
outputs: [
|
||||
{
|
||||
internalType: 'uint256',
|
||||
name: '',
|
||||
type: 'uint256',
|
||||
},
|
||||
],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: 'address',
|
||||
name: 'owner',
|
||||
type: 'address',
|
||||
},
|
||||
{
|
||||
internalType: 'address',
|
||||
name: 'spender',
|
||||
type: 'address',
|
||||
},
|
||||
{
|
||||
internalType: 'uint256',
|
||||
name: 'amount',
|
||||
type: 'uint256',
|
||||
},
|
||||
{
|
||||
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: 'permit',
|
||||
outputs: [],
|
||||
stateMutability: 'nonpayable',
|
||||
type: 'function',
|
||||
},
|
||||
];
|
||||
|
||||
export class ERC20Abi__factory {
|
||||
static readonly abi = _abi;
|
||||
static createInterface(): ERC20AbiInterface {
|
||||
return new utils.Interface(_abi) as ERC20AbiInterface;
|
||||
}
|
||||
static connect(address: string, signerOrProvider: Signer | Provider): ERC20Abi {
|
||||
return new Contract(address, _abi, signerOrProvider) as ERC20Abi;
|
||||
}
|
||||
}
|
56
src/contracts/factories/MulticallAbi__factory.ts
Normal file
56
src/contracts/factories/MulticallAbi__factory.ts
Normal file
@ -0,0 +1,56 @@
|
||||
/* Autogenerated file. Do not edit manually. */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import { Contract, Signer, utils } from 'ethers';
|
||||
import type { Provider } from '@ethersproject/providers';
|
||||
import type { MulticallAbi, MulticallAbiInterface } from '../MulticallAbi';
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
components: [
|
||||
{
|
||||
internalType: 'address',
|
||||
name: 'to',
|
||||
type: 'address',
|
||||
},
|
||||
{
|
||||
internalType: 'bytes',
|
||||
name: 'data',
|
||||
type: 'bytes',
|
||||
},
|
||||
],
|
||||
internalType: 'struct MultiCall.Call[]',
|
||||
name: 'calls',
|
||||
type: 'tuple[]',
|
||||
},
|
||||
],
|
||||
name: 'multicall',
|
||||
outputs: [
|
||||
{
|
||||
internalType: 'bytes[]',
|
||||
name: 'results',
|
||||
type: 'bytes[]',
|
||||
},
|
||||
{
|
||||
internalType: 'bool[]',
|
||||
name: 'success',
|
||||
type: 'bool[]',
|
||||
},
|
||||
],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
];
|
||||
|
||||
export class MulticallAbi__factory {
|
||||
static readonly abi = _abi;
|
||||
static createInterface(): MulticallAbiInterface {
|
||||
return new utils.Interface(_abi) as MulticallAbiInterface;
|
||||
}
|
||||
static connect(address: string, signerOrProvider: Signer | Provider): MulticallAbi {
|
||||
return new Contract(address, _abi, signerOrProvider) as MulticallAbi;
|
||||
}
|
||||
}
|
352
src/contracts/factories/OffchainOracleAbi__factory.ts
Normal file
352
src/contracts/factories/OffchainOracleAbi__factory.ts
Normal file
@ -0,0 +1,352 @@
|
||||
/* Autogenerated file. Do not edit manually. */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import { Contract, Signer, utils } from 'ethers';
|
||||
import type { Provider } from '@ethersproject/providers';
|
||||
import type { OffchainOracleAbi, OffchainOracleAbiInterface } from '../OffchainOracleAbi';
|
||||
|
||||
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 OffchainOracleAbi__factory {
|
||||
static readonly abi = _abi;
|
||||
static createInterface(): OffchainOracleAbiInterface {
|
||||
return new utils.Interface(_abi) as OffchainOracleAbiInterface;
|
||||
}
|
||||
static connect(address: string, signerOrProvider: Signer | Provider): OffchainOracleAbi {
|
||||
return new Contract(address, _abi, signerOrProvider) as OffchainOracleAbi;
|
||||
}
|
||||
}
|
123
src/contracts/factories/ProxyLightABI__factory.ts
Normal file
123
src/contracts/factories/ProxyLightABI__factory.ts
Normal file
@ -0,0 +1,123 @@
|
||||
/* Autogenerated file. Do not edit manually. */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import { Contract, Signer, utils } from 'ethers';
|
||||
import type { Provider } from '@ethersproject/providers';
|
||||
import type { ProxyLightABI, ProxyLightABIInterface } from '../ProxyLightABI';
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: 'address',
|
||||
name: 'sender',
|
||||
type: 'address',
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: 'bytes',
|
||||
name: 'encryptedNote',
|
||||
type: 'bytes',
|
||||
},
|
||||
],
|
||||
name: 'EncryptedNote',
|
||||
type: 'event',
|
||||
},
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: 'bytes[]',
|
||||
name: '_encryptedNotes',
|
||||
type: 'bytes[]',
|
||||
},
|
||||
],
|
||||
name: 'backupNotes',
|
||||
outputs: [],
|
||||
stateMutability: 'nonpayable',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: 'contract ITornadoInstance',
|
||||
name: '_tornado',
|
||||
type: 'address',
|
||||
},
|
||||
{
|
||||
internalType: 'bytes32',
|
||||
name: '_commitment',
|
||||
type: 'bytes32',
|
||||
},
|
||||
{
|
||||
internalType: 'bytes',
|
||||
name: '_encryptedNote',
|
||||
type: 'bytes',
|
||||
},
|
||||
],
|
||||
name: 'deposit',
|
||||
outputs: [],
|
||||
stateMutability: 'payable',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: 'contract ITornadoInstance',
|
||||
name: '_tornado',
|
||||
type: 'address',
|
||||
},
|
||||
{
|
||||
internalType: 'bytes',
|
||||
name: '_proof',
|
||||
type: 'bytes',
|
||||
},
|
||||
{
|
||||
internalType: 'bytes32',
|
||||
name: '_root',
|
||||
type: 'bytes32',
|
||||
},
|
||||
{
|
||||
internalType: 'bytes32',
|
||||
name: '_nullifierHash',
|
||||
type: 'bytes32',
|
||||
},
|
||||
{
|
||||
internalType: 'address payable',
|
||||
name: '_recipient',
|
||||
type: 'address',
|
||||
},
|
||||
{
|
||||
internalType: 'address payable',
|
||||
name: '_relayer',
|
||||
type: 'address',
|
||||
},
|
||||
{
|
||||
internalType: 'uint256',
|
||||
name: '_fee',
|
||||
type: 'uint256',
|
||||
},
|
||||
{
|
||||
internalType: 'uint256',
|
||||
name: '_refund',
|
||||
type: 'uint256',
|
||||
},
|
||||
],
|
||||
name: 'withdraw',
|
||||
outputs: [],
|
||||
stateMutability: 'payable',
|
||||
type: 'function',
|
||||
},
|
||||
];
|
||||
|
||||
export class ProxyLightABI__factory {
|
||||
static readonly abi = _abi;
|
||||
static createInterface(): ProxyLightABIInterface {
|
||||
return new utils.Interface(_abi) as ProxyLightABIInterface;
|
||||
}
|
||||
static connect(address: string, signerOrProvider: Signer | Provider): ProxyLightABI {
|
||||
return new Contract(address, _abi, signerOrProvider) as ProxyLightABI;
|
||||
}
|
||||
}
|
516
src/contracts/factories/TornadoABI__factory.ts
Normal file
516
src/contracts/factories/TornadoABI__factory.ts
Normal file
@ -0,0 +1,516 @@
|
||||
/* Autogenerated file. Do not edit manually. */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import { Contract, Signer, utils } from 'ethers';
|
||||
import type { Provider } from '@ethersproject/providers';
|
||||
import type { TornadoABI, TornadoABIInterface } from '../TornadoABI';
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
constant: false,
|
||||
inputs: [
|
||||
{
|
||||
internalType: 'address',
|
||||
name: '_newOperator',
|
||||
type: 'address',
|
||||
},
|
||||
],
|
||||
name: 'changeOperator',
|
||||
outputs: [],
|
||||
payable: false,
|
||||
stateMutability: 'nonpayable',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [
|
||||
{
|
||||
internalType: 'bytes32',
|
||||
name: '',
|
||||
type: 'bytes32',
|
||||
},
|
||||
],
|
||||
name: 'nullifierHashes',
|
||||
outputs: [
|
||||
{
|
||||
internalType: 'bool',
|
||||
name: '',
|
||||
type: 'bool',
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: false,
|
||||
inputs: [
|
||||
{
|
||||
internalType: 'bytes',
|
||||
name: '_proof',
|
||||
type: 'bytes',
|
||||
},
|
||||
{
|
||||
internalType: 'bytes32',
|
||||
name: '_root',
|
||||
type: 'bytes32',
|
||||
},
|
||||
{
|
||||
internalType: 'bytes32',
|
||||
name: '_nullifierHash',
|
||||
type: 'bytes32',
|
||||
},
|
||||
{
|
||||
internalType: 'address payable',
|
||||
name: '_recipient',
|
||||
type: 'address',
|
||||
},
|
||||
{
|
||||
internalType: 'address payable',
|
||||
name: '_relayer',
|
||||
type: 'address',
|
||||
},
|
||||
{
|
||||
internalType: 'uint256',
|
||||
name: '_fee',
|
||||
type: 'uint256',
|
||||
},
|
||||
{
|
||||
internalType: 'uint256',
|
||||
name: '_refund',
|
||||
type: 'uint256',
|
||||
},
|
||||
],
|
||||
name: 'withdraw',
|
||||
outputs: [],
|
||||
payable: true,
|
||||
stateMutability: 'payable',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [],
|
||||
name: 'verifier',
|
||||
outputs: [
|
||||
{
|
||||
internalType: 'contract IVerifier',
|
||||
name: '',
|
||||
type: 'address',
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [
|
||||
{
|
||||
internalType: 'bytes32',
|
||||
name: '_left',
|
||||
type: 'bytes32',
|
||||
},
|
||||
{
|
||||
internalType: 'bytes32',
|
||||
name: '_right',
|
||||
type: 'bytes32',
|
||||
},
|
||||
],
|
||||
name: 'hashLeftRight',
|
||||
outputs: [
|
||||
{
|
||||
internalType: 'bytes32',
|
||||
name: '',
|
||||
type: 'bytes32',
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: 'pure',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [],
|
||||
name: 'FIELD_SIZE',
|
||||
outputs: [
|
||||
{
|
||||
internalType: 'uint256',
|
||||
name: '',
|
||||
type: 'uint256',
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [],
|
||||
name: 'levels',
|
||||
outputs: [
|
||||
{
|
||||
internalType: 'uint32',
|
||||
name: '',
|
||||
type: 'uint32',
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [],
|
||||
name: 'operator',
|
||||
outputs: [
|
||||
{
|
||||
internalType: 'address',
|
||||
name: '',
|
||||
type: 'address',
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [
|
||||
{
|
||||
internalType: 'bytes32',
|
||||
name: '_root',
|
||||
type: 'bytes32',
|
||||
},
|
||||
],
|
||||
name: 'isKnownRoot',
|
||||
outputs: [
|
||||
{
|
||||
internalType: 'bool',
|
||||
name: '',
|
||||
type: 'bool',
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [
|
||||
{
|
||||
internalType: 'bytes32',
|
||||
name: '',
|
||||
type: 'bytes32',
|
||||
},
|
||||
],
|
||||
name: 'commitments',
|
||||
outputs: [
|
||||
{
|
||||
internalType: 'bool',
|
||||
name: '',
|
||||
type: 'bool',
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [],
|
||||
name: 'denomination',
|
||||
outputs: [
|
||||
{
|
||||
internalType: 'uint256',
|
||||
name: '',
|
||||
type: 'uint256',
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [],
|
||||
name: 'currentRootIndex',
|
||||
outputs: [
|
||||
{
|
||||
internalType: 'uint32',
|
||||
name: '',
|
||||
type: 'uint32',
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: false,
|
||||
inputs: [
|
||||
{
|
||||
internalType: 'address',
|
||||
name: '_newVerifier',
|
||||
type: 'address',
|
||||
},
|
||||
],
|
||||
name: 'updateVerifier',
|
||||
outputs: [],
|
||||
payable: false,
|
||||
stateMutability: 'nonpayable',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: false,
|
||||
inputs: [
|
||||
{
|
||||
internalType: 'bytes32',
|
||||
name: '_commitment',
|
||||
type: 'bytes32',
|
||||
},
|
||||
],
|
||||
name: 'deposit',
|
||||
outputs: [],
|
||||
payable: true,
|
||||
stateMutability: 'payable',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [],
|
||||
name: 'getLastRoot',
|
||||
outputs: [
|
||||
{
|
||||
internalType: 'bytes32',
|
||||
name: '',
|
||||
type: 'bytes32',
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [
|
||||
{
|
||||
internalType: 'uint256',
|
||||
name: '',
|
||||
type: 'uint256',
|
||||
},
|
||||
],
|
||||
name: 'roots',
|
||||
outputs: [
|
||||
{
|
||||
internalType: 'bytes32',
|
||||
name: '',
|
||||
type: 'bytes32',
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [],
|
||||
name: 'ROOT_HISTORY_SIZE',
|
||||
outputs: [
|
||||
{
|
||||
internalType: 'uint32',
|
||||
name: '',
|
||||
type: 'uint32',
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [
|
||||
{
|
||||
internalType: 'bytes32',
|
||||
name: '_nullifierHash',
|
||||
type: 'bytes32',
|
||||
},
|
||||
],
|
||||
name: 'isSpent',
|
||||
outputs: [
|
||||
{
|
||||
internalType: 'bool',
|
||||
name: '',
|
||||
type: 'bool',
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [
|
||||
{
|
||||
internalType: 'uint256',
|
||||
name: '',
|
||||
type: 'uint256',
|
||||
},
|
||||
],
|
||||
name: 'zeros',
|
||||
outputs: [
|
||||
{
|
||||
internalType: 'bytes32',
|
||||
name: '',
|
||||
type: 'bytes32',
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [],
|
||||
name: 'ZERO_VALUE',
|
||||
outputs: [
|
||||
{
|
||||
internalType: 'uint256',
|
||||
name: '',
|
||||
type: 'uint256',
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [
|
||||
{
|
||||
internalType: 'uint256',
|
||||
name: '',
|
||||
type: 'uint256',
|
||||
},
|
||||
],
|
||||
name: 'filledSubtrees',
|
||||
outputs: [
|
||||
{
|
||||
internalType: 'bytes32',
|
||||
name: '',
|
||||
type: 'bytes32',
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
constant: true,
|
||||
inputs: [],
|
||||
name: 'nextIndex',
|
||||
outputs: [
|
||||
{
|
||||
internalType: 'uint32',
|
||||
name: '',
|
||||
type: 'uint32',
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: 'contract IVerifier',
|
||||
name: '_verifier',
|
||||
type: 'address',
|
||||
},
|
||||
{
|
||||
internalType: 'uint256',
|
||||
name: '_denomination',
|
||||
type: 'uint256',
|
||||
},
|
||||
{
|
||||
internalType: 'uint32',
|
||||
name: '_merkleTreeHeight',
|
||||
type: 'uint32',
|
||||
},
|
||||
{
|
||||
internalType: 'address',
|
||||
name: '_operator',
|
||||
type: 'address',
|
||||
},
|
||||
],
|
||||
payable: false,
|
||||
stateMutability: 'nonpayable',
|
||||
type: 'constructor',
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: 'bytes32',
|
||||
name: 'commitment',
|
||||
type: 'bytes32',
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: 'uint32',
|
||||
name: 'leafIndex',
|
||||
type: 'uint32',
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: 'uint256',
|
||||
name: 'timestamp',
|
||||
type: 'uint256',
|
||||
},
|
||||
],
|
||||
name: 'Deposit',
|
||||
type: 'event',
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: false,
|
||||
internalType: 'address',
|
||||
name: 'to',
|
||||
type: 'address',
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: 'bytes32',
|
||||
name: 'nullifierHash',
|
||||
type: 'bytes32',
|
||||
},
|
||||
{
|
||||
indexed: true,
|
||||
internalType: 'address',
|
||||
name: 'relayer',
|
||||
type: 'address',
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: 'uint256',
|
||||
name: 'fee',
|
||||
type: 'uint256',
|
||||
},
|
||||
],
|
||||
name: 'Withdrawal',
|
||||
type: 'event',
|
||||
},
|
||||
];
|
||||
|
||||
export class TornadoABI__factory {
|
||||
static readonly abi = _abi;
|
||||
static createInterface(): TornadoABIInterface {
|
||||
return new utils.Interface(_abi) as TornadoABIInterface;
|
||||
}
|
||||
static connect(address: string, signerOrProvider: Signer | Provider): TornadoABI {
|
||||
return new Contract(address, _abi, signerOrProvider) as TornadoABI;
|
||||
}
|
||||
}
|
189
src/contracts/factories/TornadoProxyABI__factory.ts
Normal file
189
src/contracts/factories/TornadoProxyABI__factory.ts
Normal file
@ -0,0 +1,189 @@
|
||||
/* Autogenerated file. Do not edit manually. */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import { Contract, Signer, utils } from 'ethers';
|
||||
import type { Provider } from '@ethersproject/providers';
|
||||
import type { TornadoProxyABI, TornadoProxyABIInterface } from '../TornadoProxyABI';
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: 'bytes32',
|
||||
name: '_tornadoTrees',
|
||||
type: 'bytes32',
|
||||
},
|
||||
{
|
||||
internalType: 'bytes32',
|
||||
name: '_governance',
|
||||
type: 'bytes32',
|
||||
},
|
||||
{
|
||||
internalType: 'contract ITornado[]',
|
||||
name: '_instances',
|
||||
type: 'address[]',
|
||||
},
|
||||
],
|
||||
stateMutability: 'nonpayable',
|
||||
type: 'constructor',
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: 'governance',
|
||||
outputs: [
|
||||
{
|
||||
internalType: 'address',
|
||||
name: '',
|
||||
type: 'address',
|
||||
},
|
||||
],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: 'contract ITornado',
|
||||
name: '',
|
||||
type: 'address',
|
||||
},
|
||||
],
|
||||
name: 'instances',
|
||||
outputs: [
|
||||
{
|
||||
internalType: 'bool',
|
||||
name: '',
|
||||
type: 'bool',
|
||||
},
|
||||
],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: 'bytes32',
|
||||
name: 'node',
|
||||
type: 'bytes32',
|
||||
},
|
||||
],
|
||||
name: 'resolve',
|
||||
outputs: [
|
||||
{
|
||||
internalType: 'address',
|
||||
name: '',
|
||||
type: 'address',
|
||||
},
|
||||
],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: 'tornadoTrees',
|
||||
outputs: [
|
||||
{
|
||||
internalType: 'contract ITornadoTrees',
|
||||
name: '',
|
||||
type: 'address',
|
||||
},
|
||||
],
|
||||
stateMutability: 'view',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: 'contract ITornado',
|
||||
name: 'tornado',
|
||||
type: 'address',
|
||||
},
|
||||
{
|
||||
internalType: 'bytes32',
|
||||
name: 'commitment',
|
||||
type: 'bytes32',
|
||||
},
|
||||
],
|
||||
name: 'deposit',
|
||||
outputs: [],
|
||||
stateMutability: 'payable',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: 'contract ITornado',
|
||||
name: 'instance',
|
||||
type: 'address',
|
||||
},
|
||||
{
|
||||
internalType: 'bool',
|
||||
name: 'update',
|
||||
type: 'bool',
|
||||
},
|
||||
],
|
||||
name: 'updateInstances',
|
||||
outputs: [],
|
||||
stateMutability: 'nonpayable',
|
||||
type: 'function',
|
||||
},
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: 'contract ITornado',
|
||||
name: 'tornado',
|
||||
type: 'address',
|
||||
},
|
||||
{
|
||||
internalType: 'bytes',
|
||||
name: 'proof',
|
||||
type: 'bytes',
|
||||
},
|
||||
{
|
||||
internalType: 'bytes32',
|
||||
name: 'root',
|
||||
type: 'bytes32',
|
||||
},
|
||||
{
|
||||
internalType: 'bytes32',
|
||||
name: 'nullifierHash',
|
||||
type: 'bytes32',
|
||||
},
|
||||
{
|
||||
internalType: 'address payable',
|
||||
name: 'recipient',
|
||||
type: 'address',
|
||||
},
|
||||
{
|
||||
internalType: 'address payable',
|
||||
name: 'relayer',
|
||||
type: 'address',
|
||||
},
|
||||
{
|
||||
internalType: 'uint256',
|
||||
name: 'fee',
|
||||
type: 'uint256',
|
||||
},
|
||||
{
|
||||
internalType: 'uint256',
|
||||
name: 'refund',
|
||||
type: 'uint256',
|
||||
},
|
||||
],
|
||||
name: 'withdraw',
|
||||
outputs: [],
|
||||
stateMutability: 'payable',
|
||||
type: 'function',
|
||||
},
|
||||
];
|
||||
|
||||
export class TornadoProxyABI__factory {
|
||||
static readonly abi = _abi;
|
||||
static createInterface(): TornadoProxyABIInterface {
|
||||
return new utils.Interface(_abi) as TornadoProxyABIInterface;
|
||||
}
|
||||
static connect(address: string, signerOrProvider: Signer | Provider): TornadoProxyABI {
|
||||
return new Contract(address, _abi, signerOrProvider) as TornadoProxyABI;
|
||||
}
|
||||
}
|
10
src/contracts/factories/index.ts
Normal file
10
src/contracts/factories/index.ts
Normal file
@ -0,0 +1,10 @@
|
||||
/* Autogenerated file. Do not edit manually. */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export { AggregatorAbi__factory } from './AggregatorAbi__factory';
|
||||
export { ERC20Abi__factory } from './ERC20Abi__factory';
|
||||
export { MulticallAbi__factory } from './MulticallAbi__factory';
|
||||
export { OffchainOracleAbi__factory } from './OffchainOracleAbi__factory';
|
||||
export { ProxyLightABI__factory } from './ProxyLightABI__factory';
|
||||
export { TornadoABI__factory } from './TornadoABI__factory';
|
||||
export { TornadoProxyABI__factory } from './TornadoProxyABI__factory';
|
18
src/contracts/index.ts
Normal file
18
src/contracts/index.ts
Normal file
@ -0,0 +1,18 @@
|
||||
/* Autogenerated file. Do not edit manually. */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type { AggregatorAbi } from './AggregatorAbi';
|
||||
export type { ERC20Abi } from './ERC20Abi';
|
||||
export type { MulticallAbi } from './MulticallAbi';
|
||||
export type { OffchainOracleAbi } from './OffchainOracleAbi';
|
||||
export type { ProxyLightABI } from './ProxyLightABI';
|
||||
export type { TornadoABI } from './TornadoABI';
|
||||
export type { TornadoProxyABI } from './TornadoProxyABI';
|
||||
export * as factories from './factories';
|
||||
export { AggregatorAbi__factory } from './factories/AggregatorAbi__factory';
|
||||
export { ERC20Abi__factory } from './factories/ERC20Abi__factory';
|
||||
export { MulticallAbi__factory } from './factories/MulticallAbi__factory';
|
||||
export { OffchainOracleAbi__factory } from './factories/OffchainOracleAbi__factory';
|
||||
export { ProxyLightABI__factory } from './factories/ProxyLightABI__factory';
|
||||
export { TornadoABI__factory } from './factories/TornadoABI__factory';
|
||||
export { TornadoProxyABI__factory } from './factories/TornadoProxyABI__factory';
|
4
src/healthWorker.ts
Normal file
4
src/healthWorker.ts
Normal file
@ -0,0 +1,4 @@
|
||||
import { healthWorker, priceWorker } from './queue/worker';
|
||||
|
||||
priceWorker();
|
||||
healthWorker();
|
@ -4,7 +4,7 @@ import {
|
||||
OffchainOracleAbi__factory,
|
||||
ProxyLightABI__factory,
|
||||
TornadoProxyABI__factory,
|
||||
} from '../../contracts';
|
||||
} from '../contracts';
|
||||
import { providers } from 'ethers';
|
||||
import { mainnetRpcUrl, multiCallAddress, netId, offchainOracleAddress, rpcUrl } from '../config';
|
||||
|
||||
@ -12,7 +12,6 @@ export function getProvider(isStatic = true, customRpcUrl?: string, chainId = ne
|
||||
const url = customRpcUrl || rpcUrl;
|
||||
if (isStatic) return new providers.StaticJsonRpcProvider(url, chainId);
|
||||
else return new providers.JsonRpcProvider(url, chainId);
|
||||
|
||||
}
|
||||
|
||||
export const getTornadoProxyContract = (proxyAddress: string) => {
|
||||
@ -22,7 +21,6 @@ export const getTornadoProxyLightContract = (proxyAddress: string) => {
|
||||
return ProxyLightABI__factory.connect(proxyAddress, getProvider());
|
||||
};
|
||||
|
||||
|
||||
export const getOffchainOracleContract = () => {
|
||||
return OffchainOracleAbi__factory.connect(offchainOracleAddress, getProvider(true, mainnetRpcUrl));
|
||||
};
|
||||
|
@ -30,7 +30,6 @@ export class RedisStore {
|
||||
private _subscriber: Redis;
|
||||
private _publisher: Redis;
|
||||
private _client: Redis;
|
||||
|
||||
}
|
||||
|
||||
export default () => container.resolve(RedisStore);
|
||||
|
@ -2,7 +2,6 @@ import 'reflect-metadata';
|
||||
import { HealthQueueHelper, PriceQueueHelper, RelayerQueueHelper } from './';
|
||||
import { configService, getHealthService } from '../services';
|
||||
|
||||
|
||||
export const priceWorker = async () => {
|
||||
await configService.init();
|
||||
const healthService = getHealthService();
|
||||
@ -40,7 +39,6 @@ export const healthWorker = async () => {
|
||||
console.log(`Job ${job.id} completed with result: `, result);
|
||||
});
|
||||
health.worker.on('failed', (job, error) => {
|
||||
|
||||
// console.log(error);
|
||||
console.log(error);
|
||||
});
|
||||
};
|
||||
|
@ -2,7 +2,6 @@ import 'reflect-metadata';
|
||||
import { configService, getHealthService } from './services';
|
||||
|
||||
(async () => {
|
||||
|
||||
try {
|
||||
await configService.init();
|
||||
const healthService = getHealthService();
|
||||
@ -10,6 +9,4 @@ import { configService, getHealthService } from './services';
|
||||
} catch (e) {
|
||||
console.error('Top level catch', e);
|
||||
}
|
||||
|
||||
})();
|
||||
|
||||
|
@ -13,22 +13,17 @@ import {
|
||||
tornToken,
|
||||
} from '../config';
|
||||
import { Token } from '../types';
|
||||
import {
|
||||
getProvider,
|
||||
getTornadoProxyContract,
|
||||
getTornadoProxyLightContract,
|
||||
getTornTokenContract,
|
||||
} from '../modules/contracts';
|
||||
import { getProvider, getTornadoProxyContract, getTornadoProxyLightContract, getTornTokenContract } from '../modules/contracts';
|
||||
import { resolve } from '../modules';
|
||||
import { ERC20Abi, ProxyLightABI, TornadoProxyABI } from '../../contracts';
|
||||
import { availableIds, netIds, NetInstances } from '../../../torn-token';
|
||||
import { ERC20Abi, ProxyLightABI, TornadoProxyABI } from '../contracts';
|
||||
import { availableIds, netIds, NetInstances } from 'torn-token';
|
||||
import { getAddress } from 'ethers/lib/utils';
|
||||
import { BigNumber, providers, Wallet } from 'ethers';
|
||||
import { container, singleton } from 'tsyringe';
|
||||
import { GasPrice } from 'gas-price-oracle/lib/types';
|
||||
import { FallbackGasPrices } from 'gas-price-oracle';
|
||||
import { RedisStore } from '../modules/redis';
|
||||
|
||||
type relayerQueueName = `relayer_${availableIds}`
|
||||
type relayerQueueName = `relayer_${availableIds}`;
|
||||
|
||||
@singleton()
|
||||
export class ConfigService {
|
||||
@ -48,11 +43,15 @@ export class ConfigService {
|
||||
public readonly rpcUrl = rpcUrl;
|
||||
isInit: boolean;
|
||||
nativeCurrency: string;
|
||||
fallbackGasPrices: GasPrice;
|
||||
fallbackGasPrices: FallbackGasPrices;
|
||||
private _tokenAddress: string;
|
||||
private _tokenContract: ERC20Abi;
|
||||
balances: { MAIN: { warn: string; critical: string; }; TORN: { warn: string; critical: string; }; };
|
||||
balances: {
|
||||
MAIN: { warn: string; critical: string };
|
||||
TORN: { warn: string; critical: string };
|
||||
};
|
||||
host: string;
|
||||
version: string;
|
||||
|
||||
constructor(private store: RedisStore) {
|
||||
this.netIdKey = `netId${this.netId}`;
|
||||
@ -64,8 +63,14 @@ export class ConfigService {
|
||||
this.mainnentProvider = getProvider(false, mainnetRpcUrl, 1);
|
||||
this.wallet = new Wallet(this.privateKey, this.provider);
|
||||
this.balances = {
|
||||
MAIN: { warn: BigNumber.from(minimumBalance).mul(150).div(100).toString(), critical: minimumBalance },
|
||||
TORN: { warn: BigNumber.from(minimumTornBalance).mul(2).toString(), critical: minimumTornBalance },
|
||||
MAIN: {
|
||||
warn: BigNumber.from(minimumBalance).mul(150).div(100).toString(),
|
||||
critical: minimumBalance,
|
||||
},
|
||||
TORN: {
|
||||
warn: BigNumber.from(minimumTornBalance).mul(2).toString(),
|
||||
critical: minimumTornBalance,
|
||||
},
|
||||
};
|
||||
this._fillInstanceMap();
|
||||
}
|
||||
@ -83,9 +88,13 @@ export class ConfigService {
|
||||
// TODO
|
||||
for (const [currency, { instanceAddress, symbol, decimals }] of Object.entries(this.instances)) {
|
||||
for (const [amount, address] of Object.entries(instanceAddress)) {
|
||||
if (address) this.addressMap.set(getAddress(address), {
|
||||
currency, amount, symbol, decimals,
|
||||
});
|
||||
if (address)
|
||||
this.addressMap.set(getAddress(address), {
|
||||
currency,
|
||||
amount,
|
||||
symbol,
|
||||
decimals,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -97,7 +106,6 @@ export class ConfigService {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async init() {
|
||||
try {
|
||||
if (this.isInit) return;
|
||||
@ -121,11 +129,15 @@ export class ConfigService {
|
||||
// TODO get instances from registry
|
||||
|
||||
this.tokens = [tornToken, ...Object.values(torn.instances['netId1'])]
|
||||
.map<Token>(el => (el.tokenAddress && {
|
||||
address: getAddress(el.tokenAddress),
|
||||
decimals: el.decimals,
|
||||
symbol: el.symbol,
|
||||
})).filter(Boolean);
|
||||
.map<Token>(
|
||||
(el) =>
|
||||
el.tokenAddress && {
|
||||
address: getAddress(el.tokenAddress),
|
||||
decimals: el.decimals,
|
||||
symbol: el.symbol,
|
||||
},
|
||||
)
|
||||
.filter(Boolean);
|
||||
console.log(
|
||||
'Configuration completed\n',
|
||||
`-- netId: ${this.netId}\n`,
|
||||
@ -140,7 +152,7 @@ export class ConfigService {
|
||||
}
|
||||
|
||||
async clearRedisState() {
|
||||
const queueKeys = (await this.store.client.keys('bull:*')).filter(s => s.indexOf('relayer') === -1);
|
||||
const queueKeys = (await this.store.client.keys('bull:*')).filter((s) => s.indexOf('relayer') === -1);
|
||||
const errorKeys = await this.store.client.keys('errors:*');
|
||||
// const alertKeys = await this.store.client.keys('alerts:*');
|
||||
const keys = [...queueKeys, ...errorKeys];
|
||||
@ -150,14 +162,13 @@ export class ConfigService {
|
||||
getInstance(address: string) {
|
||||
return this.addressMap.get(getAddress(address));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
type InstanceProps = {
|
||||
currency: string,
|
||||
amount: string,
|
||||
symbol: string,
|
||||
decimals: number,
|
||||
}
|
||||
currency: string;
|
||||
amount: string;
|
||||
symbol: string;
|
||||
decimals: number;
|
||||
};
|
||||
|
||||
export default container.resolve(ConfigService);
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { getMultiCallContract, getOffchainOracleContract } from '../modules/contracts';
|
||||
import { MulticallAbi, OffchainOracleAbi } from '../../contracts';
|
||||
import { MultiCall } from '../../contracts/MulticallAbi';
|
||||
import { MulticallAbi, OffchainOracleAbi } from '../contracts';
|
||||
import { MultiCall } from '../contracts/MulticallAbi';
|
||||
import { BigNumber } from 'ethers';
|
||||
import { defaultAbiCoder } from 'ethers/lib/utils';
|
||||
import { Token } from '../types';
|
||||
@ -20,9 +20,7 @@ export class PriceService {
|
||||
prepareCallData(tokens: Token[]): MultiCall.CallStruct[] {
|
||||
return tokens.map((token) => ({
|
||||
to: this.oracle.address,
|
||||
data: this.oracle.interface.encodeFunctionData('getRateToEth',
|
||||
[token.address, true],
|
||||
),
|
||||
data: this.oracle.interface.encodeFunctionData('getRateToEth', [token.address, true]),
|
||||
}));
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { TransactionData, TxManager } from 'tx-manager';
|
||||
import { GasPriceOracle } from 'gas-price-oracle';
|
||||
import { Provider } from '@ethersproject/providers';
|
||||
import { AlchemyProvider, Provider } from '@ethersproject/providers';
|
||||
import { formatEther, parseUnits } from 'ethers/lib/utils';
|
||||
import { BigNumber, BigNumberish, BytesLike } from 'ethers';
|
||||
import { ProxyLightABI, TornadoProxyABI } from '../../contracts';
|
||||
import { ProxyLightABI, TornadoProxyABI } from '../contracts';
|
||||
import { gasLimits, tornadoServiceFee } from '../config';
|
||||
import { JobStatus, RelayerJobType } from '../types';
|
||||
import { PriceService } from './price.service';
|
||||
@ -14,17 +14,10 @@ import { container, injectable } from 'tsyringe';
|
||||
import { parseJSON } from '../modules/utils';
|
||||
|
||||
export type WithdrawalData = {
|
||||
contract: string,
|
||||
proof: BytesLike,
|
||||
args: [
|
||||
BytesLike,
|
||||
BytesLike,
|
||||
string,
|
||||
string,
|
||||
BigNumberish,
|
||||
BigNumberish
|
||||
]
|
||||
}
|
||||
contract: string;
|
||||
proof: BytesLike;
|
||||
args: [BytesLike, BytesLike, string, string, BigNumberish, BigNumberish];
|
||||
};
|
||||
|
||||
class ExecutionError extends Error {
|
||||
constructor(message: string, code?: string) {
|
||||
@ -51,11 +44,17 @@ export class TxService {
|
||||
const { privateKey, rpcUrl, netId } = this.config;
|
||||
this.tornadoProxy = this.config.proxyContract;
|
||||
this.provider = this.tornadoProxy.provider;
|
||||
this.txManager = new TxManager({ privateKey, rpcUrl, config: { THROW_ON_REVERT: true }, provider: this.provider });
|
||||
const prov = new AlchemyProvider(netId);
|
||||
this.txManager = new TxManager({
|
||||
privateKey,
|
||||
rpcUrl,
|
||||
config: { THROW_ON_REVERT: true },
|
||||
provider: prov,
|
||||
});
|
||||
this.oracle = new GasPriceOracle({
|
||||
defaultRpc: rpcUrl,
|
||||
chainId: netId,
|
||||
defaultFallbackGasPrices: this.config?.fallbackGasPrices,
|
||||
fallbackGasPrices: this.config?.fallbackGasPrices,
|
||||
});
|
||||
}
|
||||
|
||||
@ -69,16 +68,17 @@ export class TxService {
|
||||
try {
|
||||
const currentTx = this.txManager.createTx(tx);
|
||||
|
||||
const receipt = await currentTx.send()
|
||||
.on('transactionHash', async txHash => {
|
||||
const receipt = await currentTx
|
||||
.send()
|
||||
.on('transactionHash', async (txHash) => {
|
||||
console.log('Transaction sent, txHash: ', txHash);
|
||||
await this.updateJobData({ txHash, status: JobStatus.SENT });
|
||||
})
|
||||
.on('mined', async receipt => {
|
||||
.on('mined', async (receipt) => {
|
||||
console.log('Transaction mined in block', receipt.blockNumber);
|
||||
await this.updateJobData({ status: JobStatus.MINED });
|
||||
})
|
||||
.on('confirmations', async confirmations => {
|
||||
.on('confirmations', async (confirmations) => {
|
||||
console.log('Transaction confirmations: ', confirmations);
|
||||
await this.updateJobData({ confirmations });
|
||||
});
|
||||
@ -113,7 +113,7 @@ export class TxService {
|
||||
const [fee, refund] = [args[4], args[5]].map(BigNumber.from);
|
||||
const gasPrice = await this.getGasPrice();
|
||||
// TODO check refund value
|
||||
const operationCost = gasPrice.mul((gasLimits[RelayerJobType.TORNADO_WITHDRAW]));
|
||||
const operationCost = gasPrice.mul(gasLimits[RelayerJobType.TORNADO_WITHDRAW]);
|
||||
|
||||
const serviceFee = parseUnits(amount, decimals)
|
||||
.mul(`${tornadoServiceFee * 1e10}`)
|
||||
@ -124,30 +124,23 @@ export class TxService {
|
||||
if (!this.config.isLightMode && currency !== 'eth') {
|
||||
const ethPrice = await this.priceService.getPrice(currency);
|
||||
const numerator = BigNumber.from(10).pow(decimals);
|
||||
desiredFee = operationCost
|
||||
.add(refund)
|
||||
.mul(numerator)
|
||||
.div(ethPrice)
|
||||
.add(serviceFee);
|
||||
desiredFee = operationCost.add(refund).mul(numerator).div(ethPrice).add(serviceFee);
|
||||
}
|
||||
console.log(
|
||||
{
|
||||
sentFee: formatEther(fee),
|
||||
desiredFee: formatEther(desiredFee),
|
||||
serviceFee: formatEther(serviceFee),
|
||||
},
|
||||
);
|
||||
console.log({
|
||||
sentFee: formatEther(fee),
|
||||
desiredFee: formatEther(desiredFee),
|
||||
serviceFee: formatEther(serviceFee),
|
||||
});
|
||||
if (fee.lt(desiredFee)) {
|
||||
throw new Error('Provided fee is not enough. Probably it is a Gas Price spike, try to resubmit.');
|
||||
}
|
||||
}
|
||||
|
||||
async getGasPrice(): Promise<BigNumber> {
|
||||
// TODO eip https://eips.ethereum.org/EIPS/eip-1559
|
||||
const { baseFeePerGas = 0 } = await this.provider.getBlock('latest');
|
||||
if (baseFeePerGas) return await this.provider.getGasPrice();
|
||||
const { fast = 0 } = await this.oracle.gasPrices();
|
||||
return parseUnits(String(fast), 'gwei');
|
||||
const gasPrices = await this.oracle.gasPrices({});
|
||||
let gasPrice = gasPrices['fast'];
|
||||
if ('maxFeePerGas' in gasPrices) gasPrice = gasPrices['maxFeePerGas'];
|
||||
return parseUnits(String(gasPrice), 'gwei');
|
||||
}
|
||||
}
|
||||
|
||||
|
3
src/txWorker.ts
Normal file
3
src/txWorker.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import { relayerWorker } from './queue/worker';
|
||||
|
||||
relayerWorker();
|
@ -14,8 +14,7 @@ export enum JobStatus {
|
||||
FAILED = 'FAILED',
|
||||
}
|
||||
|
||||
|
||||
export type Token = { address: string, decimals: number, symbol?: string }
|
||||
export type Token = { address: string; decimals: number; symbol?: string };
|
||||
|
||||
export enum ChainIds {
|
||||
'kardia' = 0,
|
||||
|
@ -1,5 +0,0 @@
|
||||
import { priceWorker, relayerWorker, healthWorker } from './queue/worker';
|
||||
|
||||
priceWorker();
|
||||
relayerWorker();
|
||||
healthWorker();
|
@ -1,151 +0,0 @@
|
||||
require('chai').should()
|
||||
|
||||
const {
|
||||
getTornadoWithdrawInputError,
|
||||
getMiningRewardInputError,
|
||||
getMiningWithdrawInputError,
|
||||
} = require('../src/validator')
|
||||
|
||||
describe('Validator', () => {
|
||||
describe('#getTornadoWithdrawInputError', () => {
|
||||
it('should work', () => {
|
||||
getTornadoWithdrawInputError(withdrawData)
|
||||
})
|
||||
|
||||
it('should throw for incorrect proof', () => {
|
||||
const malformedData = { ...withdrawData }
|
||||
malformedData.proof = '0xbeef'
|
||||
getTornadoWithdrawInputError(malformedData).should.be.equal(
|
||||
'.proof should match pattern "^0x[a-fA-F0-9]{512}$"',
|
||||
)
|
||||
})
|
||||
|
||||
it('should throw something is missing', () => {
|
||||
const malformedData = { ...withdrawData }
|
||||
delete malformedData.proof
|
||||
getTornadoWithdrawInputError(malformedData).should.be.equal(" should have required property 'proof'")
|
||||
malformedData.proof = withdrawData.proof
|
||||
|
||||
delete malformedData.args
|
||||
getTornadoWithdrawInputError(malformedData).should.be.equal(" should have required property 'args'")
|
||||
malformedData.args = withdrawData.args
|
||||
|
||||
delete malformedData.contract
|
||||
getTornadoWithdrawInputError(malformedData).should.be.equal(" should have required property 'contract'")
|
||||
malformedData.contract = withdrawData.contract
|
||||
})
|
||||
})
|
||||
|
||||
describe('#getMiningRewardInputError', () => {
|
||||
it('should work', () => {
|
||||
getMiningRewardInputError(rewardData)
|
||||
})
|
||||
|
||||
it('should throw for incorrect proof', () => {
|
||||
const malformedData = { ...rewardData }
|
||||
malformedData.proof = '0xbeef'
|
||||
getMiningRewardInputError(malformedData).should.be.equal(
|
||||
'.proof should match pattern "^0x[a-fA-F0-9]{512}$"',
|
||||
)
|
||||
})
|
||||
|
||||
it('should throw something is missing', () => {
|
||||
const malformedData = { ...rewardData }
|
||||
delete malformedData.proof
|
||||
getMiningRewardInputError(malformedData).should.be.equal(" should have required property 'proof'")
|
||||
malformedData.proof = rewardData.proof
|
||||
|
||||
delete malformedData.args
|
||||
getMiningRewardInputError(malformedData).should.be.equal(" should have required property 'args'")
|
||||
malformedData.args = rewardData.args
|
||||
})
|
||||
})
|
||||
|
||||
describe('#getMiningWithdrawInputError', () => {
|
||||
it('should work', () => {
|
||||
getMiningWithdrawInputError(miningWithdrawData)
|
||||
})
|
||||
|
||||
it('should throw for incorrect proof', () => {
|
||||
const malformedData = { ...miningWithdrawData }
|
||||
malformedData.proof = '0xbeef'
|
||||
getMiningWithdrawInputError(malformedData).should.be.equal(
|
||||
'.proof should match pattern "^0x[a-fA-F0-9]{512}$"',
|
||||
)
|
||||
})
|
||||
|
||||
it('should throw something is missing', () => {
|
||||
const malformedData = { ...miningWithdrawData }
|
||||
delete malformedData.proof
|
||||
getMiningWithdrawInputError(malformedData).should.be.equal(" should have required property 'proof'")
|
||||
malformedData.proof = miningWithdrawData.proof
|
||||
|
||||
delete malformedData.args
|
||||
getMiningWithdrawInputError(malformedData).should.be.equal(" should have required property 'args'")
|
||||
malformedData.args = miningWithdrawData.args
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
const withdrawData = {
|
||||
proof:
|
||||
'0x0f8cb4c2ca9cbb23a5f21475773e19e39d3470436d7296f25c8730d19d88fcef2986ec694ad094f4c5fff79a4e5043bd553df20b23108bc023ec3670718143c20cc49c6d9798e1ae831fd32a878b96ff8897728f9b7963f0d5a4b5574426ac6203b2456d360b8e825d8f5731970bf1fc1b95b9713e3b24203667ecdd5939c2e40dec48f9e51d9cc8dc2f7f3916f0e9e31519c7df2bea8c51a195eb0f57beea4924cb846deaa78cdcbe361a6c310638af6f6157317bc27d74746bfaa2e1f8d2e9088fd10fa62100740874cdffdd6feb15c95c5a303f6bc226d5e51619c5b825471a17ddfeb05b250c0802261f7d05cf29a39a72c13e200e5bc721b0e4c50d55e6',
|
||||
args: [
|
||||
'0x1579d41e5290ab5bcec9a7df16705e49b5c0b869095299196c19c5e14462c9e3',
|
||||
'0x0cf7f49c5b35c48b9e1d43713e0b46a75977e3d10521e9ac1e4c3cd5e3da1c5d',
|
||||
'0xbd4369dc854c5d5b79fe25492e3a3cfcb5d02da5',
|
||||
'0x0000000000000000000000000000000000000000',
|
||||
'0x000000000000000000000000000000000000000000000000058d15e176280000',
|
||||
'0x0000000000000000000000000000000000000000000000000000000000000000',
|
||||
],
|
||||
contract: '0x47CE0C6eD5B0Ce3d3A51fdb1C52DC66a7c3c2936',
|
||||
}
|
||||
|
||||
const rewardData = {
|
||||
proof:
|
||||
'0x2e0f4c76b35ce3275bf57492cbe12ddc76fae4eabdbeaacdcc7cd5255d0abb2325bd80b2a867f9c1bab854de5d7c443a18eb9ad796943dd53c30c04e8f0a37ae164916c932776b3c28dd49808a5d5e1648d8bc9006b2386096b88757644ce8f102f7e2f1505bb66385a1d53a101922a17d8ab653694dedd7d150ec71d543202e0f0a67e5d59904d75af1c52bef4dfac0a302c2beb2ca3bb29b6bbbe1038368702e5ba8d6d829d74968a94e321cc91cccbc0654f5df6460a0a6ad73b06c42b7d1289ff36655fc7106b5538bd2c6617dd0c313919331e63bcb4de9c9b45dc2207b098a5729efbecf79a4cab39ade3c99e5772bfbe5ae75d932facbf9e0910a34ae',
|
||||
args: {
|
||||
rate: '0x000000000000000000000000000000000000000000000000000000000000000a',
|
||||
fee: '0x0000000000000000000000000000000000000000000000000000000000000000',
|
||||
instance: '0x8b3f5393bA08c24cc7ff5A66a832562aAB7bC95f',
|
||||
rewardNullifier: '0x08fdc416b85c76d246925994ae0c0df539789fd1669c45b57104907c7ef8b0b5',
|
||||
extDataHash: '0x006c5f12c20933beab10cfffab31ea0c9d736cf9aa868ee29eed3047d4ea4c2e',
|
||||
depositRoot: '0x0405962838a47fb25ffd75d80d53b268654a06bc1bdde7e5ad94c675c2f2f0ff',
|
||||
withdrawalRoot: '0x1cd83f5df5dbc826fecbf6be87f05db9c9dc617a3f1b1f3a421b1335c1ff7dbf',
|
||||
extData: {
|
||||
relayer: '0x0000000000000000000000000000000000000000',
|
||||
encryptedAccount:
|
||||
'0x6a8494fca4c433ef323d03f0db3fede90c3d2c6f216d73345ffc77ceec79622f327a83c4254063a3027620c262835e335fa32c33600a70547a53b2aa311d3ff35cf943e8f9e8f321f60d4266f680e0606a5837d78deb4d74c8b4fa3e9b67414513c71b73e38995cd8d57fd08aa9e135b342cecaf4128d4cfbb26148022e7a87da8b2423440b62034be202a6a48b45baa9736def6455771b442baaf2358fc52aa6c1d14a9a452b064d280fafd69f2a3ba416c10c1d8276f1c3810c664b24e0f1eefc75d63',
|
||||
},
|
||||
account: {
|
||||
inputRoot: '0x22e875e5e54d8569fb40d0c568984e87b4c97da6383d8d8a334a79e22b48fd54',
|
||||
inputNullifierHash: '0x24be972a00e3938a58f44ea6f8ead271ecdd6ab2cab42d1910fb7190b5816188',
|
||||
outputRoot: '0x04a3cd1e37487dcee5da51cbce4245742903262a5824aef77fb7aff84a3cb053',
|
||||
outputPathIndices: '0x0000000000000000000000000000000000000000000000000000000000000000',
|
||||
outputCommitment: '0x0ae58c1605312bd42fffdfc41d5e0f9a364ad458717c522bf9338068ab258601',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
const miningWithdrawData = {
|
||||
proof:
|
||||
'0x087c02cdc5946b44f295e1adb8b65341708fe43854e44f05f205da6e46e2e4c4248b2dd5ee30236e7be2ea657265765b4e43dae263d67ff43190bb806faaafc10dd0a771f9d589b5061ddf0a713f27fc0b496d1b136dc4e98838b88f60efb072087c3018fa5c25b1f78b4bb968291b9afa3966d976e961d0a86719a8e07d771209dad29620f3bc2fc21c00510749a19e7ff369ade6b9fd1a7f05b74e70faee771fd839c710bd983927c9d3d5f39bb5e839a2ece19e899c4d50a91b29d5ac3f1a0e8faf7eeb2f6f672561bfba39bcb1d851f6c97d5c14b7fce6661cf315af3468119855a426fc4df511e848011bcdb704369deba20541a7651ab4d5813a60c056',
|
||||
args: {
|
||||
amount: '0x000000000000000000000000000000000000000000000000000000000000000f',
|
||||
fee: '0x0000000000000000000000000000000000000000000000000000000000000000',
|
||||
extDataHash: '0x00d95a201b89061613b5bc539bcf8fdee63a400ea80f1f5e813d6aacfee3ec67',
|
||||
extData: {
|
||||
recipient: '0xf17f52151ebef6c7334fad080c5704d77216b732',
|
||||
relayer: '0x0000000000000000000000000000000000000000',
|
||||
encryptedAccount:
|
||||
'0x4bd7f84edab796b390181d8b1dd850c418c8b3fe41d63b9677b7b99a2fadc505dcc70df336a42847dc00fa39175d16ddfec0d80dc166282e024b5371f561467651ed94e71524fa2e365a8330b053d5cff7c3bcc3564b335fb9e74fb805a3a6e760b811db60e5d6b4e154376196c3cb61457bac6d5ea804f63208a389555cde72f40ab1b94705e728f692e699fc441504b9df34390b3992a1a1eac160dcf0df0b5c5a9ec9cd6c0c8f5f8aa11627fdf2b3bedece5836e9ca38b09d70ff7ba06702971d245d',
|
||||
},
|
||||
account: {
|
||||
inputRoot: '0x1a756aeee7f7d05f276b20c8ca83150e110e1a436c2d959e501ab306420ab536',
|
||||
inputNullifierHash: '0x0dc8ea0330171a1f868ef5f3f9f92e919d7be754846f6145c5e7819e87738e65',
|
||||
outputRoot: '0x0d9d85371bd8c941400ae54815491799e98d1f335a9d263e41f0b81f22b55aa8',
|
||||
outputPathIndices: '0x0000000000000000000000000000000000000000000000000000000000000001',
|
||||
outputCommitment: '0x1ebd38a8bc53f47386687386397c8b5cefd33d55341b62a2a576b39d9bcec57c',
|
||||
},
|
||||
},
|
||||
}
|
@ -1,9 +1,6 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"lib": [
|
||||
"es6",
|
||||
"es2020"
|
||||
],
|
||||
"lib": ["es6", "es2020"],
|
||||
"target": "es2020",
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
@ -14,11 +11,5 @@
|
||||
"esModuleInterop": true,
|
||||
"resolveJsonModule": true
|
||||
},
|
||||
"include": [
|
||||
"src"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"test"
|
||||
]
|
||||
"include": ["src/**/*"]
|
||||
}
|
||||
|
271
yarn.lock
271
yarn.lock
@ -54,10 +54,10 @@
|
||||
"@ethersproject/properties" "^5.4.0"
|
||||
"@ethersproject/strings" "^5.4.0"
|
||||
|
||||
"@ethersproject/abi@5.6.3", "@ethersproject/abi@^5.6.3":
|
||||
version "5.6.3"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.6.3.tgz#2d643544abadf6e6b63150508af43475985c23db"
|
||||
integrity sha512-CxKTdoZY4zDJLWXG6HzNH6znWK0M79WzzxHegDoecE3+K32pzfHOzuXg2/oGSTecZynFgpkjYXNPOqXVJlqClw==
|
||||
"@ethersproject/abi@5.6.4", "@ethersproject/abi@^5.6.3":
|
||||
version "5.6.4"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.6.4.tgz#f6e01b6ed391a505932698ecc0d9e7a99ee60362"
|
||||
integrity sha512-TTeZUlCeIHG6527/2goZA6gW5F8Emoc7MrZDC7hhP84aRGvW3TEdTnZR08Ls88YXM1m2SuK42Osw/jSi3uO8gg==
|
||||
dependencies:
|
||||
"@ethersproject/address" "^5.6.1"
|
||||
"@ethersproject/bignumber" "^5.6.2"
|
||||
@ -382,10 +382,10 @@
|
||||
dependencies:
|
||||
"@ethersproject/logger" "^5.4.0"
|
||||
|
||||
"@ethersproject/networks@5.6.3", "@ethersproject/networks@^5.6.3":
|
||||
version "5.6.3"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.6.3.tgz#3ee3ab08f315b433b50c99702eb32e0cf31f899f"
|
||||
integrity sha512-QZxRH7cA5Ut9TbXwZFiCyuPchdWi87ZtVNHWZd0R6YFgYtes2jQ3+bsslJ0WdyDe0i6QumqtoYqvY3rrQFRZOQ==
|
||||
"@ethersproject/networks@5.6.4", "@ethersproject/networks@^5.6.3":
|
||||
version "5.6.4"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.6.4.tgz#51296d8fec59e9627554f5a8a9c7791248c8dc07"
|
||||
integrity sha512-KShHeHPahHI2UlWdtDMn2lJETcbtaJge4k7XSjDR9h79QTd6yQJmv6Cp2ZA4JdqWnhszAOLSuJEd9C0PRw7hSQ==
|
||||
dependencies:
|
||||
"@ethersproject/logger" "^5.6.0"
|
||||
|
||||
@ -775,9 +775,9 @@
|
||||
integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==
|
||||
|
||||
"@ioredis/commands@^1.1.1":
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/@ioredis/commands/-/commands-1.1.1.tgz#2ba4299ea624a6bfac15b35f6df90b0015691ec3"
|
||||
integrity sha512-fsR4P/ROllzf/7lXYyElUJCheWdTJVJvOTps8v9IWKFATxR61ANOlnoPqhH099xYLrJGpc2ZQ28B3rMeUt5VQg==
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@ioredis/commands/-/commands-1.2.0.tgz#6d61b3097470af1fdbbe622795b8921d42018e11"
|
||||
integrity sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg==
|
||||
|
||||
"@jridgewell/resolve-uri@^3.0.3":
|
||||
version "3.0.7"
|
||||
@ -930,9 +930,9 @@
|
||||
integrity sha512-CFMnEPkSXWALI73t1oIWyb8QOmVrp6RruAqIx349sd+1ImaFwzlKcz55mwrx/yLyOyz1gkq/UKuNOigt27PXqg==
|
||||
|
||||
"@types/node@^17.0.42":
|
||||
version "17.0.42"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.42.tgz#d7e8f22700efc94d125103075c074396b5f41f9b"
|
||||
integrity sha512-Q5BPGyGKcvQgAMbsr7qEGN/kIPN6zZecYYABeTDBizOsau+2NMdSVTar9UQw21A2+JyA2KRNDYaYrPB0Rpk2oQ==
|
||||
version "17.0.45"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.45.tgz#2c0fafd78705e7a18b7906b5201a522719dc5190"
|
||||
integrity sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==
|
||||
|
||||
"@types/pbkdf2@^3.0.0":
|
||||
version "3.1.0"
|
||||
@ -959,13 +959,13 @@
|
||||
integrity sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==
|
||||
|
||||
"@typescript-eslint/eslint-plugin@^5.20.0":
|
||||
version "5.27.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.27.1.tgz#fdf59c905354139046b41b3ed95d1609913d0758"
|
||||
integrity sha512-6dM5NKT57ZduNnJfpY81Phe9nc9wolnMCnknb1im6brWi1RYv84nbMS3olJa27B6+irUVV1X/Wb+Am0FjJdGFw==
|
||||
version "5.30.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.0.tgz#524a11e15c09701733033c96943ecf33f55d9ca1"
|
||||
integrity sha512-lvhRJ2pGe2V9MEU46ELTdiHgiAFZPKtLhiU5wlnaYpMc2+c1R8fh8i80ZAa665drvjHKUJyRRGg3gEm1If54ow==
|
||||
dependencies:
|
||||
"@typescript-eslint/scope-manager" "5.27.1"
|
||||
"@typescript-eslint/type-utils" "5.27.1"
|
||||
"@typescript-eslint/utils" "5.27.1"
|
||||
"@typescript-eslint/scope-manager" "5.30.0"
|
||||
"@typescript-eslint/type-utils" "5.30.0"
|
||||
"@typescript-eslint/utils" "5.30.0"
|
||||
debug "^4.3.4"
|
||||
functional-red-black-tree "^1.0.1"
|
||||
ignore "^5.2.0"
|
||||
@ -974,68 +974,68 @@
|
||||
tsutils "^3.21.0"
|
||||
|
||||
"@typescript-eslint/parser@^5.20.0":
|
||||
version "5.27.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.27.1.tgz#3a4dcaa67e45e0427b6ca7bb7165122c8b569639"
|
||||
integrity sha512-7Va2ZOkHi5NP+AZwb5ReLgNF6nWLGTeUJfxdkVUAPPSaAdbWNnFZzLZ4EGGmmiCTg+AwlbE1KyUYTBglosSLHQ==
|
||||
version "5.30.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.30.0.tgz#a2184fb5f8ef2bf1db0ae61a43907e2e32aa1b8f"
|
||||
integrity sha512-2oYYUws5o2liX6SrFQ5RB88+PuRymaM2EU02/9Ppoyu70vllPnHVO7ioxDdq/ypXHA277R04SVjxvwI8HmZpzA==
|
||||
dependencies:
|
||||
"@typescript-eslint/scope-manager" "5.27.1"
|
||||
"@typescript-eslint/types" "5.27.1"
|
||||
"@typescript-eslint/typescript-estree" "5.27.1"
|
||||
"@typescript-eslint/scope-manager" "5.30.0"
|
||||
"@typescript-eslint/types" "5.30.0"
|
||||
"@typescript-eslint/typescript-estree" "5.30.0"
|
||||
debug "^4.3.4"
|
||||
|
||||
"@typescript-eslint/scope-manager@5.27.1":
|
||||
version "5.27.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.27.1.tgz#4d1504392d01fe5f76f4a5825991ec78b7b7894d"
|
||||
integrity sha512-fQEOSa/QroWE6fAEg+bJxtRZJTH8NTskggybogHt4H9Da8zd4cJji76gA5SBlR0MgtwF7rebxTbDKB49YUCpAg==
|
||||
"@typescript-eslint/scope-manager@5.30.0":
|
||||
version "5.30.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.30.0.tgz#bf585ee801ab4ad84db2f840174e171a6bb002c7"
|
||||
integrity sha512-3TZxvlQcK5fhTBw5solQucWSJvonXf5yua5nx8OqK94hxdrT7/6W3/CS42MLd/f1BmlmmbGEgQcTHHCktUX5bQ==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "5.27.1"
|
||||
"@typescript-eslint/visitor-keys" "5.27.1"
|
||||
"@typescript-eslint/types" "5.30.0"
|
||||
"@typescript-eslint/visitor-keys" "5.30.0"
|
||||
|
||||
"@typescript-eslint/type-utils@5.27.1":
|
||||
version "5.27.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.27.1.tgz#369f695199f74c1876e395ebea202582eb1d4166"
|
||||
integrity sha512-+UC1vVUWaDHRnC2cQrCJ4QtVjpjjCgjNFpg8b03nERmkHv9JV9X5M19D7UFMd+/G7T/sgFwX2pGmWK38rqyvXw==
|
||||
"@typescript-eslint/type-utils@5.30.0":
|
||||
version "5.30.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.30.0.tgz#98f3af926a5099153f092d4dad87148df21fbaae"
|
||||
integrity sha512-GF8JZbZqSS+azehzlv/lmQQ3EU3VfWYzCczdZjJRxSEeXDQkqFhCBgFhallLDbPwQOEQ4MHpiPfkjKk7zlmeNg==
|
||||
dependencies:
|
||||
"@typescript-eslint/utils" "5.27.1"
|
||||
"@typescript-eslint/utils" "5.30.0"
|
||||
debug "^4.3.4"
|
||||
tsutils "^3.21.0"
|
||||
|
||||
"@typescript-eslint/types@5.27.1":
|
||||
version "5.27.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.27.1.tgz#34e3e629501349d38be6ae97841298c03a6ffbf1"
|
||||
integrity sha512-LgogNVkBhCTZU/m8XgEYIWICD6m4dmEDbKXESCbqOXfKZxRKeqpiJXQIErv66sdopRKZPo5l32ymNqibYEH/xg==
|
||||
"@typescript-eslint/types@5.30.0":
|
||||
version "5.30.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.30.0.tgz#db7d81d585a3da3801432a9c1d2fafbff125e110"
|
||||
integrity sha512-vfqcBrsRNWw/LBXyncMF/KrUTYYzzygCSsVqlZ1qGu1QtGs6vMkt3US0VNSQ05grXi5Yadp3qv5XZdYLjpp8ag==
|
||||
|
||||
"@typescript-eslint/typescript-estree@5.27.1":
|
||||
version "5.27.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.27.1.tgz#7621ee78607331821c16fffc21fc7a452d7bc808"
|
||||
integrity sha512-DnZvvq3TAJ5ke+hk0LklvxwYsnXpRdqUY5gaVS0D4raKtbznPz71UJGnPTHEFo0GDxqLOLdMkkmVZjSpET1hFw==
|
||||
"@typescript-eslint/typescript-estree@5.30.0":
|
||||
version "5.30.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.0.tgz#4565ee8a6d2ac368996e20b2344ea0eab1a8f0bb"
|
||||
integrity sha512-hDEawogreZB4n1zoqcrrtg/wPyyiCxmhPLpZ6kmWfKF5M5G0clRLaEexpuWr31fZ42F96SlD/5xCt1bT5Qm4Nw==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "5.27.1"
|
||||
"@typescript-eslint/visitor-keys" "5.27.1"
|
||||
"@typescript-eslint/types" "5.30.0"
|
||||
"@typescript-eslint/visitor-keys" "5.30.0"
|
||||
debug "^4.3.4"
|
||||
globby "^11.1.0"
|
||||
is-glob "^4.0.3"
|
||||
semver "^7.3.7"
|
||||
tsutils "^3.21.0"
|
||||
|
||||
"@typescript-eslint/utils@5.27.1":
|
||||
version "5.27.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.27.1.tgz#b4678b68a94bc3b85bf08f243812a6868ac5128f"
|
||||
integrity sha512-mZ9WEn1ZLDaVrhRaYgzbkXBkTPghPFsup8zDbbsYTxC5OmqrFE7skkKS/sraVsLP3TcT3Ki5CSyEFBRkLH/H/w==
|
||||
"@typescript-eslint/utils@5.30.0":
|
||||
version "5.30.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.30.0.tgz#1dac771fead5eab40d31860716de219356f5f754"
|
||||
integrity sha512-0bIgOgZflLKIcZsWvfklsaQTM3ZUbmtH0rJ1hKyV3raoUYyeZwcjQ8ZUJTzS7KnhNcsVT1Rxs7zeeMHEhGlltw==
|
||||
dependencies:
|
||||
"@types/json-schema" "^7.0.9"
|
||||
"@typescript-eslint/scope-manager" "5.27.1"
|
||||
"@typescript-eslint/types" "5.27.1"
|
||||
"@typescript-eslint/typescript-estree" "5.27.1"
|
||||
"@typescript-eslint/scope-manager" "5.30.0"
|
||||
"@typescript-eslint/types" "5.30.0"
|
||||
"@typescript-eslint/typescript-estree" "5.30.0"
|
||||
eslint-scope "^5.1.1"
|
||||
eslint-utils "^3.0.0"
|
||||
|
||||
"@typescript-eslint/visitor-keys@5.27.1":
|
||||
version "5.27.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.27.1.tgz#05a62666f2a89769dac2e6baa48f74e8472983af"
|
||||
integrity sha512-xYs6ffo01nhdJgPieyk7HAOpjhTsx7r/oB9LWEhwAXgwn33tkr+W8DI2ChboqhZlC4q3TC6geDYPoiX8ROqyOQ==
|
||||
"@typescript-eslint/visitor-keys@5.30.0":
|
||||
version "5.30.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.0.tgz#07721d23daca2ec4c2da7f1e660d41cd78bacac3"
|
||||
integrity sha512-6WcIeRk2DQ3pHKxU1Ni0qMXJkjO/zLjBymlYBy/53qxe7yjEFSvzKLDToJjURUhSl2Fzhkl4SMXQoETauF74cw==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "5.27.1"
|
||||
"@typescript-eslint/types" "5.30.0"
|
||||
eslint-visitor-keys "^3.3.0"
|
||||
|
||||
"@ungap/promise-all-settled@1.1.2":
|
||||
@ -1516,9 +1516,9 @@ bufferutil@^4.0.1:
|
||||
node-gyp-build "^4.3.0"
|
||||
|
||||
bullmq@^1.80.6:
|
||||
version "1.86.1"
|
||||
resolved "https://registry.yarnpkg.com/bullmq/-/bullmq-1.86.1.tgz#600081bc0f5bb3b07be1bb38a8adced414c08aa6"
|
||||
integrity sha512-53zY4WvC7/Py6Ac/+uIg2arf6n3SWhPrTVo0QZ5Am0OyX8H2AGhWIBa8a5FtZWxu3lKDH9/GHwb2e8kpjRnr5A==
|
||||
version "1.86.4"
|
||||
resolved "https://registry.yarnpkg.com/bullmq/-/bullmq-1.86.4.tgz#ab7d5992a5021d7c25f4d50c3f50cacd9695fdcd"
|
||||
integrity sha512-f8O/2k3ETEc0KzplNdxZhEvSXY0iDwP14tr5VDZ67QC6VG3LvRdBvxwz3fioJQbCz+8mehWSW2P9KIqgTrmdag==
|
||||
dependencies:
|
||||
cron-parser "^4.2.1"
|
||||
get-port "^5.1.1"
|
||||
@ -1850,11 +1850,11 @@ create-require@^1.1.0:
|
||||
integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==
|
||||
|
||||
cron-parser@^4.2.1:
|
||||
version "4.4.0"
|
||||
resolved "https://registry.yarnpkg.com/cron-parser/-/cron-parser-4.4.0.tgz#829d67f9e68eb52fa051e62de0418909f05db983"
|
||||
integrity sha512-TrE5Un4rtJaKgmzPewh67yrER5uKM0qI9hGLDBfWb8GGRe9pn/SDkhVrdHa4z7h0SeyeNxnQnogws/H+AQANQA==
|
||||
version "4.5.0"
|
||||
resolved "https://registry.yarnpkg.com/cron-parser/-/cron-parser-4.5.0.tgz#2c6240a0301eff1424689835ce9c8de4cde9cfbd"
|
||||
integrity sha512-QHdeh3zLWz6YvYTFKpRb860rJlip16pEinbxXT1i2NZB/nOxBjd2RbSv54sn5UrAj9WykiSLYWWDgo8azQK0HA==
|
||||
dependencies:
|
||||
luxon "^1.28.0"
|
||||
luxon "^2.4.0"
|
||||
|
||||
cross-spawn@^7.0.2:
|
||||
version "7.0.3"
|
||||
@ -2156,19 +2156,10 @@ escape-string-regexp@^1.0.5:
|
||||
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
|
||||
integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==
|
||||
|
||||
eslint-config-prettier@^6.12.0:
|
||||
version "6.15.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.15.0.tgz#7f93f6cb7d45a92f1537a70ecc06366e1ac6fed9"
|
||||
integrity sha512-a1+kOYLR8wMGustcgAjdydMsQ2A/2ipRPwRKUmfYaSxc9ZPcrku080Ctl6zrZzZNs/U82MjSv+qKREkoq3bJaw==
|
||||
dependencies:
|
||||
get-stdin "^6.0.0"
|
||||
|
||||
eslint-plugin-prettier@^3.1.4:
|
||||
version "3.4.1"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.1.tgz#e9ddb200efb6f3d05ffe83b1665a716af4a387e5"
|
||||
integrity sha512-htg25EUYUeIhKHXjOinK4BgCcDwtLHjqaxCDsMy5nbnUMkKFvIhMVCp+5GFUXQ4Nr8lBsPqtGAqBenbpFqAA2g==
|
||||
dependencies:
|
||||
prettier-linter-helpers "^1.0.0"
|
||||
eslint-config-prettier@^8.5.0:
|
||||
version "8.5.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz#5a81680ec934beca02c7b1a61cf8ca34b66feab1"
|
||||
integrity sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==
|
||||
|
||||
eslint-scope@^5.1.1:
|
||||
version "5.1.1"
|
||||
@ -2204,9 +2195,9 @@ eslint-visitor-keys@^3.3.0:
|
||||
integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==
|
||||
|
||||
eslint@^8.14.0:
|
||||
version "8.17.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.17.0.tgz#1cfc4b6b6912f77d24b874ca1506b0fe09328c21"
|
||||
integrity sha512-gq0m0BTJfci60Fz4nczYxNAlED+sMcihltndR8t9t1evnU/azx53x3t2UHXC/uRjcbvRw/XctpaNygSTcQD+Iw==
|
||||
version "8.18.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.18.0.tgz#78d565d16c993d0b73968c523c0446b13da784fd"
|
||||
integrity sha512-As1EfFMVk7Xc6/CvhssHUjsAQSkpfXvUGMFC3ce8JDe6WvqCgRrLOBQbVpsBFr1X1V+RACOadnzVvcUS5ni2bA==
|
||||
dependencies:
|
||||
"@eslint/eslintrc" "^1.3.0"
|
||||
"@humanwhocodes/config-array" "^0.9.2"
|
||||
@ -2287,7 +2278,7 @@ etag@~1.8.1:
|
||||
resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
|
||||
integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==
|
||||
|
||||
eth-ens-namehash@2.0.8, eth-ens-namehash@^2.0.8:
|
||||
eth-ens-namehash@2.0.8:
|
||||
version "2.0.8"
|
||||
resolved "https://registry.yarnpkg.com/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz#229ac46eca86d52e0c991e7cb2aef83ff0f68bcf"
|
||||
integrity sha1-IprEbsqG1S4MmR58sq74P/D2i88=
|
||||
@ -2474,11 +2465,11 @@ ethers@^5.4.6:
|
||||
"@ethersproject/wordlists" "5.4.0"
|
||||
|
||||
ethers@^5.6.4:
|
||||
version "5.6.8"
|
||||
resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.6.8.tgz#d36b816b4896341a80a8bbd2a44e8cb6e9b98dd4"
|
||||
integrity sha512-YxIGaltAOdvBFPZwIkyHnXbW40f1r8mHUgapW6dxkO+6t7H6wY8POUn0Kbxrd/N7I4hHxyi7YCddMAH/wmho2w==
|
||||
version "5.6.9"
|
||||
resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.6.9.tgz#4e12f8dfcb67b88ae7a78a9519b384c23c576a4d"
|
||||
integrity sha512-lMGC2zv9HC5EC+8r429WaWu3uWJUCgUCt8xxKCFqkrFuBDZXDYIdzDUECxzjf2BMF8IVBByY1EBoGSL3RTm8RA==
|
||||
dependencies:
|
||||
"@ethersproject/abi" "5.6.3"
|
||||
"@ethersproject/abi" "5.6.4"
|
||||
"@ethersproject/abstract-provider" "5.6.1"
|
||||
"@ethersproject/abstract-signer" "5.6.2"
|
||||
"@ethersproject/address" "5.6.1"
|
||||
@ -2493,7 +2484,7 @@ ethers@^5.6.4:
|
||||
"@ethersproject/json-wallets" "5.6.1"
|
||||
"@ethersproject/keccak256" "5.6.1"
|
||||
"@ethersproject/logger" "5.6.0"
|
||||
"@ethersproject/networks" "5.6.3"
|
||||
"@ethersproject/networks" "5.6.4"
|
||||
"@ethersproject/pbkdf2" "5.6.1"
|
||||
"@ethersproject/properties" "5.6.0"
|
||||
"@ethersproject/providers" "5.6.8"
|
||||
@ -2612,11 +2603,6 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
|
||||
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
|
||||
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
|
||||
|
||||
fast-diff@^1.1.2:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03"
|
||||
integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==
|
||||
|
||||
fast-glob@^3.2.9:
|
||||
version "3.2.11"
|
||||
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9"
|
||||
@ -2762,9 +2748,9 @@ flatstr@^1.0.12:
|
||||
integrity sha512-4zPxDyhCyiN2wIAtSLI6gc82/EjqZc1onI4Mz/l0pWrAlsSfYH/2ZIcU+e3oA2wDwbzIWNKwa23F8rh6+DRWkw==
|
||||
|
||||
flatted@^3.1.0:
|
||||
version "3.2.5"
|
||||
resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.5.tgz#76c8584f4fc843db64702a6bd04ab7a8bd666da3"
|
||||
integrity sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==
|
||||
version "3.2.6"
|
||||
resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.6.tgz#022e9218c637f9f3fc9c35ab9c9193f05add60b2"
|
||||
integrity sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==
|
||||
|
||||
follow-redirects@^1.14.0:
|
||||
version "1.15.1"
|
||||
@ -2840,10 +2826,9 @@ functional-red-black-tree@^1.0.1:
|
||||
resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"
|
||||
integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==
|
||||
|
||||
gas-price-oracle@^0.4.6, gas-price-oracle@^0.4.7:
|
||||
version "0.4.7"
|
||||
resolved "https://registry.yarnpkg.com/gas-price-oracle/-/gas-price-oracle-0.4.7.tgz#47406048083074bcab677efb9de08663e742153d"
|
||||
integrity sha512-Ti8nhpATm83YebWU/Pz5xclZoTkzOblIhT504ZViZJUcd8jOxgj9pWtCasg8RYw+d0f19m0dJUPvdj04RC4o3A==
|
||||
"gas-price-oracle@git+https://github.com/peppersec/gas-price-oracle.git#da3de92dea7c75afc2c8ba141f23c4eea597a614":
|
||||
version "0.5.0"
|
||||
resolved "git+https://github.com/peppersec/gas-price-oracle.git#da3de92dea7c75afc2c8ba141f23c4eea597a614"
|
||||
dependencies:
|
||||
axios "^0.21.2"
|
||||
bignumber.js "^9.0.0"
|
||||
@ -2872,11 +2857,6 @@ get-port@^5.1.1:
|
||||
resolved "https://registry.yarnpkg.com/get-port/-/get-port-5.1.1.tgz#0469ed07563479de6efb986baf053dcd7d4e3193"
|
||||
integrity sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ==
|
||||
|
||||
get-stdin@^6.0.0:
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b"
|
||||
integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==
|
||||
|
||||
get-stream@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
|
||||
@ -3174,7 +3154,7 @@ ieee754@^1.1.13, ieee754@^1.1.4:
|
||||
ignore-by-default@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09"
|
||||
integrity sha1-SMptcvbGo68Aqa1K5odr44ieKwk=
|
||||
integrity sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==
|
||||
|
||||
ignore@^5.2.0:
|
||||
version "5.2.0"
|
||||
@ -3192,7 +3172,7 @@ import-fresh@^3.0.0, import-fresh@^3.2.1:
|
||||
import-lazy@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43"
|
||||
integrity sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=
|
||||
integrity sha512-m7ZEHgtw69qOGw+jwxXkHlrlIPdTGkyh66zXZ1ajZbxkDBNjSY/LGbmjc7h0s2ELsUDTAhFr55TrPSSqJGPG0A==
|
||||
|
||||
imurmurhash@^0.1.4:
|
||||
version "0.1.4"
|
||||
@ -3240,9 +3220,9 @@ ioredis@^4.28.5:
|
||||
standard-as-callback "^2.1.0"
|
||||
|
||||
ioredis@^5.0.6:
|
||||
version "5.0.6"
|
||||
resolved "https://registry.yarnpkg.com/ioredis/-/ioredis-5.0.6.tgz#e50b8cc945f1f3ac932b0b8aab4bd8073d1402a9"
|
||||
integrity sha512-KUm7wPzIet9QrFMoMm09/4bkfVKBUD9KXwBitP3hrNkZ+A6NBndweXGwYIB/7szHcTZgfo7Kvx88SxljJV4D9A==
|
||||
version "5.1.0"
|
||||
resolved "https://registry.yarnpkg.com/ioredis/-/ioredis-5.1.0.tgz#17bc0bc40f164ef26910ca6e56981c2a9bfdf57e"
|
||||
integrity sha512-HYHnvwxFwefeUBj0hZFejLvd8Q/YNAfnZlZG/hSRxkRhXMs1H8soMEVccHd1WlLrKkynorXBsAtqDGskOdAfVQ==
|
||||
dependencies:
|
||||
"@ioredis/commands" "^1.1.1"
|
||||
cluster-key-slot "^1.1.0"
|
||||
@ -3580,10 +3560,10 @@ lru-cache@^6.0.0:
|
||||
dependencies:
|
||||
yallist "^4.0.0"
|
||||
|
||||
luxon@^1.28.0:
|
||||
version "1.28.0"
|
||||
resolved "https://registry.yarnpkg.com/luxon/-/luxon-1.28.0.tgz#e7f96daad3938c06a62de0fb027115d251251fbf"
|
||||
integrity sha512-TfTiyvZhwBYM/7QdAVDh+7dBTBA29v4ik0Ce9zda3Mnf8on1S5KJI8P2jKFZ8+5C0jhmr0KwJEO/Wdpm0VeWJQ==
|
||||
luxon@^2.4.0:
|
||||
version "2.4.0"
|
||||
resolved "https://registry.yarnpkg.com/luxon/-/luxon-2.4.0.tgz#9435806545bb32d4234dab766ab8a3d54847a765"
|
||||
integrity sha512-w+NAwWOUL5hO0SgwOHsMBAmZ15SoknmQXhSO0hIbJCAmPKSsGeK8MlmhYh2w6Iib38IxN2M+/ooXWLbeis7GuA==
|
||||
|
||||
make-dir@^3.0.0:
|
||||
version "3.1.0"
|
||||
@ -3899,9 +3879,9 @@ node-gyp-build@^4.2.0, node-gyp-build@^4.3.0:
|
||||
integrity sha512-amJnQCcgtRVw9SvoebO3BKGESClrfXGCUTX9hSn1OuGQTQBOZmVd0Z0OlecpuRksKvbsUqALE8jls/ErClAPuQ==
|
||||
|
||||
nodemon@^2.0.15:
|
||||
version "2.0.16"
|
||||
resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-2.0.16.tgz#d71b31bfdb226c25de34afea53486c8ef225fdef"
|
||||
integrity sha512-zsrcaOfTWRuUzBn3P44RDliLlp263Z/76FPoHFr3cFFkOz0lTPAcIw8dCzfdVIx/t3AtDYCZRCDkoCojJqaG3w==
|
||||
version "2.0.18"
|
||||
resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-2.0.18.tgz#0f5a3aa7b4587f2626e6f01369deba89cb0462a2"
|
||||
integrity sha512-uAvrKipi2zAz8E7nkSz4qW4F4zd5fs2wNGsTx+xXlP8KXqd9ucE0vY9wankOsPboeDyuUGN9vsXGV1pLn80l/A==
|
||||
dependencies:
|
||||
chokidar "^3.5.2"
|
||||
debug "^3.2.7"
|
||||
@ -3917,7 +3897,7 @@ nodemon@^2.0.15:
|
||||
nopt@~1.0.10:
|
||||
version "1.0.10"
|
||||
resolved "https://registry.yarnpkg.com/nopt/-/nopt-1.0.10.tgz#6ddd21bd2a31417b92727dd585f8a6f37608ebee"
|
||||
integrity sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=
|
||||
integrity sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==
|
||||
dependencies:
|
||||
abbrev "1"
|
||||
|
||||
@ -4155,13 +4135,6 @@ prepend-http@^2.0.0:
|
||||
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
|
||||
integrity sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA==
|
||||
|
||||
prettier-linter-helpers@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b"
|
||||
integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==
|
||||
dependencies:
|
||||
fast-diff "^1.1.2"
|
||||
|
||||
prettier@^2.3.1:
|
||||
version "2.6.2"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.6.2.tgz#e26d71a18a74c3d0f0597f55f01fb6c06c206032"
|
||||
@ -4293,7 +4266,7 @@ raw-body@2.5.1:
|
||||
iconv-lite "0.4.24"
|
||||
unpipe "1.0.0"
|
||||
|
||||
rc@^1.2.8:
|
||||
rc@1.2.8, rc@^1.2.8:
|
||||
version "1.2.8"
|
||||
resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed"
|
||||
integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==
|
||||
@ -4359,11 +4332,11 @@ regexpp@^3.2.0:
|
||||
integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==
|
||||
|
||||
registry-auth-token@^4.0.0:
|
||||
version "4.2.1"
|
||||
resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-4.2.1.tgz#6d7b4006441918972ccd5fedcd41dc322c79b250"
|
||||
integrity sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==
|
||||
version "4.2.2"
|
||||
resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-4.2.2.tgz#f02d49c3668884612ca031419491a13539e21fac"
|
||||
integrity sha512-PC5ZysNb42zpFME6D/XlIgtNGdTl8bBOCw90xQLVMpzuuubJKYDWFAEuUNc+Cn8Z8724tg2SDhDRrkVEsqfDMg==
|
||||
dependencies:
|
||||
rc "^1.2.8"
|
||||
rc "1.2.8"
|
||||
|
||||
registry-url@^5.0.0:
|
||||
version "5.1.0"
|
||||
@ -4416,7 +4389,7 @@ resolve-from@^4.0.0:
|
||||
responselike@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7"
|
||||
integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=
|
||||
integrity sha512-/Fpe5guzJk1gPqdJLJR5u7eG/gNY4nImjbRDaVWVMRhne55TCmj2i9Q+54PBRfatRC8v/rIiv9BN0pMd9OV5EQ==
|
||||
dependencies:
|
||||
lowercase-keys "^1.0.0"
|
||||
|
||||
@ -4769,7 +4742,7 @@ strip-json-comments@3.1.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1.
|
||||
strip-json-comments@~2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
|
||||
integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo=
|
||||
integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==
|
||||
|
||||
supports-color@8.1.1:
|
||||
version "8.1.1"
|
||||
@ -4850,7 +4823,7 @@ telegraf@^4.8.2:
|
||||
text-table@^0.2.0:
|
||||
version "0.2.0"
|
||||
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
|
||||
integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=
|
||||
integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==
|
||||
|
||||
timed-out@^4.0.0, timed-out@^4.0.1:
|
||||
version "4.0.1"
|
||||
@ -4879,9 +4852,16 @@ toidentifier@1.0.1:
|
||||
resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35"
|
||||
integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==
|
||||
|
||||
"torn-token@link:../torn-token":
|
||||
version "0.0.0"
|
||||
uid ""
|
||||
torn-token@^1.0.8:
|
||||
version "1.0.8"
|
||||
resolved "https://registry.yarnpkg.com/torn-token/-/torn-token-1.0.8.tgz#de52b1077055e29843bcba8e64204365ff52e0c7"
|
||||
integrity sha512-hoSowutDGFQDe/i9hVCnVaW8HBHLGwkt78Wz4NBLYckI9OR7MvcKnMlqL+p++kyTolapiVi62fN61Rj6j5oYUQ==
|
||||
dependencies:
|
||||
"@openzeppelin/contracts" "^3.1.0"
|
||||
eth-sig-util "^2.5.3"
|
||||
ethereumjs-util "^7.0.3"
|
||||
web3 "^1.2.11"
|
||||
web3-utils "^1.7.3"
|
||||
|
||||
touch@^3.1.0:
|
||||
version "3.1.0"
|
||||
@ -4995,9 +4975,14 @@ tweetnacl@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596"
|
||||
integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==
|
||||
|
||||
"tx-manager@link:../tx-manager":
|
||||
version "0.0.0"
|
||||
uid ""
|
||||
"tx-manager@git+https://github.com/tornadocash/tx-manager.git#b4235ec8f7d4937a088ae862ca82f3866cd2aaee":
|
||||
version "0.4.8"
|
||||
resolved "git+https://github.com/tornadocash/tx-manager.git#b4235ec8f7d4937a088ae862ca82f3866cd2aaee"
|
||||
dependencies:
|
||||
async-mutex "^0.2.4"
|
||||
ethers "^5.4.6"
|
||||
gas-price-oracle "git+https://github.com/peppersec/gas-price-oracle.git#da3de92dea7c75afc2c8ba141f23c4eea597a614"
|
||||
web3-core-promievent "^1.3.0"
|
||||
|
||||
type-check@^0.4.0, type-check@~0.4.0:
|
||||
version "0.4.0"
|
||||
@ -5063,9 +5048,9 @@ typegram@^3.9.0:
|
||||
integrity sha512-lbMhaP0jHsEbz8EJf2s4/hkKLtt2/9THTNatXa2mJCKHZBeJzGO1jrwueQBnXsSgA5pPHLwcPslTnsKXGo/GIQ==
|
||||
|
||||
typescript@^4.6.3:
|
||||
version "4.7.3"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.3.tgz#8364b502d5257b540f9de4c40be84c98e23a129d"
|
||||
integrity sha512-WOkT3XYvrpXx4vMMqlD+8R8R37fZkjyLGlxavMc4iB8lrl8L0DeTcHbYgw/v0N/z9wAFsgBhcsF0ruoySS22mA==
|
||||
version "4.7.4"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235"
|
||||
integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==
|
||||
|
||||
typical@^4.0.0:
|
||||
version "4.0.0"
|
||||
@ -5146,7 +5131,7 @@ url-parse-lax@^1.0.0:
|
||||
url-parse-lax@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c"
|
||||
integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=
|
||||
integrity sha512-NjFKA0DidqPa5ciFcSrXnAltTtzz84ogy+NebPvfEgAck0+TNg4UJ4IN+fB7zRZfbgUf0syOo9MDxFkDSMuFaQ==
|
||||
dependencies:
|
||||
prepend-http "^2.0.0"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user