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