@wagmi/core 0.6.7 → 0.6.8
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/declarations/src/constants/abis.d.ts +372 -0
- package/dist/declarations/src/constants/index.d.ts +1 -1
- package/dist/declarations/src/index.d.ts +1 -1
- package/dist/wagmi-core.cjs.dev.js +375 -1
- package/dist/wagmi-core.cjs.prod.js +375 -1
- package/dist/wagmi-core.esm.js +375 -2
- package/package.json +1 -1
|
@@ -904,6 +904,379 @@ const multicallABI = [{
|
|
|
904
904
|
stateMutability: 'view',
|
|
905
905
|
type: 'function'
|
|
906
906
|
}];
|
|
907
|
+
/**
|
|
908
|
+
* [ERC-4626 Tokenized Vaults Standard](https://ethereum.org/en/developers/docs/standards/tokens/erc-4626)
|
|
909
|
+
*/
|
|
910
|
+
|
|
911
|
+
const erc4626ABI = [{
|
|
912
|
+
anonymous: false,
|
|
913
|
+
inputs: [{
|
|
914
|
+
indexed: true,
|
|
915
|
+
name: 'owner',
|
|
916
|
+
type: 'address'
|
|
917
|
+
}, {
|
|
918
|
+
indexed: true,
|
|
919
|
+
name: 'spender',
|
|
920
|
+
type: 'address'
|
|
921
|
+
}, {
|
|
922
|
+
indexed: false,
|
|
923
|
+
name: 'value',
|
|
924
|
+
type: 'uint256'
|
|
925
|
+
}],
|
|
926
|
+
name: 'Approval',
|
|
927
|
+
type: 'event'
|
|
928
|
+
}, {
|
|
929
|
+
anonymous: false,
|
|
930
|
+
inputs: [{
|
|
931
|
+
indexed: true,
|
|
932
|
+
name: 'sender',
|
|
933
|
+
type: 'address'
|
|
934
|
+
}, {
|
|
935
|
+
indexed: true,
|
|
936
|
+
name: 'receiver',
|
|
937
|
+
type: 'address'
|
|
938
|
+
}, {
|
|
939
|
+
indexed: false,
|
|
940
|
+
name: 'assets',
|
|
941
|
+
type: 'uint256'
|
|
942
|
+
}, {
|
|
943
|
+
indexed: false,
|
|
944
|
+
name: 'shares',
|
|
945
|
+
type: 'uint256'
|
|
946
|
+
}],
|
|
947
|
+
name: 'Deposit',
|
|
948
|
+
type: 'event'
|
|
949
|
+
}, {
|
|
950
|
+
anonymous: false,
|
|
951
|
+
inputs: [{
|
|
952
|
+
indexed: true,
|
|
953
|
+
name: 'from',
|
|
954
|
+
type: 'address'
|
|
955
|
+
}, {
|
|
956
|
+
indexed: true,
|
|
957
|
+
name: 'to',
|
|
958
|
+
type: 'address'
|
|
959
|
+
}, {
|
|
960
|
+
indexed: false,
|
|
961
|
+
name: 'value',
|
|
962
|
+
type: 'uint256'
|
|
963
|
+
}],
|
|
964
|
+
name: 'Transfer',
|
|
965
|
+
type: 'event'
|
|
966
|
+
}, {
|
|
967
|
+
anonymous: false,
|
|
968
|
+
inputs: [{
|
|
969
|
+
indexed: true,
|
|
970
|
+
name: 'sender',
|
|
971
|
+
type: 'address'
|
|
972
|
+
}, {
|
|
973
|
+
indexed: true,
|
|
974
|
+
name: 'receiver',
|
|
975
|
+
type: 'address'
|
|
976
|
+
}, {
|
|
977
|
+
indexed: true,
|
|
978
|
+
name: 'owner',
|
|
979
|
+
type: 'address'
|
|
980
|
+
}, {
|
|
981
|
+
indexed: false,
|
|
982
|
+
name: 'assets',
|
|
983
|
+
type: 'uint256'
|
|
984
|
+
}, {
|
|
985
|
+
indexed: false,
|
|
986
|
+
name: 'shares',
|
|
987
|
+
type: 'uint256'
|
|
988
|
+
}],
|
|
989
|
+
name: 'Withdraw',
|
|
990
|
+
type: 'event'
|
|
991
|
+
}, {
|
|
992
|
+
inputs: [{
|
|
993
|
+
name: 'owner',
|
|
994
|
+
type: 'address'
|
|
995
|
+
}, {
|
|
996
|
+
name: 'spender',
|
|
997
|
+
type: 'address'
|
|
998
|
+
}],
|
|
999
|
+
name: 'allowance',
|
|
1000
|
+
outputs: [{
|
|
1001
|
+
name: '',
|
|
1002
|
+
type: 'uint256'
|
|
1003
|
+
}],
|
|
1004
|
+
stateMutability: 'view',
|
|
1005
|
+
type: 'function'
|
|
1006
|
+
}, {
|
|
1007
|
+
inputs: [{
|
|
1008
|
+
name: 'spender',
|
|
1009
|
+
type: 'address'
|
|
1010
|
+
}, {
|
|
1011
|
+
name: 'amount',
|
|
1012
|
+
type: 'uint256'
|
|
1013
|
+
}],
|
|
1014
|
+
name: 'approve',
|
|
1015
|
+
outputs: [{
|
|
1016
|
+
name: '',
|
|
1017
|
+
type: 'bool'
|
|
1018
|
+
}],
|
|
1019
|
+
stateMutability: 'nonpayable',
|
|
1020
|
+
type: 'function'
|
|
1021
|
+
}, {
|
|
1022
|
+
inputs: [],
|
|
1023
|
+
name: 'asset',
|
|
1024
|
+
outputs: [{
|
|
1025
|
+
name: 'assetTokenAddress',
|
|
1026
|
+
type: 'address'
|
|
1027
|
+
}],
|
|
1028
|
+
stateMutability: 'view',
|
|
1029
|
+
type: 'function'
|
|
1030
|
+
}, {
|
|
1031
|
+
inputs: [{
|
|
1032
|
+
name: 'account',
|
|
1033
|
+
type: 'address'
|
|
1034
|
+
}],
|
|
1035
|
+
name: 'balanceOf',
|
|
1036
|
+
outputs: [{
|
|
1037
|
+
name: '',
|
|
1038
|
+
type: 'uint256'
|
|
1039
|
+
}],
|
|
1040
|
+
stateMutability: 'view',
|
|
1041
|
+
type: 'function'
|
|
1042
|
+
}, {
|
|
1043
|
+
inputs: [{
|
|
1044
|
+
name: 'shares',
|
|
1045
|
+
type: 'uint256'
|
|
1046
|
+
}],
|
|
1047
|
+
name: 'convertToAssets',
|
|
1048
|
+
outputs: [{
|
|
1049
|
+
name: 'assets',
|
|
1050
|
+
type: 'uint256'
|
|
1051
|
+
}],
|
|
1052
|
+
stateMutability: 'view',
|
|
1053
|
+
type: 'function'
|
|
1054
|
+
}, {
|
|
1055
|
+
inputs: [{
|
|
1056
|
+
name: 'assets',
|
|
1057
|
+
type: 'uint256'
|
|
1058
|
+
}],
|
|
1059
|
+
name: 'convertToShares',
|
|
1060
|
+
outputs: [{
|
|
1061
|
+
name: 'shares',
|
|
1062
|
+
type: 'uint256'
|
|
1063
|
+
}],
|
|
1064
|
+
stateMutability: 'view',
|
|
1065
|
+
type: 'function'
|
|
1066
|
+
}, {
|
|
1067
|
+
inputs: [{
|
|
1068
|
+
name: 'assets',
|
|
1069
|
+
type: 'uint256'
|
|
1070
|
+
}, {
|
|
1071
|
+
name: 'receiver',
|
|
1072
|
+
type: 'address'
|
|
1073
|
+
}],
|
|
1074
|
+
name: 'deposit',
|
|
1075
|
+
outputs: [{
|
|
1076
|
+
name: 'shares',
|
|
1077
|
+
type: 'uint256'
|
|
1078
|
+
}],
|
|
1079
|
+
stateMutability: 'nonpayable',
|
|
1080
|
+
type: 'function'
|
|
1081
|
+
}, {
|
|
1082
|
+
inputs: [{
|
|
1083
|
+
name: 'caller',
|
|
1084
|
+
type: 'address'
|
|
1085
|
+
}],
|
|
1086
|
+
name: 'maxDeposit',
|
|
1087
|
+
outputs: [{
|
|
1088
|
+
name: 'maxAssets',
|
|
1089
|
+
type: 'uint256'
|
|
1090
|
+
}],
|
|
1091
|
+
stateMutability: 'view',
|
|
1092
|
+
type: 'function'
|
|
1093
|
+
}, {
|
|
1094
|
+
inputs: [{
|
|
1095
|
+
name: 'caller',
|
|
1096
|
+
type: 'address'
|
|
1097
|
+
}],
|
|
1098
|
+
name: 'maxMint',
|
|
1099
|
+
outputs: [{
|
|
1100
|
+
name: 'maxShares',
|
|
1101
|
+
type: 'uint256'
|
|
1102
|
+
}],
|
|
1103
|
+
stateMutability: 'view',
|
|
1104
|
+
type: 'function'
|
|
1105
|
+
}, {
|
|
1106
|
+
inputs: [{
|
|
1107
|
+
name: 'owner',
|
|
1108
|
+
type: 'address'
|
|
1109
|
+
}],
|
|
1110
|
+
name: 'maxRedeem',
|
|
1111
|
+
outputs: [{
|
|
1112
|
+
name: 'maxShares',
|
|
1113
|
+
type: 'uint256'
|
|
1114
|
+
}],
|
|
1115
|
+
stateMutability: 'view',
|
|
1116
|
+
type: 'function'
|
|
1117
|
+
}, {
|
|
1118
|
+
inputs: [{
|
|
1119
|
+
name: 'owner',
|
|
1120
|
+
type: 'address'
|
|
1121
|
+
}],
|
|
1122
|
+
name: 'maxWithdraw',
|
|
1123
|
+
outputs: [{
|
|
1124
|
+
name: 'maxAssets',
|
|
1125
|
+
type: 'uint256'
|
|
1126
|
+
}],
|
|
1127
|
+
stateMutability: 'view',
|
|
1128
|
+
type: 'function'
|
|
1129
|
+
}, {
|
|
1130
|
+
inputs: [{
|
|
1131
|
+
name: 'shares',
|
|
1132
|
+
type: 'uint256'
|
|
1133
|
+
}, {
|
|
1134
|
+
name: 'receiver',
|
|
1135
|
+
type: 'address'
|
|
1136
|
+
}],
|
|
1137
|
+
name: 'mint',
|
|
1138
|
+
outputs: [{
|
|
1139
|
+
name: 'assets',
|
|
1140
|
+
type: 'uint256'
|
|
1141
|
+
}],
|
|
1142
|
+
stateMutability: 'nonpayable',
|
|
1143
|
+
type: 'function'
|
|
1144
|
+
}, {
|
|
1145
|
+
inputs: [{
|
|
1146
|
+
name: 'assets',
|
|
1147
|
+
type: 'uint256'
|
|
1148
|
+
}],
|
|
1149
|
+
name: 'previewDeposit',
|
|
1150
|
+
outputs: [{
|
|
1151
|
+
name: 'shares',
|
|
1152
|
+
type: 'uint256'
|
|
1153
|
+
}],
|
|
1154
|
+
stateMutability: 'view',
|
|
1155
|
+
type: 'function'
|
|
1156
|
+
}, {
|
|
1157
|
+
inputs: [{
|
|
1158
|
+
name: 'shares',
|
|
1159
|
+
type: 'uint256'
|
|
1160
|
+
}],
|
|
1161
|
+
name: 'previewMint',
|
|
1162
|
+
outputs: [{
|
|
1163
|
+
name: 'assets',
|
|
1164
|
+
type: 'uint256'
|
|
1165
|
+
}],
|
|
1166
|
+
stateMutability: 'view',
|
|
1167
|
+
type: 'function'
|
|
1168
|
+
}, {
|
|
1169
|
+
inputs: [{
|
|
1170
|
+
name: 'shares',
|
|
1171
|
+
type: 'uint256'
|
|
1172
|
+
}],
|
|
1173
|
+
name: 'previewRedeem',
|
|
1174
|
+
outputs: [{
|
|
1175
|
+
name: 'assets',
|
|
1176
|
+
type: 'uint256'
|
|
1177
|
+
}],
|
|
1178
|
+
stateMutability: 'view',
|
|
1179
|
+
type: 'function'
|
|
1180
|
+
}, {
|
|
1181
|
+
inputs: [{
|
|
1182
|
+
name: 'assets',
|
|
1183
|
+
type: 'uint256'
|
|
1184
|
+
}],
|
|
1185
|
+
name: 'previewWithdraw',
|
|
1186
|
+
outputs: [{
|
|
1187
|
+
name: 'shares',
|
|
1188
|
+
type: 'uint256'
|
|
1189
|
+
}],
|
|
1190
|
+
stateMutability: 'view',
|
|
1191
|
+
type: 'function'
|
|
1192
|
+
}, {
|
|
1193
|
+
inputs: [{
|
|
1194
|
+
name: 'shares',
|
|
1195
|
+
type: 'uint256'
|
|
1196
|
+
}, {
|
|
1197
|
+
name: 'receiver',
|
|
1198
|
+
type: 'address'
|
|
1199
|
+
}, {
|
|
1200
|
+
name: 'owner',
|
|
1201
|
+
type: 'address'
|
|
1202
|
+
}],
|
|
1203
|
+
name: 'redeem',
|
|
1204
|
+
outputs: [{
|
|
1205
|
+
name: 'assets',
|
|
1206
|
+
type: 'uint256'
|
|
1207
|
+
}],
|
|
1208
|
+
stateMutability: 'nonpayable',
|
|
1209
|
+
type: 'function'
|
|
1210
|
+
}, {
|
|
1211
|
+
inputs: [],
|
|
1212
|
+
name: 'totalAssets',
|
|
1213
|
+
outputs: [{
|
|
1214
|
+
name: 'totalManagedAssets',
|
|
1215
|
+
type: 'uint256'
|
|
1216
|
+
}],
|
|
1217
|
+
stateMutability: 'view',
|
|
1218
|
+
type: 'function'
|
|
1219
|
+
}, {
|
|
1220
|
+
inputs: [],
|
|
1221
|
+
name: 'totalSupply',
|
|
1222
|
+
outputs: [{
|
|
1223
|
+
name: '',
|
|
1224
|
+
type: 'uint256'
|
|
1225
|
+
}],
|
|
1226
|
+
stateMutability: 'view',
|
|
1227
|
+
type: 'function'
|
|
1228
|
+
}, {
|
|
1229
|
+
inputs: [{
|
|
1230
|
+
name: 'to',
|
|
1231
|
+
type: 'address'
|
|
1232
|
+
}, {
|
|
1233
|
+
name: 'amount',
|
|
1234
|
+
type: 'uint256'
|
|
1235
|
+
}],
|
|
1236
|
+
name: 'transfer',
|
|
1237
|
+
outputs: [{
|
|
1238
|
+
name: '',
|
|
1239
|
+
type: 'bool'
|
|
1240
|
+
}],
|
|
1241
|
+
stateMutability: 'nonpayable',
|
|
1242
|
+
type: 'function'
|
|
1243
|
+
}, {
|
|
1244
|
+
inputs: [{
|
|
1245
|
+
name: 'from',
|
|
1246
|
+
type: 'address'
|
|
1247
|
+
}, {
|
|
1248
|
+
name: 'to',
|
|
1249
|
+
type: 'address'
|
|
1250
|
+
}, {
|
|
1251
|
+
name: 'amount',
|
|
1252
|
+
type: 'uint256'
|
|
1253
|
+
}],
|
|
1254
|
+
name: 'transferFrom',
|
|
1255
|
+
outputs: [{
|
|
1256
|
+
name: '',
|
|
1257
|
+
type: 'bool'
|
|
1258
|
+
}],
|
|
1259
|
+
stateMutability: 'nonpayable',
|
|
1260
|
+
type: 'function'
|
|
1261
|
+
}, {
|
|
1262
|
+
inputs: [{
|
|
1263
|
+
name: 'assets',
|
|
1264
|
+
type: 'uint256'
|
|
1265
|
+
}, {
|
|
1266
|
+
name: 'receiver',
|
|
1267
|
+
type: 'address'
|
|
1268
|
+
}, {
|
|
1269
|
+
name: 'owner',
|
|
1270
|
+
type: 'address'
|
|
1271
|
+
}],
|
|
1272
|
+
name: 'withdraw',
|
|
1273
|
+
outputs: [{
|
|
1274
|
+
name: 'shares',
|
|
1275
|
+
type: 'uint256'
|
|
1276
|
+
}],
|
|
1277
|
+
stateMutability: 'nonpayable',
|
|
1278
|
+
type: 'function'
|
|
1279
|
+
}];
|
|
907
1280
|
|
|
908
1281
|
// https://github.com/ethers-io/ethers.js/blob/master/packages/units/src.ts/index.ts#L10-L18
|
|
909
1282
|
const units = ['wei', 'kwei', 'mwei', 'gwei', 'szabo', 'finney', 'ether'];
|
|
@@ -1660,7 +2033,7 @@ async function fetchEnsName(_ref) {
|
|
|
1660
2033
|
const provider = getProvider.getProvider({
|
|
1661
2034
|
chainId
|
|
1662
2035
|
});
|
|
1663
|
-
return provider.lookupAddress(address);
|
|
2036
|
+
return provider.lookupAddress(utils.getAddress(address));
|
|
1664
2037
|
}
|
|
1665
2038
|
|
|
1666
2039
|
async function fetchEnsResolver(_ref) {
|
|
@@ -2246,6 +2619,7 @@ exports.connect = connect;
|
|
|
2246
2619
|
exports.deepEqual = deepEqual;
|
|
2247
2620
|
exports.disconnect = disconnect;
|
|
2248
2621
|
exports.erc20ABI = erc20ABI;
|
|
2622
|
+
exports.erc4626ABI = erc4626ABI;
|
|
2249
2623
|
exports.erc721ABI = erc721ABI;
|
|
2250
2624
|
exports.fetchBalance = fetchBalance;
|
|
2251
2625
|
exports.fetchBlockNumber = fetchBlockNumber;
|