-
Notifications
You must be signed in to change notification settings - Fork 353
/
SafeMath__factory.ts
159 lines (152 loc) 路 4.49 KB
/
SafeMath__factory.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
/* 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 {
SafeMath,
SafeMathInterface,
} from "../../../../artifacts/contracts/lib/SafeMath";
const _abi = [
{
inputs: [
{
internalType: "uint256",
name: "num1",
type: "uint256",
},
{
internalType: "uint256",
name: "num2",
type: "uint256",
},
],
name: "add",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "pure",
type: "function",
},
{
inputs: [
{
internalType: "uint256",
name: "num1",
type: "uint256",
},
{
internalType: "uint256",
name: "num2",
type: "uint256",
},
],
name: "div",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "pure",
type: "function",
},
{
inputs: [
{
internalType: "uint256",
name: "num1",
type: "uint256",
},
{
internalType: "uint256",
name: "num2",
type: "uint256",
},
],
name: "mul",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "pure",
type: "function",
},
{
inputs: [
{
internalType: "uint256",
name: "num1",
type: "uint256",
},
{
internalType: "uint256",
name: "num2",
type: "uint256",
},
],
name: "sub",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "pure",
type: "function",
},
] as const;
const _bytecode =
"0x610210610026600b82828239805160001a60731461001957fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100565760003560e01c8063771602f71461005b578063a391c15b146100a7578063b67d77c5146100f3578063c8a4ac9c1461013f575b600080fd5b6100916004803603604081101561007157600080fd5b81019080803590602001909291908035906020019092919050505061018b565b6040518082815260200191505060405180910390f35b6100dd600480360360408110156100bd57600080fd5b81019080803590602001909291908035906020019092919050505061019d565b6040518082815260200191505060405180910390f35b6101296004803603604081101561010957600080fd5b8101908080359060200190929190803590602001909291905050506101b6565b6040518082815260200191505060405180910390f35b6101756004803603604081101561015557600080fd5b8101908080359060200190929190803590602001909291905050506101c8565b6040518082815260200191505060405180910390f35b60008082840190508091505092915050565b6000808284816101a957fe5b0490508091505092915050565b60008082840390508091505092915050565b6000808284029050809150509291505056fea26469706673582212203c34f01efc94c8b101efa6073eac7b7664a0edb302f1f7cd4364fc6bef8a919164736f6c63430007030033";
type SafeMathConstructorParams =
| [signer?: Signer]
| ConstructorParameters<typeof ContractFactory>;
const isSuperArgs = (
xs: SafeMathConstructorParams
): xs is ConstructorParameters<typeof ContractFactory> => xs.length > 1;
export class SafeMath__factory extends ContractFactory {
constructor(...args: SafeMathConstructorParams) {
if (isSuperArgs(args)) {
super(...args);
} else {
super(_abi, _bytecode, args[0]);
}
}
override deploy(
overrides?: Overrides & { from?: PromiseOrValue<string> }
): Promise<SafeMath> {
return super.deploy(overrides || {}) as Promise<SafeMath>;
}
override getDeployTransaction(
overrides?: Overrides & { from?: PromiseOrValue<string> }
): TransactionRequest {
return super.getDeployTransaction(overrides || {});
}
override attach(address: string): SafeMath {
return super.attach(address) as SafeMath;
}
override connect(signer: Signer): SafeMath__factory {
return super.connect(signer) as SafeMath__factory;
}
static readonly bytecode = _bytecode;
static readonly abi = _abi;
static createInterface(): SafeMathInterface {
return new utils.Interface(_abi) as SafeMathInterface;
}
static connect(
address: string,
signerOrProvider: Signer | Provider
): SafeMath {
return new Contract(address, _abi, signerOrProvider) as SafeMath;
}
}