feat: add contracts

This commit is contained in:
bartosz-lipinski 2021-02-11 18:19:51 -06:00
parent 4b5954d627
commit c196778193
13 changed files with 53986 additions and 6 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -29,6 +29,7 @@
"craco-babel-loader": "^0.1.4",
"craco-less": "^1.17.0",
"echarts": "^4.9.0",
"ethers": "^4.0.48",
"eventemitter3": "^4.0.7",
"identicon.js": "^2.3.3",
"jazzicon": "^1.5.0",
@ -39,7 +40,8 @@
"react-intl": "^5.10.2",
"react-router-dom": "^5.2.0",
"react-scripts": "3.4.3",
"typescript": "^4.1.3"
"typescript": "^4.1.3",
"web3": "^1.3.0"
},
"scripts": {
"prestart": "npm-link-shared ../common/node_modules/ . react",
@ -49,7 +51,8 @@
"eject": "react-scripts eject",
"deploy": "gh-pages -d build",
"deploy:ar": "arweave deploy-dir build --key-file ",
"format:fix": "prettier --write \"**/*.+(js|jsx|ts|tsx|json|css|md)\""
"format:fix": "prettier --write \"**/*.+(js|jsx|ts|tsx|json|css|md)\"",
"ethers": "typechain --target ethers-v4 --outDir src/contracts 'contracts/*.json'"
},
"eslintConfig": {
"extends": "react-app"
@ -68,10 +71,11 @@
},
"repository": {
"type": "git",
"url": "https://github.com/solana-labs/oyster-lending"
"url": "https://github.com/solana-labs/oyster"
},
"homepage": ".",
"devDependencies": {
"@typechain/ethers-v4": "^1.0.0",
"@types/bn.js": "^5.1.0",
"@types/bs58": "^4.0.1",
"@types/identicon.js": "^2.3.0",

401
packages/bridge/src/contracts/Erc20.d.ts vendored Normal file
View File

@ -0,0 +1,401 @@
/* Generated by ts-generator ver. 0.0.8 */
/* tslint:disable */
import { Contract, ContractTransaction, EventFilter, Signer } from 'ethers';
import { Listener, Provider } from 'ethers/providers';
import { Arrayish, BigNumber, BigNumberish, Interface } from 'ethers/utils';
import {
TransactionOverrides,
TypedEventDescription,
TypedFunctionDescription,
} from '.';
interface Erc20Interface extends Interface {
functions: {
allowance: TypedFunctionDescription<{
encode([owner, spender]: [string, string]): string;
}>;
approve: TypedFunctionDescription<{
encode([spender, amount]: [string, BigNumberish]): string;
}>;
balanceOf: TypedFunctionDescription<{
encode([account]: [string]): string;
}>;
decimals: TypedFunctionDescription<{ encode([]: []): string }>;
decreaseAllowance: TypedFunctionDescription<{
encode([spender, subtractedValue]: [string, BigNumberish]): string;
}>;
increaseAllowance: TypedFunctionDescription<{
encode([spender, addedValue]: [string, BigNumberish]): string;
}>;
name: TypedFunctionDescription<{ encode([]: []): string }>;
symbol: TypedFunctionDescription<{ encode([]: []): string }>;
totalSupply: TypedFunctionDescription<{ encode([]: []): string }>;
transfer: TypedFunctionDescription<{
encode([recipient, amount]: [string, BigNumberish]): string;
}>;
transferFrom: TypedFunctionDescription<{
encode([sender, recipient, amount]: [
string,
string,
BigNumberish,
]): string;
}>;
};
events: {
Approval: TypedEventDescription<{
encodeTopics([owner, spender, value]: [
string | null,
string | null,
null,
]): string[];
}>;
Transfer: TypedEventDescription<{
encodeTopics([from, to, value]: [
string | null,
string | null,
null,
]): string[];
}>;
};
}
export class Erc20 extends Contract {
connect(signerOrProvider: Signer | Provider | string): Erc20;
attach(addressOrName: string): Erc20;
deployed(): Promise<Erc20>;
on(event: EventFilter | string, listener: Listener): Erc20;
once(event: EventFilter | string, listener: Listener): Erc20;
addListener(eventName: EventFilter | string, listener: Listener): Erc20;
removeAllListeners(eventName: EventFilter | string): Erc20;
removeListener(eventName: any, listener: Listener): Erc20;
interface: Erc20Interface;
functions: {
allowance(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
'allowance(address,address)'(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
approve(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
'approve(address,uint256)'(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
balanceOf(
account: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
'balanceOf(address)'(
account: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
decimals(overrides?: TransactionOverrides): Promise<number>;
'decimals()'(overrides?: TransactionOverrides): Promise<number>;
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
'decreaseAllowance(address,uint256)'(
spender: string,
subtractedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
'increaseAllowance(address,uint256)'(
spender: string,
addedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
name(overrides?: TransactionOverrides): Promise<string>;
'name()'(overrides?: TransactionOverrides): Promise<string>;
symbol(overrides?: TransactionOverrides): Promise<string>;
'symbol()'(overrides?: TransactionOverrides): Promise<string>;
totalSupply(overrides?: TransactionOverrides): Promise<BigNumber>;
'totalSupply()'(overrides?: TransactionOverrides): Promise<BigNumber>;
transfer(
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
'transfer(address,uint256)'(
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
transferFrom(
sender: string,
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
'transferFrom(address,address,uint256)'(
sender: string,
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
};
allowance(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
'allowance(address,address)'(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
approve(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
'approve(address,uint256)'(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
balanceOf(
account: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
'balanceOf(address)'(
account: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
decimals(overrides?: TransactionOverrides): Promise<number>;
'decimals()'(overrides?: TransactionOverrides): Promise<number>;
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
'decreaseAllowance(address,uint256)'(
spender: string,
subtractedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
'increaseAllowance(address,uint256)'(
spender: string,
addedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
name(overrides?: TransactionOverrides): Promise<string>;
'name()'(overrides?: TransactionOverrides): Promise<string>;
symbol(overrides?: TransactionOverrides): Promise<string>;
'symbol()'(overrides?: TransactionOverrides): Promise<string>;
totalSupply(overrides?: TransactionOverrides): Promise<BigNumber>;
'totalSupply()'(overrides?: TransactionOverrides): Promise<BigNumber>;
transfer(
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
'transfer(address,uint256)'(
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
transferFrom(
sender: string,
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
'transferFrom(address,address,uint256)'(
sender: string,
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
filters: {
Approval(
owner: string | null,
spender: string | null,
value: null,
): EventFilter;
Transfer(from: string | null, to: string | null, value: null): EventFilter;
};
estimate: {
allowance(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
'allowance(address,address)'(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
approve(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
'approve(address,uint256)'(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
balanceOf(
account: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
'balanceOf(address)'(
account: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
decimals(overrides?: TransactionOverrides): Promise<BigNumber>;
'decimals()'(overrides?: TransactionOverrides): Promise<BigNumber>;
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
'decreaseAllowance(address,uint256)'(
spender: string,
subtractedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
'increaseAllowance(address,uint256)'(
spender: string,
addedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
name(overrides?: TransactionOverrides): Promise<BigNumber>;
'name()'(overrides?: TransactionOverrides): Promise<BigNumber>;
symbol(overrides?: TransactionOverrides): Promise<BigNumber>;
'symbol()'(overrides?: TransactionOverrides): Promise<BigNumber>;
totalSupply(overrides?: TransactionOverrides): Promise<BigNumber>;
'totalSupply()'(overrides?: TransactionOverrides): Promise<BigNumber>;
transfer(
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
'transfer(address,uint256)'(
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
transferFrom(
sender: string,
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
'transferFrom(address,address,uint256)'(
sender: string,
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
};
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,469 @@
/* Generated by ts-generator ver. 0.0.8 */
/* tslint:disable */
import { Contract, ContractTransaction, EventFilter, Signer } from 'ethers';
import { Listener, Provider } from 'ethers/providers';
import { Arrayish, BigNumber, BigNumberish, Interface } from 'ethers/utils';
import {
TransactionOverrides,
TypedEventDescription,
TypedFunctionDescription,
} from '.';
interface WormholeInterface extends Interface {
functions: {
consumedVAAs: TypedFunctionDescription<{ encode([]: [Arrayish]): string }>;
guardian_set_expirity: TypedFunctionDescription<{ encode([]: []): string }>;
guardian_set_index: TypedFunctionDescription<{ encode([]: []): string }>;
guardian_sets: TypedFunctionDescription<{
encode([]: [BigNumberish]): string;
}>;
isWrappedAsset: TypedFunctionDescription<{ encode([]: [string]): string }>;
wrappedAssetMaster: TypedFunctionDescription<{ encode([]: []): string }>;
wrappedAssets: TypedFunctionDescription<{ encode([]: [Arrayish]): string }>;
getGuardianSet: TypedFunctionDescription<{
encode([idx]: [BigNumberish]): string;
}>;
submitVAA: TypedFunctionDescription<{ encode([vaa]: [Arrayish]): string }>;
lockAssets: TypedFunctionDescription<{
encode([asset, amount, recipient, target_chain, nonce, refund_dust]: [
string,
BigNumberish,
Arrayish,
BigNumberish,
BigNumberish,
boolean,
]): string;
}>;
lockETH: TypedFunctionDescription<{
encode([recipient, target_chain, nonce]: [
Arrayish,
BigNumberish,
BigNumberish,
]): string;
}>;
};
events: {
LogGuardianSetChanged: TypedEventDescription<{
encodeTopics([oldGuardianIndex, newGuardianIndex]: [
null,
null,
]): string[];
}>;
LogTokensLocked: TypedEventDescription<{
encodeTopics([
target_chain,
token_chain,
token_decimals,
token,
sender,
recipient,
amount,
nonce,
]: [
null,
null,
null,
Arrayish | null,
Arrayish | null,
null,
null,
null,
]): string[];
}>;
};
}
export class Wormhole extends Contract {
connect(signerOrProvider: Signer | Provider | string): Wormhole;
attach(addressOrName: string): Wormhole;
deployed(): Promise<Wormhole>;
on(event: EventFilter | string, listener: Listener): Wormhole;
once(event: EventFilter | string, listener: Listener): Wormhole;
addListener(eventName: EventFilter | string, listener: Listener): Wormhole;
removeAllListeners(eventName: EventFilter | string): Wormhole;
removeListener(eventName: any, listener: Listener): Wormhole;
interface: WormholeInterface;
functions: {
consumedVAAs(
arg0: Arrayish,
overrides?: TransactionOverrides,
): Promise<boolean>;
'consumedVAAs(bytes32)'(
arg0: Arrayish,
overrides?: TransactionOverrides,
): Promise<boolean>;
guardian_set_expirity(overrides?: TransactionOverrides): Promise<number>;
'guardian_set_expirity()'(
overrides?: TransactionOverrides,
): Promise<number>;
guardian_set_index(overrides?: TransactionOverrides): Promise<number>;
'guardian_set_index()'(overrides?: TransactionOverrides): Promise<number>;
guardian_sets(
arg0: BigNumberish,
overrides?: TransactionOverrides,
): Promise<number>;
'guardian_sets(uint32)'(
arg0: BigNumberish,
overrides?: TransactionOverrides,
): Promise<number>;
isWrappedAsset(
arg0: string,
overrides?: TransactionOverrides,
): Promise<boolean>;
'isWrappedAsset(address)'(
arg0: string,
overrides?: TransactionOverrides,
): Promise<boolean>;
wrappedAssetMaster(overrides?: TransactionOverrides): Promise<string>;
'wrappedAssetMaster()'(overrides?: TransactionOverrides): Promise<string>;
wrappedAssets(
arg0: Arrayish,
overrides?: TransactionOverrides,
): Promise<string>;
'wrappedAssets(bytes32)'(
arg0: Arrayish,
overrides?: TransactionOverrides,
): Promise<string>;
getGuardianSet(
idx: BigNumberish,
overrides?: TransactionOverrides,
): Promise<{
keys: string[];
expiration_time: number;
0: string[];
1: number;
}>;
'getGuardianSet(uint32)'(
idx: BigNumberish,
overrides?: TransactionOverrides,
): Promise<{
keys: string[];
expiration_time: number;
0: string[];
1: number;
}>;
submitVAA(
vaa: Arrayish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
'submitVAA(bytes)'(
vaa: Arrayish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
lockAssets(
asset: string,
amount: BigNumberish,
recipient: Arrayish,
target_chain: BigNumberish,
nonce: BigNumberish,
refund_dust: boolean,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
'lockAssets(address,uint256,bytes32,uint8,uint32,bool)'(
asset: string,
amount: BigNumberish,
recipient: Arrayish,
target_chain: BigNumberish,
nonce: BigNumberish,
refund_dust: boolean,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
lockETH(
recipient: Arrayish,
target_chain: BigNumberish,
nonce: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
'lockETH(bytes32,uint8,uint32)'(
recipient: Arrayish,
target_chain: BigNumberish,
nonce: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
};
consumedVAAs(
arg0: Arrayish,
overrides?: TransactionOverrides,
): Promise<boolean>;
'consumedVAAs(bytes32)'(
arg0: Arrayish,
overrides?: TransactionOverrides,
): Promise<boolean>;
guardian_set_expirity(overrides?: TransactionOverrides): Promise<number>;
'guardian_set_expirity()'(overrides?: TransactionOverrides): Promise<number>;
guardian_set_index(overrides?: TransactionOverrides): Promise<number>;
'guardian_set_index()'(overrides?: TransactionOverrides): Promise<number>;
guardian_sets(
arg0: BigNumberish,
overrides?: TransactionOverrides,
): Promise<number>;
'guardian_sets(uint32)'(
arg0: BigNumberish,
overrides?: TransactionOverrides,
): Promise<number>;
isWrappedAsset(
arg0: string,
overrides?: TransactionOverrides,
): Promise<boolean>;
'isWrappedAsset(address)'(
arg0: string,
overrides?: TransactionOverrides,
): Promise<boolean>;
wrappedAssetMaster(overrides?: TransactionOverrides): Promise<string>;
'wrappedAssetMaster()'(overrides?: TransactionOverrides): Promise<string>;
wrappedAssets(
arg0: Arrayish,
overrides?: TransactionOverrides,
): Promise<string>;
'wrappedAssets(bytes32)'(
arg0: Arrayish,
overrides?: TransactionOverrides,
): Promise<string>;
getGuardianSet(
idx: BigNumberish,
overrides?: TransactionOverrides,
): Promise<{
keys: string[];
expiration_time: number;
0: string[];
1: number;
}>;
'getGuardianSet(uint32)'(
idx: BigNumberish,
overrides?: TransactionOverrides,
): Promise<{
keys: string[];
expiration_time: number;
0: string[];
1: number;
}>;
submitVAA(
vaa: Arrayish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
'submitVAA(bytes)'(
vaa: Arrayish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
lockAssets(
asset: string,
amount: BigNumberish,
recipient: Arrayish,
target_chain: BigNumberish,
nonce: BigNumberish,
refund_dust: boolean,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
'lockAssets(address,uint256,bytes32,uint8,uint32,bool)'(
asset: string,
amount: BigNumberish,
recipient: Arrayish,
target_chain: BigNumberish,
nonce: BigNumberish,
refund_dust: boolean,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
lockETH(
recipient: Arrayish,
target_chain: BigNumberish,
nonce: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
'lockETH(bytes32,uint8,uint32)'(
recipient: Arrayish,
target_chain: BigNumberish,
nonce: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
filters: {
LogGuardianSetChanged(
oldGuardianIndex: null,
newGuardianIndex: null,
): EventFilter;
LogTokensLocked(
target_chain: null,
token_chain: null,
token_decimals: null,
token: Arrayish | null,
sender: Arrayish | null,
recipient: null,
amount: null,
nonce: null,
): EventFilter;
};
estimate: {
consumedVAAs(
arg0: Arrayish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
'consumedVAAs(bytes32)'(
arg0: Arrayish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
guardian_set_expirity(overrides?: TransactionOverrides): Promise<BigNumber>;
'guardian_set_expirity()'(
overrides?: TransactionOverrides,
): Promise<BigNumber>;
guardian_set_index(overrides?: TransactionOverrides): Promise<BigNumber>;
'guardian_set_index()'(
overrides?: TransactionOverrides,
): Promise<BigNumber>;
guardian_sets(
arg0: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
'guardian_sets(uint32)'(
arg0: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
isWrappedAsset(
arg0: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
'isWrappedAsset(address)'(
arg0: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
wrappedAssetMaster(overrides?: TransactionOverrides): Promise<BigNumber>;
'wrappedAssetMaster()'(
overrides?: TransactionOverrides,
): Promise<BigNumber>;
wrappedAssets(
arg0: Arrayish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
'wrappedAssets(bytes32)'(
arg0: Arrayish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
getGuardianSet(
idx: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
'getGuardianSet(uint32)'(
idx: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
submitVAA(
vaa: Arrayish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
'submitVAA(bytes)'(
vaa: Arrayish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
lockAssets(
asset: string,
amount: BigNumberish,
recipient: Arrayish,
target_chain: BigNumberish,
nonce: BigNumberish,
refund_dust: boolean,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
'lockAssets(address,uint256,bytes32,uint8,uint32,bool)'(
asset: string,
amount: BigNumberish,
recipient: Arrayish,
target_chain: BigNumberish,
nonce: BigNumberish,
refund_dust: boolean,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
lockETH(
recipient: Arrayish,
target_chain: BigNumberish,
nonce: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
'lockETH(bytes32,uint8,uint32)'(
recipient: Arrayish,
target_chain: BigNumberish,
nonce: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
};
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,778 @@
/* Generated by ts-generator ver. 0.0.8 */
/* tslint:disable */
import { Contract, ContractTransaction, EventFilter, Signer } from 'ethers';
import { Listener, Provider } from 'ethers/providers';
import { Arrayish, BigNumber, BigNumberish, Interface } from 'ethers/utils';
import {
TransactionOverrides,
TypedEventDescription,
TypedFunctionDescription,
} from '.';
interface WrappedAssetInterface extends Interface {
functions: {
assetAddress: TypedFunctionDescription<{ encode([]: []): string }>;
assetChain: TypedFunctionDescription<{ encode([]: []): string }>;
bridge: TypedFunctionDescription<{ encode([]: []): string }>;
initialized: TypedFunctionDescription<{ encode([]: []): string }>;
initialize: TypedFunctionDescription<{
encode([_assetChain, _assetAddress]: [BigNumberish, Arrayish]): string;
}>;
mint: TypedFunctionDescription<{
encode([account, amount]: [string, BigNumberish]): string;
}>;
burn: TypedFunctionDescription<{
encode([account, amount]: [string, BigNumberish]): string;
}>;
name: TypedFunctionDescription<{ encode([]: []): string }>;
symbol: TypedFunctionDescription<{ encode([]: []): string }>;
decimals: TypedFunctionDescription<{ encode([]: []): string }>;
totalSupply: TypedFunctionDescription<{ encode([]: []): string }>;
balanceOf: TypedFunctionDescription<{
encode([account]: [string]): string;
}>;
transfer: TypedFunctionDescription<{
encode([recipient, amount]: [string, BigNumberish]): string;
}>;
allowance: TypedFunctionDescription<{
encode([owner, spender]: [string, string]): string;
}>;
approve: TypedFunctionDescription<{
encode([spender, amount]: [string, BigNumberish]): string;
}>;
transferFrom: TypedFunctionDescription<{
encode([sender, recipient, amount]: [
string,
string,
BigNumberish,
]): string;
}>;
increaseAllowance: TypedFunctionDescription<{
encode([spender, addedValue]: [string, BigNumberish]): string;
}>;
decreaseAllowance: TypedFunctionDescription<{
encode([spender, subtractedValue]: [string, BigNumberish]): string;
}>;
};
events: {
Approval: TypedEventDescription<{
encodeTopics([owner, spender, value]: [
string | null,
string | null,
null,
]): string[];
}>;
Transfer: TypedEventDescription<{
encodeTopics([from, to, value]: [
string | null,
string | null,
null,
]): string[];
}>;
};
}
export class WrappedAsset extends Contract {
connect(signerOrProvider: Signer | Provider | string): WrappedAsset;
attach(addressOrName: string): WrappedAsset;
deployed(): Promise<WrappedAsset>;
on(event: EventFilter | string, listener: Listener): WrappedAsset;
once(event: EventFilter | string, listener: Listener): WrappedAsset;
addListener(
eventName: EventFilter | string,
listener: Listener,
): WrappedAsset;
removeAllListeners(eventName: EventFilter | string): WrappedAsset;
removeListener(eventName: any, listener: Listener): WrappedAsset;
interface: WrappedAssetInterface;
functions: {
assetAddress(overrides?: TransactionOverrides): Promise<string>;
'assetAddress()'(overrides?: TransactionOverrides): Promise<string>;
assetChain(overrides?: TransactionOverrides): Promise<number>;
'assetChain()'(overrides?: TransactionOverrides): Promise<number>;
bridge(overrides?: TransactionOverrides): Promise<string>;
'bridge()'(overrides?: TransactionOverrides): Promise<string>;
initialized(overrides?: TransactionOverrides): Promise<boolean>;
'initialized()'(overrides?: TransactionOverrides): Promise<boolean>;
initialize(
_assetChain: BigNumberish,
_assetAddress: Arrayish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
'initialize(uint8,bytes32)'(
_assetChain: BigNumberish,
_assetAddress: Arrayish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
mint(
account: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
'mint(address,uint256)'(
account: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
burn(
account: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
'burn(address,uint256)'(
account: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Returns the name of the token.
*/
name(overrides?: TransactionOverrides): Promise<string>;
/**
* Returns the name of the token.
*/
'name()'(overrides?: TransactionOverrides): Promise<string>;
/**
* Returns the symbol of the token, usually a shorter version of the name.
*/
symbol(overrides?: TransactionOverrides): Promise<string>;
/**
* Returns the symbol of the token, usually a shorter version of the name.
*/
'symbol()'(overrides?: TransactionOverrides): Promise<string>;
/**
* Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.
*/
decimals(overrides?: TransactionOverrides): Promise<number>;
/**
* Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.
*/
'decimals()'(overrides?: TransactionOverrides): Promise<number>;
/**
* See {IERC20-totalSupply}.
*/
totalSupply(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* See {IERC20-totalSupply}.
*/
'totalSupply()'(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* See {IERC20-balanceOf}.
*/
balanceOf(
account: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* See {IERC20-balanceOf}.
*/
'balanceOf(address)'(
account: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.
*/
transfer(
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.
*/
'transfer(address,uint256)'(
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* See {IERC20-allowance}.
*/
allowance(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* See {IERC20-allowance}.
*/
'allowance(address,address)'(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.
*/
approve(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.
*/
'approve(address,uint256)'(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.
*/
transferFrom(
sender: string,
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.
*/
'transferFrom(address,address,uint256)'(
sender: string,
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.
*/
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.
*/
'increaseAllowance(address,uint256)'(
spender: string,
addedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.
*/
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.
*/
'decreaseAllowance(address,uint256)'(
spender: string,
subtractedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
};
assetAddress(overrides?: TransactionOverrides): Promise<string>;
'assetAddress()'(overrides?: TransactionOverrides): Promise<string>;
assetChain(overrides?: TransactionOverrides): Promise<number>;
'assetChain()'(overrides?: TransactionOverrides): Promise<number>;
bridge(overrides?: TransactionOverrides): Promise<string>;
'bridge()'(overrides?: TransactionOverrides): Promise<string>;
initialized(overrides?: TransactionOverrides): Promise<boolean>;
'initialized()'(overrides?: TransactionOverrides): Promise<boolean>;
initialize(
_assetChain: BigNumberish,
_assetAddress: Arrayish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
'initialize(uint8,bytes32)'(
_assetChain: BigNumberish,
_assetAddress: Arrayish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
mint(
account: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
'mint(address,uint256)'(
account: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
burn(
account: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
'burn(address,uint256)'(
account: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Returns the name of the token.
*/
name(overrides?: TransactionOverrides): Promise<string>;
/**
* Returns the name of the token.
*/
'name()'(overrides?: TransactionOverrides): Promise<string>;
/**
* Returns the symbol of the token, usually a shorter version of the name.
*/
symbol(overrides?: TransactionOverrides): Promise<string>;
/**
* Returns the symbol of the token, usually a shorter version of the name.
*/
'symbol()'(overrides?: TransactionOverrides): Promise<string>;
/**
* Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.
*/
decimals(overrides?: TransactionOverrides): Promise<number>;
/**
* Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.
*/
'decimals()'(overrides?: TransactionOverrides): Promise<number>;
/**
* See {IERC20-totalSupply}.
*/
totalSupply(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* See {IERC20-totalSupply}.
*/
'totalSupply()'(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* See {IERC20-balanceOf}.
*/
balanceOf(
account: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* See {IERC20-balanceOf}.
*/
'balanceOf(address)'(
account: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.
*/
transfer(
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.
*/
'transfer(address,uint256)'(
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* See {IERC20-allowance}.
*/
allowance(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* See {IERC20-allowance}.
*/
'allowance(address,address)'(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.
*/
approve(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.
*/
'approve(address,uint256)'(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.
*/
transferFrom(
sender: string,
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.
*/
'transferFrom(address,address,uint256)'(
sender: string,
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.
*/
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.
*/
'increaseAllowance(address,uint256)'(
spender: string,
addedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.
*/
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
/**
* Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.
*/
'decreaseAllowance(address,uint256)'(
spender: string,
subtractedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<ContractTransaction>;
filters: {
Approval(
owner: string | null,
spender: string | null,
value: null,
): EventFilter;
Transfer(from: string | null, to: string | null, value: null): EventFilter;
};
estimate: {
assetAddress(overrides?: TransactionOverrides): Promise<BigNumber>;
'assetAddress()'(overrides?: TransactionOverrides): Promise<BigNumber>;
assetChain(overrides?: TransactionOverrides): Promise<BigNumber>;
'assetChain()'(overrides?: TransactionOverrides): Promise<BigNumber>;
bridge(overrides?: TransactionOverrides): Promise<BigNumber>;
'bridge()'(overrides?: TransactionOverrides): Promise<BigNumber>;
initialized(overrides?: TransactionOverrides): Promise<BigNumber>;
'initialized()'(overrides?: TransactionOverrides): Promise<BigNumber>;
initialize(
_assetChain: BigNumberish,
_assetAddress: Arrayish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
'initialize(uint8,bytes32)'(
_assetChain: BigNumberish,
_assetAddress: Arrayish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
mint(
account: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
'mint(address,uint256)'(
account: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
burn(
account: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
'burn(address,uint256)'(
account: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Returns the name of the token.
*/
name(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* Returns the name of the token.
*/
'name()'(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* Returns the symbol of the token, usually a shorter version of the name.
*/
symbol(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* Returns the symbol of the token, usually a shorter version of the name.
*/
'symbol()'(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.
*/
decimals(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.
*/
'decimals()'(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* See {IERC20-totalSupply}.
*/
totalSupply(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* See {IERC20-totalSupply}.
*/
'totalSupply()'(overrides?: TransactionOverrides): Promise<BigNumber>;
/**
* See {IERC20-balanceOf}.
*/
balanceOf(
account: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* See {IERC20-balanceOf}.
*/
'balanceOf(address)'(
account: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.
*/
transfer(
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.
*/
'transfer(address,uint256)'(
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* See {IERC20-allowance}.
*/
allowance(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* See {IERC20-allowance}.
*/
'allowance(address,address)'(
owner: string,
spender: string,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.
*/
approve(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.
*/
'approve(address,uint256)'(
spender: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.
*/
transferFrom(
sender: string,
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.
*/
'transferFrom(address,address,uint256)'(
sender: string,
recipient: string,
amount: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.
*/
increaseAllowance(
spender: string,
addedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.
*/
'increaseAllowance(address,uint256)'(
spender: string,
addedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.
*/
decreaseAllowance(
spender: string,
subtractedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
/**
* Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.
*/
'decreaseAllowance(address,uint256)'(
spender: string,
subtractedValue: BigNumberish,
overrides?: TransactionOverrides,
): Promise<BigNumber>;
};
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,28 @@
/* Generated by ts-generator ver. 0.0.8 */
/* tslint:disable */
import {
BigNumberish,
EventDescription,
FunctionDescription,
} from 'ethers/utils';
export interface TransactionOverrides {
gasLimit?: BigNumberish | Promise<BigNumberish>;
gasPrice?: BigNumberish | Promise<BigNumberish>;
nonce?: BigNumberish | Promise<BigNumberish>;
value?: BigNumberish | Promise<BigNumberish>;
from?: string | Promise<string>;
chainId?: number | Promise<number>;
}
export interface TypedEventDescription<
T extends Pick<EventDescription, 'encodeTopics'>
> extends EventDescription {
encodeTopics: T['encodeTopics'];
}
export interface TypedFunctionDescription<
T extends Pick<FunctionDescription, 'encode'>
> extends FunctionDescription {
encode: T['encode'];
}

View File

@ -12,6 +12,12 @@ export let LENDING_PROGRAM_ID = new PublicKey(
'LendZqTs7gn5CTSJU1jWKhKuVpjJGom45nnwPb2AMTi',
);
let WORMHOLE_BRIDGE: {
pubkey: PublicKey;
bridge: string;
wrappedMaster: string;
};
let SWAP_PROGRAM_ID: PublicKey;
let SWAP_PROGRAM_LEGACY_IDS: PublicKey[];
let SWAP_PROGRAM_LAYOUT: any;
@ -28,6 +34,11 @@ export const ENABLE_FEES_INPUT = false;
export const PROGRAM_IDS = [
{
name: 'mainnet-beta',
wormhole: () => ({
pubkey: new PublicKey('WormT3McKhFJ2RkiGpdw9GKvNCrB2aB54gb2uV9MfQC'),
bridge: '0xf92cD566Ea4864356C5491c177A430C222d7e678',
wrappedMaster: '9A5e27995309a03f8B583feBdE7eF289FcCdC6Ae',
}),
swap: () => ({
current: {
pubkey: new PublicKey('9qvG1zUp8xF1Bi4m6UdRNby1BAAuaDrUxSpv4CmRRMjL'),
@ -41,6 +52,11 @@ export const PROGRAM_IDS = [
},
{
name: 'testnet',
wormhole: () => ({
pubkey: new PublicKey('5gQf5AUhAgWYgUCt9ouShm9H7dzzXUsLdssYwe5krKhg'),
bridge: '0x251bBCD91E84098509beaeAfF0B9951859af66D3',
wrappedMaster: '0xE39f0b145C0aF079B214c5a8840B2B01eA14794c',
}),
swap: () => ({
current: {
pubkey: new PublicKey('2n2dsFSgmPcZ8jkmBZLGUM2nzuFqcBGQ3JEEj6RJJcEg'),
@ -51,6 +67,11 @@ export const PROGRAM_IDS = [
},
{
name: 'devnet',
wormhole: () => ({
pubkey: new PublicKey('WormT3McKhFJ2RkiGpdw9GKvNCrB2aB54gb2uV9MfQC'),
bridge: '0xf92cD566Ea4864356C5491c177A430C222d7e678',
wrappedMaster: '9A5e27995309a03f8B583feBdE7eF289FcCdC6Ae',
}),
swap: () => ({
current: {
pubkey: new PublicKey('6Cust2JhvweKLh4CVo1dt21s2PJ86uNGkziudpkNPaCj'),
@ -61,6 +82,11 @@ export const PROGRAM_IDS = [
},
{
name: 'localnet',
wormhole: () => ({
pubkey: new PublicKey('WormT3McKhFJ2RkiGpdw9GKvNCrB2aB54gb2uV9MfQC'),
bridge: '0xf92cD566Ea4864356C5491c177A430C222d7e678',
wrappedMaster: '9A5e27995309a03f8B583feBdE7eF289FcCdC6Ae',
}),
swap: () => ({
current: {
pubkey: new PublicKey('369YmCWHGxznT7GGBhcLZDRcRoGWmGKFWdmtiPy78yj7'),
@ -77,6 +103,8 @@ export const setProgramIds = (envName: string) => {
return;
}
WORMHOLE_BRIDGE = instance.wormhole();
let swap = instance.swap();
SWAP_PROGRAM_ID = swap.current.pubkey;
@ -95,7 +123,7 @@ export const programIds = () => {
token: TOKEN_PROGRAM_ID,
swap: SWAP_PROGRAM_ID,
swapLayout: SWAP_PROGRAM_LAYOUT,
swap_legacy: SWAP_PROGRAM_LEGACY_IDS,
lending: LENDING_PROGRAM_ID,
wormhole: WORMHOLE_BRIDGE,
};
};