diff --git a/v2/data/addresses.testnet.json b/v2/data/addresses.testnet.json index b34979f2..0bd066e8 100644 --- a/v2/data/addresses.testnet.json +++ b/v2/data/addresses.testnet.json @@ -6,6 +6,13 @@ "chain_name": "bsc_testnet", "type": "connector" }, + { + "address": "0xd80be3710f08d280f51115e072e5d2a778946cd7", + "category": "omnichain", + "chain_id": 97, + "chain_name": "bsc_testnet", + "type": "custody" + }, { "address": "0x0000a7db254145767262c6a81a7ee1650684258e", "category": "omnichain", @@ -13,6 +20,13 @@ "chain_name": "bsc_testnet", "type": "erc20Custody" }, + { + "address": "0x0c487a766110c85d301d96e33579c5b317fa4995", + "category": "omnichain", + "chain_id": 97, + "chain_name": "bsc_testnet", + "type": "gateway" + }, { "address": "0x8531a5aB847ff5B22D855633C25ED1DA3255247e", "category": "omnichain", @@ -246,6 +260,13 @@ "chain_name": "amoy_testnet", "type": "connector" }, + { + "address": "0xd80be3710f08d280f51115e072e5d2a778946cd7", + "category": "omnichain", + "chain_id": 80002, + "chain_name": "amoy_testnet", + "type": "custody" + }, { "address": "0xFDE448af6140a8702A1165c44A0895ebE24b0C02", "category": "omnichain", @@ -253,6 +274,13 @@ "chain_name": "amoy_testnet", "type": "erc20Custody" }, + { + "address": "0x0c487a766110c85d301d96e33579c5b317fa4995", + "category": "omnichain", + "chain_id": 80002, + "chain_name": "amoy_testnet", + "type": "gateway" + }, { "address": "0x8531a5aB847ff5B22D855633C25ED1DA3255247e", "category": "omnichain", @@ -274,6 +302,13 @@ "chain_name": "base_sepolia", "type": "connector" }, + { + "address": "0xd80be3710f08d280f51115e072e5d2a778946cd7", + "category": "omnichain", + "chain_id": 84532, + "chain_name": "base_sepolia", + "type": "custody" + }, { "address": "0x3A1f7b35EF57543B4e86c384eF6a368Ed811a36E", "category": "omnichain", @@ -281,6 +316,13 @@ "chain_name": "base_sepolia", "type": "erc20Custody" }, + { + "address": "0x0c487a766110c85d301d96e33579c5b317fa4995", + "category": "omnichain", + "chain_id": 84532, + "chain_name": "base_sepolia", + "type": "gateway" + }, { "address": "0x8531a5aB847ff5B22D855633C25ED1DA3255247e", "category": "omnichain", @@ -302,6 +344,13 @@ "chain_name": "sepolia_testnet", "type": "connector" }, + { + "address": "0xd80be3710f08d280f51115e072e5d2a778946cd7", + "category": "omnichain", + "chain_id": 11155111, + "chain_name": "sepolia_testnet", + "type": "custody" + }, { "address": "0x84725b70a239d3Faa7C6EF0C6C8E8b6c8e28338b", "category": "omnichain", @@ -309,6 +358,13 @@ "chain_name": "sepolia_testnet", "type": "erc20Custody" }, + { + "address": "0x0c487a766110c85d301d96e33579c5b317fa4995", + "category": "omnichain", + "chain_id": 11155111, + "chain_name": "sepolia_testnet", + "type": "gateway" + }, { "address": "0x8531a5aB847ff5B22D855633C25ED1DA3255247e", "category": "omnichain", diff --git a/v2/docs/src/README.md b/v2/docs/src/README.md index 8b192b3e..706a7a69 100644 --- a/v2/docs/src/README.md +++ b/v2/docs/src/README.md @@ -41,12 +41,18 @@ $ forge snapshot $ anvil ``` -### Deploy using script +### Deploy ```shell $ forge script script/.s.sol: --rpc-url --private-key ``` +##### More detailed instructions + +To view detailed instructions on how to deploy the contracts, please refer to the [Deployment Guide](./scripts/deploy/readme.md). + +This guide covers all steps required to deploy the contracts, including environment setup, commands, and best practices. + ### Cast ```shell diff --git a/v2/docs/src/index.md b/v2/docs/src/index.md index 167051d0..fd0352eb 100644 --- a/v2/docs/src/index.md +++ b/v2/docs/src/index.md @@ -45,12 +45,18 @@ $ forge snapshot $ anvil ``` -### Deploy using script +### Deploy ```shell $ forge script script/.s.sol: --rpc-url --private-key ``` +##### More detailed instructions + +To view detailed instructions on how to deploy the contracts, please refer to the [Deployment Guide](./scripts/deploy/readme.md). + +This guide covers all steps required to deploy the contracts, including environment setup, commands, and best practices. + ### Cast ```shell diff --git a/v2/lib/types.ts b/v2/lib/types.ts index 8ef0c375..4e6e7338 100644 --- a/v2/lib/types.ts +++ b/v2/lib/types.ts @@ -1,4 +1,4 @@ export type ParamSymbol = "USDC.BSC" | "USDC.ETH" | "BTC.BTC" | "ETH.BASE" | "PEPE.ETH" | "BNB.BSC" | "SHIB.ETH" | "USDT.ETH" | "USDT.BSC" | "USDC.BASE" | "POL.POLYGON" | "DAI.ETH" | "ULTI.BSC" | "ETH.ETH" | "USDT.POL" | "ULTI.ETH" | "USDC.POL" | "sETH.SEPOLIA" | "USDC" | "gETH" | "ETH.BASESEPOLIA" | "tMATIC" | "tBTC" | "MATIC.AMOY" | "SOL.SOLANA" | "USDC.SEPOLIA" | "tBNB"; export type ParamChainName = "eth_mainnet" | "bsc_mainnet" | "polygon_mainnet" | "zeta_mainnet" | "btc_mainnet" | "base_mainnet" | "bsc_testnet" | "solana_devnet" | "zeta_testnet" | "btc_testnet" | "amoy_testnet" | "base_sepolia" | "sepolia_testnet"; -export type ParamType = "connector" | "erc20Custody" | "tss" | "uniswapV2Factory" | "uniswapV2Router02" | "uniswapV3Factory" | "uniswapV3Router" | "weth9" | "zetaToken" | "fungibleModule" | "systemContract" | "zrc20" | "gateway"; +export type ParamType = "connector" | "erc20Custody" | "tss" | "uniswapV2Factory" | "uniswapV2Router02" | "uniswapV3Factory" | "uniswapV3Router" | "weth9" | "zetaToken" | "fungibleModule" | "systemContract" | "zrc20" | "custody" | "gateway"; diff --git a/v2/tasks/addresses.testnet.json b/v2/tasks/addresses.testnet.json index 97d444c7..04c2e458 100644 --- a/v2/tasks/addresses.testnet.json +++ b/v2/tasks/addresses.testnet.json @@ -5,5 +5,61 @@ "chain_id": 901, "chain_name": "solana_devnet", "type": "gateway" + }, + { + "address": "0x0c487a766110c85d301d96e33579c5b317fa4995", + "category": "omnichain", + "chain_id": 84532, + "chain_name": "base_sepolia", + "type": "gateway" + }, + { + "address": "0xd80be3710f08d280f51115e072e5d2a778946cd7", + "category": "omnichain", + "chain_id": 84532, + "chain_name": "base_sepolia", + "type": "custody" + }, + { + "address": "0x0c487a766110c85d301d96e33579c5b317fa4995", + "category": "omnichain", + "chain_id": 11155111, + "chain_name": "sepolia_testnet", + "type": "gateway" + }, + { + "address": "0xd80be3710f08d280f51115e072e5d2a778946cd7", + "category": "omnichain", + "chain_id": 11155111, + "chain_name": "sepolia_testnet", + "type": "custody" + }, + { + "address": "0x0c487a766110c85d301d96e33579c5b317fa4995", + "category": "omnichain", + "chain_id": 97, + "chain_name": "bsc_testnet", + "type": "gateway" + }, + { + "address": "0xd80be3710f08d280f51115e072e5d2a778946cd7", + "category": "omnichain", + "chain_id": 97, + "chain_name": "bsc_testnet", + "type": "custody" + }, + { + "address": "0x0c487a766110c85d301d96e33579c5b317fa4995", + "category": "omnichain", + "chain_id": 80002, + "chain_name": "amoy_testnet", + "type": "gateway" + }, + { + "address": "0xd80be3710f08d280f51115e072e5d2a778946cd7", + "category": "omnichain", + "chain_id": 80002, + "chain_name": "amoy_testnet", + "type": "custody" } ] \ No newline at end of file diff --git a/v2/types/Errors.sol/Errors.ts b/v2/types/Errors.sol/Errors.ts new file mode 100644 index 00000000..c71f7eaa --- /dev/null +++ b/v2/types/Errors.sol/Errors.ts @@ -0,0 +1,69 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + FunctionFragment, + Interface, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, +} from "../common"; + +export interface ErrorsInterface extends Interface {} + +export interface Errors extends BaseContract { + connect(runner?: ContractRunner | null): Errors; + waitForDeployment(): Promise; + + interface: ErrorsInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + getFunction( + key: string | FunctionFragment + ): T; + + filters: {}; +} diff --git a/v2/types/IERC1363.ts b/v2/types/IERC1363.ts new file mode 100644 index 00000000..b5f9c599 --- /dev/null +++ b/v2/types/IERC1363.ts @@ -0,0 +1,412 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + EventFragment, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedLogDescription, + TypedListener, + TypedContractMethod, +} from "./common"; + +export interface IERC1363Interface extends Interface { + getFunction( + nameOrSignature: + | "allowance" + | "approve" + | "approveAndCall(address,uint256)" + | "approveAndCall(address,uint256,bytes)" + | "balanceOf" + | "supportsInterface" + | "totalSupply" + | "transfer" + | "transferAndCall(address,uint256)" + | "transferAndCall(address,uint256,bytes)" + | "transferFrom" + | "transferFromAndCall(address,address,uint256,bytes)" + | "transferFromAndCall(address,address,uint256)" + ): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; + + encodeFunctionData( + functionFragment: "allowance", + values: [AddressLike, AddressLike] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "approveAndCall(address,uint256)", + values: [AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "approveAndCall(address,uint256,bytes)", + values: [AddressLike, BigNumberish, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "balanceOf", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "supportsInterface", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferAndCall(address,uint256)", + values: [AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferAndCall(address,uint256,bytes)", + values: [AddressLike, BigNumberish, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [AddressLike, AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferFromAndCall(address,address,uint256,bytes)", + values: [AddressLike, AddressLike, BigNumberish, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "transferFromAndCall(address,address,uint256)", + values: [AddressLike, AddressLike, BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "approveAndCall(address,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "approveAndCall(address,uint256,bytes)", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferAndCall(address,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferAndCall(address,uint256,bytes)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferFromAndCall(address,address,uint256,bytes)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferFromAndCall(address,address,uint256)", + data: BytesLike + ): Result; +} + +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, value: bigint]; + export interface OutputObject { + owner: string; + spender: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace TransferEvent { + export type InputTuple = [ + from: AddressLike, + to: AddressLike, + value: BigNumberish + ]; + export type OutputTuple = [from: string, to: string, value: bigint]; + export interface OutputObject { + from: string; + to: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface IERC1363 extends BaseContract { + connect(runner?: ContractRunner | null): IERC1363; + waitForDeployment(): Promise; + + interface: IERC1363Interface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + + "approveAndCall(address,uint256)": TypedContractMethod< + [spender: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + + "approveAndCall(address,uint256,bytes)": TypedContractMethod< + [spender: AddressLike, value: BigNumberish, data: BytesLike], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + supportsInterface: TypedContractMethod< + [interfaceId: BytesLike], + [boolean], + "view" + >; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + + "transferAndCall(address,uint256)": TypedContractMethod< + [to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + + "transferAndCall(address,uint256,bytes)": TypedContractMethod< + [to: AddressLike, value: BigNumberish, data: BytesLike], + [boolean], + "nonpayable" + >; + + transferFrom: TypedContractMethod< + [from: AddressLike, to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + + "transferFromAndCall(address,address,uint256,bytes)": TypedContractMethod< + [from: AddressLike, to: AddressLike, value: BigNumberish, data: BytesLike], + [boolean], + "nonpayable" + >; + + "transferFromAndCall(address,address,uint256)": TypedContractMethod< + [from: AddressLike, to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "approveAndCall(address,uint256)" + ): TypedContractMethod< + [spender: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "approveAndCall(address,uint256,bytes)" + ): TypedContractMethod< + [spender: AddressLike, value: BigNumberish, data: BytesLike], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "supportsInterface" + ): TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferAndCall(address,uint256)" + ): TypedContractMethod< + [to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferAndCall(address,uint256,bytes)" + ): TypedContractMethod< + [to: AddressLike, value: BigNumberish, data: BytesLike], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [from: AddressLike, to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFromAndCall(address,address,uint256,bytes)" + ): TypedContractMethod< + [from: AddressLike, to: AddressLike, value: BigNumberish, data: BytesLike], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFromAndCall(address,address,uint256)" + ): TypedContractMethod< + [from: AddressLike, to: AddressLike, value: BigNumberish], + [boolean], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + + filters: { + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + }; +} diff --git a/v2/types/SafeCast.ts b/v2/types/SafeCast.ts new file mode 100644 index 00000000..22729a94 --- /dev/null +++ b/v2/types/SafeCast.ts @@ -0,0 +1,69 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + FunctionFragment, + Interface, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, +} from "./common"; + +export interface SafeCastInterface extends Interface {} + +export interface SafeCast extends BaseContract { + connect(runner?: ContractRunner | null): SafeCast; + waitForDeployment(): Promise; + + interface: SafeCastInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + getFunction( + key: string | FunctionFragment + ): T; + + filters: {}; +} diff --git a/v2/types/factories/Errors.sol/Errors__factory.ts b/v2/types/factories/Errors.sol/Errors__factory.ts new file mode 100644 index 00000000..316234e7 --- /dev/null +++ b/v2/types/factories/Errors.sol/Errors__factory.ts @@ -0,0 +1,98 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../../common"; +import type { Errors, ErrorsInterface } from "../../Errors.sol/Errors"; + +const _abi = [ + { + type: "error", + name: "FailedCall", + inputs: [], + }, + { + type: "error", + name: "FailedDeployment", + inputs: [], + }, + { + type: "error", + name: "InsufficientBalance", + inputs: [ + { + name: "balance", + type: "uint256", + internalType: "uint256", + }, + { + name: "needed", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "MissingPrecompile", + inputs: [ + { + name: "", + type: "address", + internalType: "address", + }, + ], + }, +] as const; + +const _bytecode = + "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220864be11671dbd20517c731942f0547cf4bdbf11580a75261054f6881849e3dd364736f6c634300081a0033"; + +type ErrorsConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: ErrorsConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class Errors__factory extends ContractFactory { + constructor(...args: ErrorsConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override getDeployTransaction( + overrides?: NonPayableOverrides & { from?: string } + ): Promise { + return super.getDeployTransaction(overrides || {}); + } + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + Errors & { + deploymentTransaction(): ContractTransactionResponse; + } + >; + } + override connect(runner: ContractRunner | null): Errors__factory { + return super.connect(runner) as Errors__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): ErrorsInterface { + return new Interface(_abi) as ErrorsInterface; + } + static connect(address: string, runner?: ContractRunner | null): Errors { + return new Contract(address, _abi, runner) as unknown as Errors; + } +} diff --git a/v2/types/factories/IERC1363__factory.ts b/v2/types/factories/IERC1363__factory.ts new file mode 100644 index 00000000..f54435ea --- /dev/null +++ b/v2/types/factories/IERC1363__factory.ts @@ -0,0 +1,390 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { IERC1363, IERC1363Interface } from "../IERC1363"; + +const _abi = [ + { + type: "function", + name: "allowance", + inputs: [ + { + name: "owner", + type: "address", + internalType: "address", + }, + { + name: "spender", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "approve", + inputs: [ + { + name: "spender", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "approveAndCall", + inputs: [ + { + name: "spender", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "approveAndCall", + inputs: [ + { + name: "spender", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "balanceOf", + inputs: [ + { + name: "account", + type: "address", + internalType: "address", + }, + ], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "supportsInterface", + inputs: [ + { + name: "interfaceId", + type: "bytes4", + internalType: "bytes4", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "totalSupply", + inputs: [], + outputs: [ + { + name: "", + type: "uint256", + internalType: "uint256", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "transfer", + inputs: [ + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "transferAndCall", + inputs: [ + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "transferAndCall", + inputs: [ + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "transferFrom", + inputs: [ + { + name: "from", + type: "address", + internalType: "address", + }, + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "transferFromAndCall", + inputs: [ + { + name: "from", + type: "address", + internalType: "address", + }, + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + { + name: "data", + type: "bytes", + internalType: "bytes", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "transferFromAndCall", + inputs: [ + { + name: "from", + type: "address", + internalType: "address", + }, + { + name: "to", + type: "address", + internalType: "address", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + ], + outputs: [ + { + name: "", + type: "bool", + internalType: "bool", + }, + ], + stateMutability: "nonpayable", + }, + { + type: "event", + name: "Approval", + inputs: [ + { + name: "owner", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "spender", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "value", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Transfer", + inputs: [ + { + name: "from", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "to", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "value", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, +] as const; + +export class IERC1363__factory { + static readonly abi = _abi; + static createInterface(): IERC1363Interface { + return new Interface(_abi) as IERC1363Interface; + } + static connect(address: string, runner?: ContractRunner | null): IERC1363 { + return new Contract(address, _abi, runner) as unknown as IERC1363; + } +} diff --git a/v2/types/factories/SafeCast__factory.ts b/v2/types/factories/SafeCast__factory.ts new file mode 100644 index 00000000..54675b7f --- /dev/null +++ b/v2/types/factories/SafeCast__factory.ts @@ -0,0 +1,115 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + Contract, + ContractFactory, + ContractTransactionResponse, + Interface, +} from "ethers"; +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers"; +import type { NonPayableOverrides } from "../common"; +import type { SafeCast, SafeCastInterface } from "../SafeCast"; + +const _abi = [ + { + type: "error", + name: "SafeCastOverflowedIntDowncast", + inputs: [ + { + name: "bits", + type: "uint8", + internalType: "uint8", + }, + { + name: "value", + type: "int256", + internalType: "int256", + }, + ], + }, + { + type: "error", + name: "SafeCastOverflowedIntToUint", + inputs: [ + { + name: "value", + type: "int256", + internalType: "int256", + }, + ], + }, + { + type: "error", + name: "SafeCastOverflowedUintDowncast", + inputs: [ + { + name: "bits", + type: "uint8", + internalType: "uint8", + }, + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + ], + }, + { + type: "error", + name: "SafeCastOverflowedUintToInt", + inputs: [ + { + name: "value", + type: "uint256", + internalType: "uint256", + }, + ], + }, +] as const; + +const _bytecode = + "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122030ae7d102b98fbb49ab3d71448489a1a42d2e40d7ac2e57bc7e7d63d4d07909564736f6c634300081a0033"; + +type SafeCastConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: SafeCastConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class SafeCast__factory extends ContractFactory { + constructor(...args: SafeCastConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override getDeployTransaction( + overrides?: NonPayableOverrides & { from?: string } + ): Promise { + return super.getDeployTransaction(overrides || {}); + } + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise< + SafeCast & { + deploymentTransaction(): ContractTransactionResponse; + } + >; + } + override connect(runner: ContractRunner | null): SafeCast__factory { + return super.connect(runner) as SafeCast__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): SafeCastInterface { + return new Interface(_abi) as SafeCastInterface; + } + static connect(address: string, runner?: ContractRunner | null): SafeCast { + return new Contract(address, _abi, runner) as unknown as SafeCast; + } +}