Optimized SafeTransferLib (Solady)
This commit is contained in:
78
src/types/factories/lib/utils/SafeTransferLib__factory.ts
Normal file
78
src/types/factories/lib/utils/SafeTransferLib__factory.ts
Normal file
@@ -0,0 +1,78 @@
|
||||
/* Autogenerated file. Do not edit manually. */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers";
|
||||
import type { Provider, TransactionRequest } from "@ethersproject/providers";
|
||||
import type { PromiseOrValue } from "../../../common";
|
||||
import type {
|
||||
SafeTransferLib,
|
||||
SafeTransferLibInterface,
|
||||
} from "../../../lib/utils/SafeTransferLib";
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
inputs: [],
|
||||
name: "ETHTransferFailed",
|
||||
type: "error",
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: "TransferFailed",
|
||||
type: "error",
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: "TransferFromFailed",
|
||||
type: "error",
|
||||
},
|
||||
];
|
||||
|
||||
const _bytecode =
|
||||
"0x602d6037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea164736f6c6343000809000a";
|
||||
|
||||
type SafeTransferLibConstructorParams =
|
||||
| [signer?: Signer]
|
||||
| ConstructorParameters<typeof ContractFactory>;
|
||||
|
||||
const isSuperArgs = (
|
||||
xs: SafeTransferLibConstructorParams
|
||||
): xs is ConstructorParameters<typeof ContractFactory> => xs.length > 1;
|
||||
|
||||
export class SafeTransferLib__factory extends ContractFactory {
|
||||
constructor(...args: SafeTransferLibConstructorParams) {
|
||||
if (isSuperArgs(args)) {
|
||||
super(...args);
|
||||
} else {
|
||||
super(_abi, _bytecode, args[0]);
|
||||
}
|
||||
}
|
||||
|
||||
override deploy(
|
||||
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
||||
): Promise<SafeTransferLib> {
|
||||
return super.deploy(overrides || {}) as Promise<SafeTransferLib>;
|
||||
}
|
||||
override getDeployTransaction(
|
||||
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
||||
): TransactionRequest {
|
||||
return super.getDeployTransaction(overrides || {});
|
||||
}
|
||||
override attach(address: string): SafeTransferLib {
|
||||
return super.attach(address) as SafeTransferLib;
|
||||
}
|
||||
override connect(signer: Signer): SafeTransferLib__factory {
|
||||
return super.connect(signer) as SafeTransferLib__factory;
|
||||
}
|
||||
|
||||
static readonly bytecode = _bytecode;
|
||||
static readonly abi = _abi;
|
||||
static createInterface(): SafeTransferLibInterface {
|
||||
return new utils.Interface(_abi) as SafeTransferLibInterface;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): SafeTransferLib {
|
||||
return new Contract(address, _abi, signerOrProvider) as SafeTransferLib;
|
||||
}
|
||||
}
|
||||
@@ -3,3 +3,4 @@
|
||||
/* eslint-disable */
|
||||
export { Multicall__factory } from "./Multicall__factory";
|
||||
export { ReentrancyGuard__factory } from "./ReentrancyGuard__factory";
|
||||
export { SafeTransferLib__factory } from "./SafeTransferLib__factory";
|
||||
|
||||
File diff suppressed because one or more lines are too long
9
src/types/hardhat.d.ts
vendored
9
src/types/hardhat.d.ts
vendored
@@ -40,6 +40,10 @@ declare module "hardhat/types/runtime" {
|
||||
name: "ReentrancyGuard",
|
||||
signerOrOptions?: ethers.Signer | FactoryOptions
|
||||
): Promise<Contracts.ReentrancyGuard__factory>;
|
||||
getContractFactory(
|
||||
name: "SafeTransferLib",
|
||||
signerOrOptions?: ethers.Signer | FactoryOptions
|
||||
): Promise<Contracts.SafeTransferLib__factory>;
|
||||
getContractFactory(
|
||||
name: "P2PIX",
|
||||
signerOrOptions?: ethers.Signer | FactoryOptions
|
||||
@@ -84,6 +88,11 @@ declare module "hardhat/types/runtime" {
|
||||
address: string,
|
||||
signer?: ethers.Signer
|
||||
): Promise<Contracts.ReentrancyGuard>;
|
||||
getContractAt(
|
||||
name: "SafeTransferLib",
|
||||
address: string,
|
||||
signer?: ethers.Signer
|
||||
): Promise<Contracts.SafeTransferLib>;
|
||||
getContractAt(
|
||||
name: "P2PIX",
|
||||
address: string,
|
||||
|
||||
@@ -21,6 +21,8 @@ export type { Multicall } from "./lib/utils/Multicall";
|
||||
export { Multicall__factory } from "./factories/lib/utils/Multicall__factory";
|
||||
export type { ReentrancyGuard } from "./lib/utils/ReentrancyGuard";
|
||||
export { ReentrancyGuard__factory } from "./factories/lib/utils/ReentrancyGuard__factory";
|
||||
export type { SafeTransferLib } from "./lib/utils/SafeTransferLib";
|
||||
export { SafeTransferLib__factory } from "./factories/lib/utils/SafeTransferLib__factory";
|
||||
export type { P2PIX } from "./p2pix.sol/P2PIX";
|
||||
export { P2PIX__factory } from "./factories/p2pix.sol/P2PIX__factory";
|
||||
export { Reputation__factory } from "./factories/Reputation__factory";
|
||||
|
||||
56
src/types/lib/utils/SafeTransferLib.ts
Normal file
56
src/types/lib/utils/SafeTransferLib.ts
Normal file
@@ -0,0 +1,56 @@
|
||||
/* Autogenerated file. Do not edit manually. */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { BaseContract, Signer, utils } from "ethers";
|
||||
|
||||
import type { Listener, Provider } from "@ethersproject/providers";
|
||||
import type {
|
||||
TypedEventFilter,
|
||||
TypedEvent,
|
||||
TypedListener,
|
||||
OnEvent,
|
||||
PromiseOrValue,
|
||||
} from "../../common";
|
||||
|
||||
export interface SafeTransferLibInterface extends utils.Interface {
|
||||
functions: {};
|
||||
|
||||
events: {};
|
||||
}
|
||||
|
||||
export interface SafeTransferLib extends BaseContract {
|
||||
connect(signerOrProvider: Signer | Provider | string): this;
|
||||
attach(addressOrName: string): this;
|
||||
deployed(): Promise<this>;
|
||||
|
||||
interface: SafeTransferLibInterface;
|
||||
|
||||
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: {};
|
||||
|
||||
callStatic: {};
|
||||
|
||||
filters: {};
|
||||
|
||||
estimateGas: {};
|
||||
|
||||
populateTransaction: {};
|
||||
}
|
||||
@@ -3,3 +3,4 @@
|
||||
/* eslint-disable */
|
||||
export type { Multicall } from "./Multicall";
|
||||
export type { ReentrancyGuard } from "./ReentrancyGuard";
|
||||
export type { SafeTransferLib } from "./SafeTransferLib";
|
||||
|
||||
Reference in New Issue
Block a user