@obolnetwork/obol-sdk 2.11.3 → 2.11.5-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/src/index.js +17457 -382
- package/dist/cjs/src/index.js.map +1 -0
- package/dist/esm/src/index.js +17424 -361
- package/dist/esm/src/index.js.map +1 -0
- package/dist/types/src/abi/OVM.d.ts +103 -0
- package/dist/types/src/bytecodes.d.ts +3 -2
- package/dist/types/src/constants.d.ts +1 -2
- package/dist/types/src/eoa/eoaHelpers.d.ts +1 -1
- package/dist/types/src/exits/verificationHelpers.d.ts +0 -2
- package/dist/types/src/incentives/incentiveHelpers.d.ts +1 -1
- package/dist/types/src/splits/splitHelpers.d.ts +3 -3
- package/dist/types/src/utils.d.ts +2 -2
- package/dist/types/src/verification/common.d.ts +0 -2
- package/dist/types/src/verification/signature-validator.d.ts +4 -4
- package/dist/types/src/verification/v1.10.0.d.ts +1 -1
- package/dist/types/src/verification/v1.6.0.d.ts +1 -1
- package/dist/types/src/verification/v1.7.0.d.ts +1 -1
- package/dist/types/src/verification/v1.8.0.d.ts +1 -1
- package/dist/types/test/client/methods.spec.d.ts +17 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -0
- package/dist/types/tsup.config.d.ts +2 -0
- package/package.json +79 -54
- package/dist/cjs/package.json +0 -139
- package/dist/cjs/src/abi/BatchDeposit.js +0 -120
- package/dist/cjs/src/abi/MerkleDistributorWithDeadline.js +0 -73
- package/dist/cjs/src/abi/Multicall3.js +0 -253
- package/dist/cjs/src/abi/OVMFactory.js +0 -620
- package/dist/cjs/src/abi/OWR.js +0 -304
- package/dist/cjs/src/abi/SplitMain.js +0 -929
- package/dist/cjs/src/abi/splitV2FactoryAbi.js +0 -420
- package/dist/cjs/src/ajv.js +0 -136
- package/dist/cjs/src/base.js +0 -42
- package/dist/cjs/src/bytecodes.js +0 -18
- package/dist/cjs/src/constants.js +0 -268
- package/dist/cjs/src/eoa/eoa.js +0 -132
- package/dist/cjs/src/eoa/eoaHelpers.js +0 -82
- package/dist/cjs/src/errors.js +0 -11
- package/dist/cjs/src/exits/ethUtils.js +0 -57
- package/dist/cjs/src/exits/exit.js +0 -502
- package/dist/cjs/src/exits/verificationHelpers.js +0 -86
- package/dist/cjs/src/incentives/incentiveHelpers.js +0 -39
- package/dist/cjs/src/incentives/incentives.js +0 -119
- package/dist/cjs/src/schema.js +0 -352
- package/dist/cjs/src/services.js +0 -33
- package/dist/cjs/src/splits/splitHelpers.js +0 -571
- package/dist/cjs/src/splits/splits.js +0 -366
- package/dist/cjs/src/types.js +0 -29
- package/dist/cjs/src/utils.js +0 -77
- package/dist/cjs/src/verification/common.js +0 -355
- package/dist/cjs/src/verification/signature-validator.js +0 -73
- package/dist/cjs/src/verification/sszTypes.js +0 -69
- package/dist/cjs/src/verification/termsAndConditions.js +0 -40
- package/dist/cjs/src/verification/v1.10.0.js +0 -146
- package/dist/cjs/src/verification/v1.6.0.js +0 -149
- package/dist/cjs/src/verification/v1.7.0.js +0 -173
- package/dist/cjs/src/verification/v1.8.0.js +0 -196
- package/dist/cjs/test/client/ajv.spec.js +0 -320
- package/dist/cjs/test/client/methods.spec.js +0 -418
- package/dist/cjs/test/eoa/eoa.spec.js +0 -176
- package/dist/cjs/test/exit/ethUtils.spec.js +0 -83
- package/dist/cjs/test/exit/exit.spec.js +0 -399
- package/dist/cjs/test/exit/verificationHelpers.spec.js +0 -68
- package/dist/cjs/test/fixtures.js +0 -896
- package/dist/cjs/test/incentives/incentives.spec.js +0 -202
- package/dist/cjs/test/splits/splits.spec.js +0 -402
- package/dist/esm/package.json +0 -139
- package/dist/esm/src/abi/BatchDeposit.js +0 -117
- package/dist/esm/src/abi/MerkleDistributorWithDeadline.js +0 -70
- package/dist/esm/src/abi/Multicall3.js +0 -250
- package/dist/esm/src/abi/OVMFactory.js +0 -617
- package/dist/esm/src/abi/OWR.js +0 -301
- package/dist/esm/src/abi/SplitMain.js +0 -926
- package/dist/esm/src/abi/splitV2FactoryAbi.js +0 -417
- package/dist/esm/src/ajv.js +0 -129
- package/dist/esm/src/base.js +0 -38
- package/dist/esm/src/bytecodes.js +0 -15
- package/dist/esm/src/constants.js +0 -234
- package/dist/esm/src/eoa/eoa.js +0 -128
- package/dist/esm/src/eoa/eoaHelpers.js +0 -77
- package/dist/esm/src/errors.js +0 -7
- package/dist/esm/src/exits/ethUtils.js +0 -52
- package/dist/esm/src/exits/exit.js +0 -475
- package/dist/esm/src/exits/verificationHelpers.js +0 -81
- package/dist/esm/src/incentives/incentiveHelpers.js +0 -34
- package/dist/esm/src/incentives/incentives.js +0 -115
- package/dist/esm/src/schema.js +0 -349
- package/dist/esm/src/services.js +0 -29
- package/dist/esm/src/splits/splitHelpers.js +0 -554
- package/dist/esm/src/splits/splits.js +0 -362
- package/dist/esm/src/types.js +0 -26
- package/dist/esm/src/utils.js +0 -68
- package/dist/esm/src/verification/common.js +0 -319
- package/dist/esm/src/verification/signature-validator.js +0 -64
- package/dist/esm/src/verification/sszTypes.js +0 -64
- package/dist/esm/src/verification/termsAndConditions.js +0 -33
- package/dist/esm/src/verification/v1.10.0.js +0 -140
- package/dist/esm/src/verification/v1.6.0.js +0 -142
- package/dist/esm/src/verification/v1.7.0.js +0 -166
- package/dist/esm/src/verification/v1.8.0.js +0 -189
- package/dist/esm/test/client/ajv.spec.js +0 -318
- package/dist/esm/test/client/methods.spec.js +0 -393
- package/dist/esm/test/eoa/eoa.spec.js +0 -174
- package/dist/esm/test/exit/ethUtils.spec.js +0 -81
- package/dist/esm/test/exit/exit.spec.js +0 -374
- package/dist/esm/test/exit/verificationHelpers.spec.js +0 -66
- package/dist/esm/test/fixtures.js +0 -893
- package/dist/esm/test/incentives/incentives.spec.js +0 -177
- package/dist/esm/test/splits/splits.spec.js +0 -400
- package/dist/types/src/abi/OVMFactory.d.ts +0 -662
- package/src/abi/BatchDeposit.ts +0 -117
- package/src/abi/MerkleDistributorWithDeadline.ts +0 -70
- package/src/abi/Multicall3.ts +0 -250
- package/src/abi/OVMFactory.ts +0 -617
- package/src/abi/OWR.ts +0 -302
- package/src/abi/SplitMain.ts +0 -927
- package/src/abi/splitV2FactoryAbi.ts +0 -417
- package/src/ajv.ts +0 -191
- package/src/base.ts +0 -54
- package/src/bytecodes.ts +0 -31
- package/src/constants.ts +0 -304
- package/src/eoa/eoa.ts +0 -153
- package/src/eoa/eoaHelpers.ts +0 -112
- package/src/errors.ts +0 -8
- package/src/exits/ethUtils.ts +0 -49
- package/src/exits/exit.ts +0 -661
- package/src/exits/verificationHelpers.ts +0 -110
- package/src/incentives/incentiveHelpers.ts +0 -55
- package/src/incentives/incentives.ts +0 -153
- package/src/index.ts +0 -614
- package/src/schema.ts +0 -376
- package/src/services.ts +0 -24
- package/src/splits/splitHelpers.ts +0 -1032
- package/src/splits/splits.ts +0 -504
- package/src/types.ts +0 -687
- package/src/utils.ts +0 -88
- package/src/verification/common.ts +0 -532
- package/src/verification/signature-validator.ts +0 -103
- package/src/verification/sszTypes.ts +0 -88
- package/src/verification/termsAndConditions.ts +0 -32
- package/src/verification/v1.10.0.ts +0 -245
- package/src/verification/v1.6.0.ts +0 -256
- package/src/verification/v1.7.0.ts +0 -309
- package/src/verification/v1.8.0.ts +0 -340
package/dist/esm/package.json
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@obolnetwork/obol-sdk",
|
|
3
|
-
"version": "2.11.3",
|
|
4
|
-
"description": "A package for creating Distributed Validators using the Obol API.",
|
|
5
|
-
"bugs": {
|
|
6
|
-
"url": "https://github.com/obolnetwork/obol-sdk/issues"
|
|
7
|
-
},
|
|
8
|
-
"homepage": "https://docs.obol.org/",
|
|
9
|
-
"keywords": [
|
|
10
|
-
"Obol",
|
|
11
|
-
"Distributed Validators",
|
|
12
|
-
"Ethereum"
|
|
13
|
-
],
|
|
14
|
-
"scripts": {
|
|
15
|
-
"compile": "tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json ./tsconfig.types.json",
|
|
16
|
-
"build:clean": "rm -rf ./dist",
|
|
17
|
-
"build": "npm-run-all build:clean compile",
|
|
18
|
-
"test": "jest test/**/*.spec.ts --testPathIgnorePatterns=test/sdk-package/",
|
|
19
|
-
"generate-typedoc": "typedoc",
|
|
20
|
-
"npm:publish": "npm publish --tag latest",
|
|
21
|
-
"release": "release-it",
|
|
22
|
-
"release:dry": "release-it --dry-run --no-npm",
|
|
23
|
-
"lint": "eslint \"{src,test}/**/*.{js,ts}\" --fix",
|
|
24
|
-
"lint-ci": "eslint \"{src,test}/**/*.{js,ts}\"",
|
|
25
|
-
"prettier-ci": "prettier --check \"{src,test}/**/*.{js,ts}\"",
|
|
26
|
-
"prettier": "prettier --write \"{src,test}/**/*.{js,ts}\"",
|
|
27
|
-
"docs": "typedoc"
|
|
28
|
-
},
|
|
29
|
-
"main": "./dist/cjs/src/index.js",
|
|
30
|
-
"module": "./dist/esm/src/index.js",
|
|
31
|
-
"typings": "./dist/types/src/index.d.ts",
|
|
32
|
-
"author": "Obol Labs (https://obol.org)",
|
|
33
|
-
"repository": {
|
|
34
|
-
"type": "git",
|
|
35
|
-
"url": "git+https://github.com/obolnetwork/obol-sdk.git"
|
|
36
|
-
},
|
|
37
|
-
"license": "ISC",
|
|
38
|
-
"publishConfig": {
|
|
39
|
-
"registry": "https://registry.npmjs.org/",
|
|
40
|
-
"access": "public"
|
|
41
|
-
},
|
|
42
|
-
"dependencies": {
|
|
43
|
-
"@chainsafe/bls": "6.0.3",
|
|
44
|
-
"@chainsafe/blst": "^0.2.9",
|
|
45
|
-
"@chainsafe/discv5": "^0.5.1",
|
|
46
|
-
"@chainsafe/ssz": "^0.14.0",
|
|
47
|
-
"@metamask/eth-sig-util": "^7.0.1",
|
|
48
|
-
"@safe-global/protocol-kit": "4.1.1",
|
|
49
|
-
"@safe-global/safe-core-sdk-types": "5.1.0",
|
|
50
|
-
"@types/pdf-parse": "^1.1.4",
|
|
51
|
-
"ajv": "^8.12.0",
|
|
52
|
-
"ajv-formats": "^3.0.1",
|
|
53
|
-
"ajv-keywords": "^5.1.0",
|
|
54
|
-
"cross-fetch": "^3.1.5",
|
|
55
|
-
"dotenv": "^16.4.7",
|
|
56
|
-
"elliptic": "^6.5.4",
|
|
57
|
-
"eslint-config-standard-with-typescript": "^43.0.1",
|
|
58
|
-
"eslint-plugin-import": "^2.29.1",
|
|
59
|
-
"eslint-plugin-n": "^16.6.2",
|
|
60
|
-
"eslint-plugin-promise": "^6.1.1",
|
|
61
|
-
"ethers": "^6.13.5",
|
|
62
|
-
"nock": "^13.5.3",
|
|
63
|
-
"pdf-parse": "^1.1.1",
|
|
64
|
-
"semver": "^7.6.0",
|
|
65
|
-
"typescript-eslint": "^7.1.0",
|
|
66
|
-
"uuid": "^9.0.0"
|
|
67
|
-
},
|
|
68
|
-
"devDependencies": {
|
|
69
|
-
"@release-it/conventional-changelog": "^8.0.1",
|
|
70
|
-
"@types/elliptic": "^6.4.18",
|
|
71
|
-
"@types/jest": "^28.1.8",
|
|
72
|
-
"@types/node": "^20.2.5",
|
|
73
|
-
"@types/semver": "^7.5.8",
|
|
74
|
-
"@types/uuid": "^9.0.1",
|
|
75
|
-
"eslint": "^8.57.0",
|
|
76
|
-
"husky": "^9.0.11",
|
|
77
|
-
"jest": "^28.1.3",
|
|
78
|
-
"lint-staged": "^15.2.2",
|
|
79
|
-
"msw": "^2.2.1",
|
|
80
|
-
"npm-run-all": "^4.1.5",
|
|
81
|
-
"prettier": "^3.2.5",
|
|
82
|
-
"release-it": "^17.2.1",
|
|
83
|
-
"ts-jest": "^28.0.8",
|
|
84
|
-
"tsup": "^6.7.0",
|
|
85
|
-
"typedoc": "^0.28.0",
|
|
86
|
-
"typedoc-plugin-markdown": "^4.5.2",
|
|
87
|
-
"typescript": "~5.3.3"
|
|
88
|
-
},
|
|
89
|
-
"engines": {
|
|
90
|
-
"node": ">= 16"
|
|
91
|
-
},
|
|
92
|
-
"files": [
|
|
93
|
-
"package.json",
|
|
94
|
-
"README.md",
|
|
95
|
-
"dist",
|
|
96
|
-
"src"
|
|
97
|
-
],
|
|
98
|
-
"release-it": {
|
|
99
|
-
"git": {
|
|
100
|
-
"changelog": "npx auto-changelog --stdout --commit-limit false --unreleased --template https://raw.githubusercontent.com/release-it/release-it/main/templates/changelog-compact.hbs",
|
|
101
|
-
"commitMessage": "chore(release): v${version}",
|
|
102
|
-
"push": true,
|
|
103
|
-
"commit": true,
|
|
104
|
-
"tag": true,
|
|
105
|
-
"requireCommits": false,
|
|
106
|
-
"requireCleanWorkingDir": false
|
|
107
|
-
},
|
|
108
|
-
"github": {
|
|
109
|
-
"release": true,
|
|
110
|
-
"draft": true
|
|
111
|
-
},
|
|
112
|
-
"npm": {
|
|
113
|
-
"publish": false,
|
|
114
|
-
"ignoreVersion": false
|
|
115
|
-
},
|
|
116
|
-
"hooks": {
|
|
117
|
-
"after:bump": "npx auto-changelog -p --hide-credit"
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
"jest": {
|
|
121
|
-
"transform": {
|
|
122
|
-
"\\.[jt]sx?$": "ts-jest"
|
|
123
|
-
},
|
|
124
|
-
"globals": {
|
|
125
|
-
"ts-jest": {
|
|
126
|
-
"useESM": true
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
"moduleNameMapper": {
|
|
130
|
-
"^bn.js$": "<rootDir>/node_modules/bn.js",
|
|
131
|
-
"^asn1.js$": "<rootDir>/node_modules/asn1.js",
|
|
132
|
-
"^hash.js$": "<rootDir>/node_modules/hash.js",
|
|
133
|
-
"^(\\.\\.?\\/.+)\\.js$": "$1"
|
|
134
|
-
},
|
|
135
|
-
"extensionsToTreatAsEsm": [
|
|
136
|
-
".ts"
|
|
137
|
-
]
|
|
138
|
-
}
|
|
139
|
-
}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
export const BatchDepositContract = {
|
|
2
|
-
abi: [
|
|
3
|
-
{
|
|
4
|
-
inputs: [],
|
|
5
|
-
name: 'DepositValueGreaterThan2048ETH',
|
|
6
|
-
type: 'error',
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
inputs: [],
|
|
10
|
-
name: 'DepositValueLessThan1ETH',
|
|
11
|
-
type: 'error',
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
inputs: [],
|
|
15
|
-
name: 'DepositValueMustBeMultipleOfGwei',
|
|
16
|
-
type: 'error',
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
inputs: [],
|
|
20
|
-
name: 'InvalidPubKeyLength',
|
|
21
|
-
type: 'error',
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
inputs: [],
|
|
25
|
-
name: 'InvalidSignatureLength',
|
|
26
|
-
type: 'error',
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
inputs: [],
|
|
30
|
-
name: 'InvalidWithdrawalCredLength',
|
|
31
|
-
type: 'error',
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
inputs: [],
|
|
35
|
-
name: 'MsgValueNotEqualToTotalDepositAmount',
|
|
36
|
-
type: 'error',
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
inputs: [],
|
|
40
|
-
name: 'NoDepositsProvided',
|
|
41
|
-
type: 'error',
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
anonymous: false,
|
|
45
|
-
inputs: [
|
|
46
|
-
{
|
|
47
|
-
indexed: true,
|
|
48
|
-
internalType: 'bytes',
|
|
49
|
-
name: 'pubKey',
|
|
50
|
-
type: 'bytes',
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
indexed: true,
|
|
54
|
-
internalType: 'bytes',
|
|
55
|
-
name: 'withdrawalCredentials',
|
|
56
|
-
type: 'bytes',
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
indexed: false,
|
|
60
|
-
internalType: 'uint256',
|
|
61
|
-
name: 'amount',
|
|
62
|
-
type: 'uint256',
|
|
63
|
-
},
|
|
64
|
-
],
|
|
65
|
-
name: 'ValidatorDeposit',
|
|
66
|
-
type: 'event',
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
inputs: [
|
|
70
|
-
{
|
|
71
|
-
components: [
|
|
72
|
-
{
|
|
73
|
-
internalType: 'bytes',
|
|
74
|
-
name: 'pubKey',
|
|
75
|
-
type: 'bytes',
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
internalType: 'bytes',
|
|
79
|
-
name: 'withdrawalCredentials',
|
|
80
|
-
type: 'bytes',
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
internalType: 'bytes',
|
|
84
|
-
name: 'signature',
|
|
85
|
-
type: 'bytes',
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
internalType: 'uint256',
|
|
89
|
-
name: 'amount',
|
|
90
|
-
type: 'uint256',
|
|
91
|
-
},
|
|
92
|
-
],
|
|
93
|
-
internalType: 'struct IBatchDeposit.Deposit[]',
|
|
94
|
-
name: '_deposits',
|
|
95
|
-
type: 'tuple[]',
|
|
96
|
-
},
|
|
97
|
-
],
|
|
98
|
-
name: 'batchDeposit',
|
|
99
|
-
outputs: [],
|
|
100
|
-
stateMutability: 'payable',
|
|
101
|
-
type: 'function',
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
inputs: [],
|
|
105
|
-
name: 'depositContract',
|
|
106
|
-
outputs: [
|
|
107
|
-
{
|
|
108
|
-
internalType: 'contract IDepositContract',
|
|
109
|
-
name: '',
|
|
110
|
-
type: 'address',
|
|
111
|
-
},
|
|
112
|
-
],
|
|
113
|
-
stateMutability: 'view',
|
|
114
|
-
type: 'function',
|
|
115
|
-
},
|
|
116
|
-
],
|
|
117
|
-
};
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
export const MerkleDistributorABI = {
|
|
2
|
-
abi: [
|
|
3
|
-
{
|
|
4
|
-
inputs: [
|
|
5
|
-
{ internalType: 'address', name: 'token_', type: 'address' },
|
|
6
|
-
{ internalType: 'bytes32', name: 'merkleRoot_', type: 'bytes32' },
|
|
7
|
-
],
|
|
8
|
-
stateMutability: 'nonpayable',
|
|
9
|
-
type: 'constructor',
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
anonymous: false,
|
|
13
|
-
inputs: [
|
|
14
|
-
{
|
|
15
|
-
indexed: false,
|
|
16
|
-
internalType: 'uint256',
|
|
17
|
-
name: 'index',
|
|
18
|
-
type: 'uint256',
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
indexed: false,
|
|
22
|
-
internalType: 'address',
|
|
23
|
-
name: 'account',
|
|
24
|
-
type: 'address',
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
indexed: false,
|
|
28
|
-
internalType: 'uint256',
|
|
29
|
-
name: 'amount',
|
|
30
|
-
type: 'uint256',
|
|
31
|
-
},
|
|
32
|
-
],
|
|
33
|
-
name: 'Claimed',
|
|
34
|
-
type: 'event',
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
inputs: [
|
|
38
|
-
{ internalType: 'uint256', name: 'index', type: 'uint256' },
|
|
39
|
-
{ internalType: 'address', name: 'account', type: 'address' },
|
|
40
|
-
{ internalType: 'uint256', name: 'amount', type: 'uint256' },
|
|
41
|
-
{ internalType: 'bytes32[]', name: 'merkleProof', type: 'bytes32[]' },
|
|
42
|
-
],
|
|
43
|
-
name: 'claim',
|
|
44
|
-
outputs: [],
|
|
45
|
-
stateMutability: 'nonpayable',
|
|
46
|
-
type: 'function',
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
inputs: [{ internalType: 'uint256', name: 'index', type: 'uint256' }],
|
|
50
|
-
name: 'isClaimed',
|
|
51
|
-
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
|
|
52
|
-
stateMutability: 'view',
|
|
53
|
-
type: 'function',
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
inputs: [],
|
|
57
|
-
name: 'merkleRoot',
|
|
58
|
-
outputs: [{ internalType: 'bytes32', name: '', type: 'bytes32' }],
|
|
59
|
-
stateMutability: 'view',
|
|
60
|
-
type: 'function',
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
inputs: [],
|
|
64
|
-
name: 'token',
|
|
65
|
-
outputs: [{ internalType: 'address', name: '', type: 'address' }],
|
|
66
|
-
stateMutability: 'view',
|
|
67
|
-
type: 'function',
|
|
68
|
-
},
|
|
69
|
-
],
|
|
70
|
-
};
|
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
export const MultiCall3Contract = {
|
|
2
|
-
abi: [
|
|
3
|
-
{
|
|
4
|
-
inputs: [
|
|
5
|
-
{
|
|
6
|
-
components: [
|
|
7
|
-
{ internalType: 'address', name: 'target', type: 'address' },
|
|
8
|
-
{ internalType: 'bytes', name: 'callData', type: 'bytes' },
|
|
9
|
-
],
|
|
10
|
-
internalType: 'struct Multicall3.Call[]',
|
|
11
|
-
name: 'calls',
|
|
12
|
-
type: 'tuple[]',
|
|
13
|
-
},
|
|
14
|
-
],
|
|
15
|
-
name: 'aggregate',
|
|
16
|
-
outputs: [
|
|
17
|
-
{ internalType: 'uint256', name: 'blockNumber', type: 'uint256' },
|
|
18
|
-
{ internalType: 'bytes[]', name: 'returnData', type: 'bytes[]' },
|
|
19
|
-
],
|
|
20
|
-
stateMutability: 'payable',
|
|
21
|
-
type: 'function',
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
inputs: [
|
|
25
|
-
{
|
|
26
|
-
components: [
|
|
27
|
-
{ internalType: 'address', name: 'target', type: 'address' },
|
|
28
|
-
{ internalType: 'bool', name: 'allowFailure', type: 'bool' },
|
|
29
|
-
{ internalType: 'bytes', name: 'callData', type: 'bytes' },
|
|
30
|
-
],
|
|
31
|
-
internalType: 'struct Multicall3.Call3[]',
|
|
32
|
-
name: 'calls',
|
|
33
|
-
type: 'tuple[]',
|
|
34
|
-
},
|
|
35
|
-
],
|
|
36
|
-
name: 'aggregate3',
|
|
37
|
-
outputs: [
|
|
38
|
-
{
|
|
39
|
-
components: [
|
|
40
|
-
{ internalType: 'bool', name: 'success', type: 'bool' },
|
|
41
|
-
{ internalType: 'bytes', name: 'returnData', type: 'bytes' },
|
|
42
|
-
],
|
|
43
|
-
internalType: 'struct Multicall3.Result[]',
|
|
44
|
-
name: 'returnData',
|
|
45
|
-
type: 'tuple[]',
|
|
46
|
-
},
|
|
47
|
-
],
|
|
48
|
-
stateMutability: 'payable',
|
|
49
|
-
type: 'function',
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
inputs: [
|
|
53
|
-
{
|
|
54
|
-
components: [
|
|
55
|
-
{ internalType: 'address', name: 'target', type: 'address' },
|
|
56
|
-
{ internalType: 'bool', name: 'allowFailure', type: 'bool' },
|
|
57
|
-
{ internalType: 'uint256', name: 'value', type: 'uint256' },
|
|
58
|
-
{ internalType: 'bytes', name: 'callData', type: 'bytes' },
|
|
59
|
-
],
|
|
60
|
-
internalType: 'struct Multicall3.Call3Value[]',
|
|
61
|
-
name: 'calls',
|
|
62
|
-
type: 'tuple[]',
|
|
63
|
-
},
|
|
64
|
-
],
|
|
65
|
-
name: 'aggregate3Value',
|
|
66
|
-
outputs: [
|
|
67
|
-
{
|
|
68
|
-
components: [
|
|
69
|
-
{ internalType: 'bool', name: 'success', type: 'bool' },
|
|
70
|
-
{ internalType: 'bytes', name: 'returnData', type: 'bytes' },
|
|
71
|
-
],
|
|
72
|
-
internalType: 'struct Multicall3.Result[]',
|
|
73
|
-
name: 'returnData',
|
|
74
|
-
type: 'tuple[]',
|
|
75
|
-
},
|
|
76
|
-
],
|
|
77
|
-
stateMutability: 'payable',
|
|
78
|
-
type: 'function',
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
inputs: [
|
|
82
|
-
{
|
|
83
|
-
components: [
|
|
84
|
-
{ internalType: 'address', name: 'target', type: 'address' },
|
|
85
|
-
{ internalType: 'bytes', name: 'callData', type: 'bytes' },
|
|
86
|
-
],
|
|
87
|
-
internalType: 'struct Multicall3.Call[]',
|
|
88
|
-
name: 'calls',
|
|
89
|
-
type: 'tuple[]',
|
|
90
|
-
},
|
|
91
|
-
],
|
|
92
|
-
name: 'blockAndAggregate',
|
|
93
|
-
outputs: [
|
|
94
|
-
{ internalType: 'uint256', name: 'blockNumber', type: 'uint256' },
|
|
95
|
-
{ internalType: 'bytes32', name: 'blockHash', type: 'bytes32' },
|
|
96
|
-
{
|
|
97
|
-
components: [
|
|
98
|
-
{ internalType: 'bool', name: 'success', type: 'bool' },
|
|
99
|
-
{ internalType: 'bytes', name: 'returnData', type: 'bytes' },
|
|
100
|
-
],
|
|
101
|
-
internalType: 'struct Multicall3.Result[]',
|
|
102
|
-
name: 'returnData',
|
|
103
|
-
type: 'tuple[]',
|
|
104
|
-
},
|
|
105
|
-
],
|
|
106
|
-
stateMutability: 'payable',
|
|
107
|
-
type: 'function',
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
inputs: [],
|
|
111
|
-
name: 'getBasefee',
|
|
112
|
-
outputs: [{ internalType: 'uint256', name: 'basefee', type: 'uint256' }],
|
|
113
|
-
stateMutability: 'view',
|
|
114
|
-
type: 'function',
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
inputs: [
|
|
118
|
-
{ internalType: 'uint256', name: 'blockNumber', type: 'uint256' },
|
|
119
|
-
],
|
|
120
|
-
name: 'getBlockHash',
|
|
121
|
-
outputs: [
|
|
122
|
-
{ internalType: 'bytes32', name: 'blockHash', type: 'bytes32' },
|
|
123
|
-
],
|
|
124
|
-
stateMutability: 'view',
|
|
125
|
-
type: 'function',
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
inputs: [],
|
|
129
|
-
name: 'getBlockNumber',
|
|
130
|
-
outputs: [
|
|
131
|
-
{ internalType: 'uint256', name: 'blockNumber', type: 'uint256' },
|
|
132
|
-
],
|
|
133
|
-
stateMutability: 'view',
|
|
134
|
-
type: 'function',
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
inputs: [],
|
|
138
|
-
name: 'getChainId',
|
|
139
|
-
outputs: [{ internalType: 'uint256', name: 'chainid', type: 'uint256' }],
|
|
140
|
-
stateMutability: 'view',
|
|
141
|
-
type: 'function',
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
inputs: [],
|
|
145
|
-
name: 'getCurrentBlockCoinbase',
|
|
146
|
-
outputs: [{ internalType: 'address', name: 'coinbase', type: 'address' }],
|
|
147
|
-
stateMutability: 'view',
|
|
148
|
-
type: 'function',
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
inputs: [],
|
|
152
|
-
name: 'getCurrentBlockDifficulty',
|
|
153
|
-
outputs: [
|
|
154
|
-
{ internalType: 'uint256', name: 'difficulty', type: 'uint256' },
|
|
155
|
-
],
|
|
156
|
-
stateMutability: 'view',
|
|
157
|
-
type: 'function',
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
inputs: [],
|
|
161
|
-
name: 'getCurrentBlockGasLimit',
|
|
162
|
-
outputs: [{ internalType: 'uint256', name: 'gaslimit', type: 'uint256' }],
|
|
163
|
-
stateMutability: 'view',
|
|
164
|
-
type: 'function',
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
inputs: [],
|
|
168
|
-
name: 'getCurrentBlockTimestamp',
|
|
169
|
-
outputs: [
|
|
170
|
-
{ internalType: 'uint256', name: 'timestamp', type: 'uint256' },
|
|
171
|
-
],
|
|
172
|
-
stateMutability: 'view',
|
|
173
|
-
type: 'function',
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
inputs: [{ internalType: 'address', name: 'addr', type: 'address' }],
|
|
177
|
-
name: 'getEthBalance',
|
|
178
|
-
outputs: [{ internalType: 'uint256', name: 'balance', type: 'uint256' }],
|
|
179
|
-
stateMutability: 'view',
|
|
180
|
-
type: 'function',
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
inputs: [],
|
|
184
|
-
name: 'getLastBlockHash',
|
|
185
|
-
outputs: [
|
|
186
|
-
{ internalType: 'bytes32', name: 'blockHash', type: 'bytes32' },
|
|
187
|
-
],
|
|
188
|
-
stateMutability: 'view',
|
|
189
|
-
type: 'function',
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
inputs: [
|
|
193
|
-
{ internalType: 'bool', name: 'requireSuccess', type: 'bool' },
|
|
194
|
-
{
|
|
195
|
-
components: [
|
|
196
|
-
{ internalType: 'address', name: 'target', type: 'address' },
|
|
197
|
-
{ internalType: 'bytes', name: 'callData', type: 'bytes' },
|
|
198
|
-
],
|
|
199
|
-
internalType: 'struct Multicall3.Call[]',
|
|
200
|
-
name: 'calls',
|
|
201
|
-
type: 'tuple[]',
|
|
202
|
-
},
|
|
203
|
-
],
|
|
204
|
-
name: 'tryAggregate',
|
|
205
|
-
outputs: [
|
|
206
|
-
{
|
|
207
|
-
components: [
|
|
208
|
-
{ internalType: 'bool', name: 'success', type: 'bool' },
|
|
209
|
-
{ internalType: 'bytes', name: 'returnData', type: 'bytes' },
|
|
210
|
-
],
|
|
211
|
-
internalType: 'struct Multicall3.Result[]',
|
|
212
|
-
name: 'returnData',
|
|
213
|
-
type: 'tuple[]',
|
|
214
|
-
},
|
|
215
|
-
],
|
|
216
|
-
stateMutability: 'payable',
|
|
217
|
-
type: 'function',
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
inputs: [
|
|
221
|
-
{ internalType: 'bool', name: 'requireSuccess', type: 'bool' },
|
|
222
|
-
{
|
|
223
|
-
components: [
|
|
224
|
-
{ internalType: 'address', name: 'target', type: 'address' },
|
|
225
|
-
{ internalType: 'bytes', name: 'callData', type: 'bytes' },
|
|
226
|
-
],
|
|
227
|
-
internalType: 'struct Multicall3.Call[]',
|
|
228
|
-
name: 'calls',
|
|
229
|
-
type: 'tuple[]',
|
|
230
|
-
},
|
|
231
|
-
],
|
|
232
|
-
name: 'tryBlockAndAggregate',
|
|
233
|
-
outputs: [
|
|
234
|
-
{ internalType: 'uint256', name: 'blockNumber', type: 'uint256' },
|
|
235
|
-
{ internalType: 'bytes32', name: 'blockHash', type: 'bytes32' },
|
|
236
|
-
{
|
|
237
|
-
components: [
|
|
238
|
-
{ internalType: 'bool', name: 'success', type: 'bool' },
|
|
239
|
-
{ internalType: 'bytes', name: 'returnData', type: 'bytes' },
|
|
240
|
-
],
|
|
241
|
-
internalType: 'struct Multicall3.Result[]',
|
|
242
|
-
name: 'returnData',
|
|
243
|
-
type: 'tuple[]',
|
|
244
|
-
},
|
|
245
|
-
],
|
|
246
|
-
stateMutability: 'payable',
|
|
247
|
-
type: 'function',
|
|
248
|
-
},
|
|
249
|
-
],
|
|
250
|
-
};
|