@lukso/transaction-decoder 1.3.6 → 1.3.7-dev.2df3eae
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/browser.cjs +214 -24
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +2 -2
- package/dist/browser.d.ts +2 -2
- package/dist/browser.js +4 -4
- package/dist/cdn/transaction-decoder.global.js +75 -75
- package/dist/cdn/transaction-decoder.global.js.map +1 -1
- package/dist/{chunk-NDBDNXBI.js → chunk-C3O7HMFS.js} +2 -2
- package/dist/{chunk-FKBKAWB3.js → chunk-JP3VO7OF.js} +2 -2
- package/dist/{chunk-SSY7TTU2.js → chunk-LZFM5SNN.js} +4 -4
- package/dist/{chunk-T4H2HHIB.js → chunk-XE5YIF5G.js} +209 -19
- package/dist/chunk-XE5YIF5G.js.map +1 -0
- package/dist/data.cjs +208 -18
- package/dist/data.cjs.map +1 -1
- package/dist/data.d.cts +3 -3
- package/dist/data.d.ts +3 -3
- package/dist/data.js +2 -2
- package/dist/{index-BzXh7poJ.d.ts → index-BWD9DaG6.d.cts} +6 -1
- package/dist/{index-BzXh7poJ.d.cts → index-BWD9DaG6.d.ts} +6 -1
- package/dist/index.cjs +214 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -4
- package/dist/server.cjs +1499 -1258
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +17 -2
- package/dist/server.d.ts +17 -2
- package/dist/server.js +56 -2
- package/dist/server.js.map +1 -1
- package/dist/{utils-De_c6fUK.d.ts → utils-4Qdavg8r.d.ts} +2 -2
- package/dist/{utils-BEpSreRR.d.cts → utils-OR-XzeYG.d.cts} +2 -2
- package/package.json +8 -8
- package/src/decoder/lsp7Mint.test.ts +18 -11
- package/src/decoder/plugins/enhanceLSP0ERC725Account.ts +39 -2
- package/src/decoder/plugins/universalReceiverTypeIds.ts +277 -0
- package/src/decoder/types.ts +2 -0
- package/src/server/decodeEventLogs.ts +71 -0
- package/src/server/index.ts +10 -0
- package/src/server/types.ts +14 -1
- package/src/server.ts +1 -0
- package/src/types/index.ts +5 -1
- package/dist/chunk-T4H2HHIB.js.map +0 -1
- /package/dist/{chunk-NDBDNXBI.js.map → chunk-C3O7HMFS.js.map} +0 -0
- /package/dist/{chunk-FKBKAWB3.js.map → chunk-JP3VO7OF.js.map} +0 -0
- /package/dist/{chunk-SSY7TTU2.js.map → chunk-LZFM5SNN.js.map} +0 -0
package/dist/browser.cjs
CHANGED
|
@@ -2019,7 +2019,7 @@ import {
|
|
|
2019
2019
|
} from "@erc725/erc725.js";
|
|
2020
2020
|
import { isHex as isHex3 } from "viem";
|
|
2021
2021
|
|
|
2022
|
-
// ../../node_modules/.pnpm/@erc725+erc725.js@0.28.2_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.
|
|
2022
|
+
// ../../node_modules/.pnpm/@erc725+erc725.js@0.28.2_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.3.6/node_modules/@erc725/erc725.js/schemas/LSP1UniversalReceiverDelegate.json
|
|
2023
2023
|
var LSP1UniversalReceiverDelegate_default = [
|
|
2024
2024
|
{
|
|
2025
2025
|
name: "LSP1UniversalReceiverDelegate",
|
|
@@ -2037,7 +2037,7 @@ var LSP1UniversalReceiverDelegate_default = [
|
|
|
2037
2037
|
}
|
|
2038
2038
|
];
|
|
2039
2039
|
|
|
2040
|
-
// ../../node_modules/.pnpm/@erc725+erc725.js@0.28.2_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.
|
|
2040
|
+
// ../../node_modules/.pnpm/@erc725+erc725.js@0.28.2_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.3.6/node_modules/@erc725/erc725.js/schemas/LSP3ProfileMetadata.json
|
|
2041
2041
|
var LSP3ProfileMetadata_default = [
|
|
2042
2042
|
{
|
|
2043
2043
|
name: "SupportedStandards:LSP3Profile",
|
|
@@ -2104,7 +2104,7 @@ var LSP3ProfileMetadata_default = [
|
|
|
2104
2104
|
}
|
|
2105
2105
|
];
|
|
2106
2106
|
|
|
2107
|
-
// ../../node_modules/.pnpm/@erc725+erc725.js@0.28.2_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.
|
|
2107
|
+
// ../../node_modules/.pnpm/@erc725+erc725.js@0.28.2_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.3.6/node_modules/@erc725/erc725.js/schemas/LSP4DigitalAsset.json
|
|
2108
2108
|
var LSP4DigitalAsset_default = [
|
|
2109
2109
|
{
|
|
2110
2110
|
name: "SupportedStandards:LSP4DigitalAsset",
|
|
@@ -2157,7 +2157,7 @@ var LSP4DigitalAsset_default = [
|
|
|
2157
2157
|
}
|
|
2158
2158
|
];
|
|
2159
2159
|
|
|
2160
|
-
// ../../node_modules/.pnpm/@erc725+erc725.js@0.28.2_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.
|
|
2160
|
+
// ../../node_modules/.pnpm/@erc725+erc725.js@0.28.2_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.3.6/node_modules/@erc725/erc725.js/schemas/LSP4DigitalAssetLegacy.json
|
|
2161
2161
|
var LSP4DigitalAssetLegacy_default = [
|
|
2162
2162
|
{
|
|
2163
2163
|
name: "SupportedStandards:LSP4DigitalCertificate",
|
|
@@ -2168,7 +2168,7 @@ var LSP4DigitalAssetLegacy_default = [
|
|
|
2168
2168
|
}
|
|
2169
2169
|
];
|
|
2170
2170
|
|
|
2171
|
-
// ../../node_modules/.pnpm/@erc725+erc725.js@0.28.2_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.
|
|
2171
|
+
// ../../node_modules/.pnpm/@erc725+erc725.js@0.28.2_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.3.6/node_modules/@erc725/erc725.js/schemas/LSP5ReceivedAssets.json
|
|
2172
2172
|
var LSP5ReceivedAssets_default = [
|
|
2173
2173
|
{
|
|
2174
2174
|
name: "LSP5ReceivedAssets[]",
|
|
@@ -2186,7 +2186,7 @@ var LSP5ReceivedAssets_default = [
|
|
|
2186
2186
|
}
|
|
2187
2187
|
];
|
|
2188
2188
|
|
|
2189
|
-
// ../../node_modules/.pnpm/@erc725+erc725.js@0.28.2_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.
|
|
2189
|
+
// ../../node_modules/.pnpm/@erc725+erc725.js@0.28.2_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.3.6/node_modules/@erc725/erc725.js/schemas/LSP6KeyManager.json
|
|
2190
2190
|
var LSP6KeyManager_default = [
|
|
2191
2191
|
{
|
|
2192
2192
|
name: "AddressPermissions[]",
|
|
@@ -2218,7 +2218,7 @@ var LSP6KeyManager_default = [
|
|
|
2218
2218
|
}
|
|
2219
2219
|
];
|
|
2220
2220
|
|
|
2221
|
-
// ../../node_modules/.pnpm/@erc725+erc725.js@0.28.2_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.
|
|
2221
|
+
// ../../node_modules/.pnpm/@erc725+erc725.js@0.28.2_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.3.6/node_modules/@erc725/erc725.js/schemas/LSP8IdentifiableDigitalAsset.json
|
|
2222
2222
|
var LSP8IdentifiableDigitalAsset_default = [
|
|
2223
2223
|
{
|
|
2224
2224
|
name: "LSP8TokenIdFormat",
|
|
@@ -2243,7 +2243,7 @@ var LSP8IdentifiableDigitalAsset_default = [
|
|
|
2243
2243
|
}
|
|
2244
2244
|
];
|
|
2245
2245
|
|
|
2246
|
-
// ../../node_modules/.pnpm/@erc725+erc725.js@0.28.2_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.
|
|
2246
|
+
// ../../node_modules/.pnpm/@erc725+erc725.js@0.28.2_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.3.6/node_modules/@erc725/erc725.js/schemas/LSP9Vault.json
|
|
2247
2247
|
var LSP9Vault_default = [
|
|
2248
2248
|
{
|
|
2249
2249
|
name: "SupportedStandards:LSP9Vault",
|
|
@@ -2275,7 +2275,7 @@ var LSP9Vault_default = [
|
|
|
2275
2275
|
}
|
|
2276
2276
|
];
|
|
2277
2277
|
|
|
2278
|
-
// ../../node_modules/.pnpm/@erc725+erc725.js@0.28.2_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.
|
|
2278
|
+
// ../../node_modules/.pnpm/@erc725+erc725.js@0.28.2_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.3.6/node_modules/@erc725/erc725.js/schemas/LSP10ReceivedVaults.json
|
|
2279
2279
|
var LSP10ReceivedVaults_default = [
|
|
2280
2280
|
{
|
|
2281
2281
|
name: "LSP10VaultsMap:<address>",
|
|
@@ -2293,7 +2293,7 @@ var LSP10ReceivedVaults_default = [
|
|
|
2293
2293
|
}
|
|
2294
2294
|
];
|
|
2295
2295
|
|
|
2296
|
-
// ../../node_modules/.pnpm/@erc725+erc725.js@0.28.2_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.
|
|
2296
|
+
// ../../node_modules/.pnpm/@erc725+erc725.js@0.28.2_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.3.6/node_modules/@erc725/erc725.js/schemas/LSP12IssuedAssets.json
|
|
2297
2297
|
var LSP12IssuedAssets_default = [
|
|
2298
2298
|
{
|
|
2299
2299
|
name: "LSP12IssuedAssets[]",
|
|
@@ -2311,7 +2311,7 @@ var LSP12IssuedAssets_default = [
|
|
|
2311
2311
|
}
|
|
2312
2312
|
];
|
|
2313
2313
|
|
|
2314
|
-
// ../../node_modules/.pnpm/@erc725+erc725.js@0.28.2_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.
|
|
2314
|
+
// ../../node_modules/.pnpm/@erc725+erc725.js@0.28.2_bufferutil@4.0.9_typescript@5.9.3_utf-8-validate@5.0.10_zod@4.3.6/node_modules/@erc725/erc725.js/schemas/LSP17ContractExtension.json
|
|
2315
2315
|
var LSP17ContractExtension_default = [
|
|
2316
2316
|
{
|
|
2317
2317
|
name: "LSP17Extension:<bytes4>",
|
|
@@ -3972,6 +3972,170 @@ async function enhanceSetData(result, pluginOptions, options) {
|
|
|
3972
3972
|
}
|
|
3973
3973
|
__name(enhanceSetData, "enhanceSetData");
|
|
3974
3974
|
|
|
3975
|
+
// src/decoder/plugins/universalReceiverTypeIds.ts
|
|
3976
|
+
import {
|
|
3977
|
+
decodeAbiParameters as decodeAbiParameters3,
|
|
3978
|
+
encodeAbiParameters,
|
|
3979
|
+
getAddress,
|
|
3980
|
+
keccak256,
|
|
3981
|
+
slice as slice4,
|
|
3982
|
+
toHex
|
|
3983
|
+
} from "viem";
|
|
3984
|
+
function encodeEventLog(eventName, params, values) {
|
|
3985
|
+
const sig = `${eventName}(${params.map((p) => p.type).join(",")})`;
|
|
3986
|
+
const topic0 = keccak256(toHex(sig));
|
|
3987
|
+
const data = encodeAbiParameters(params, values);
|
|
3988
|
+
return { topics: [topic0], data };
|
|
3989
|
+
}
|
|
3990
|
+
__name(encodeEventLog, "encodeEventLog");
|
|
3991
|
+
var TYPEID_LSP26_FOLLOW = "0x71e02f9f05bcd5816ec4f3134aa2e5a916669537ec6c77fe66ea595fabc2d51a";
|
|
3992
|
+
var TYPEID_LSP26_UNFOLLOW = "0x9d3c0b4012b69658977b099bdaa51eff0f0460f421fba96d15669506c00d1c4f";
|
|
3993
|
+
var TYPEID_LSP7_TOKENSSENDER = "0x429ac7a06903dbc9c13dfcb3c9d11df8194581fa047c96d7a4171fc7402958ea";
|
|
3994
|
+
var TYPEID_LSP7_TOKENSRECIPIENT = "0x20804611b3e2ea21c480dc465142210acf4a2485947541770ec1fb87dee4a55c";
|
|
3995
|
+
var TYPEID_LSP8_TOKENSSENDER = "0xb23eae7e6d1564b295b4c3e3be402d9a2f0776c57bdf365903496f6fa481ab00";
|
|
3996
|
+
var TYPEID_LSP8_TOKENSRECIPIENT = "0x0b084a55ebf70fd3c06fd755269dac2212c4d3f0f4d09079780bfa50c1b2984d";
|
|
3997
|
+
var followParams = [
|
|
3998
|
+
{ name: "follower", type: "address" },
|
|
3999
|
+
{ name: "addr", type: "address" }
|
|
4000
|
+
];
|
|
4001
|
+
var unfollowParams = [
|
|
4002
|
+
{ name: "unfollower", type: "address" },
|
|
4003
|
+
{ name: "addr", type: "address" }
|
|
4004
|
+
];
|
|
4005
|
+
var lsp7TransferParams = [
|
|
4006
|
+
{ name: "operator", type: "address" },
|
|
4007
|
+
{ name: "from", type: "address" },
|
|
4008
|
+
{ name: "to", type: "address" },
|
|
4009
|
+
{ name: "amount", type: "uint256" },
|
|
4010
|
+
{ name: "force", type: "bool" },
|
|
4011
|
+
{ name: "data", type: "bytes" }
|
|
4012
|
+
];
|
|
4013
|
+
var lsp8TransferParams = [
|
|
4014
|
+
{ name: "operator", type: "address" },
|
|
4015
|
+
{ name: "from", type: "address" },
|
|
4016
|
+
{ name: "to", type: "address" },
|
|
4017
|
+
{ name: "tokenId", type: "bytes32" },
|
|
4018
|
+
{ name: "force", type: "bool" },
|
|
4019
|
+
{ name: "data", type: "bytes" }
|
|
4020
|
+
];
|
|
4021
|
+
var notificationParams = [
|
|
4022
|
+
{ name: "from", type: "address" },
|
|
4023
|
+
{ name: "typeId", type: "bytes32" },
|
|
4024
|
+
{ name: "data", type: "bytes" }
|
|
4025
|
+
];
|
|
4026
|
+
function unwrapLSP26Follow(receivedData, _from, profileAddress, _eventName) {
|
|
4027
|
+
if (!receivedData || receivedData.length < 42) {
|
|
4028
|
+
return void 0;
|
|
4029
|
+
}
|
|
4030
|
+
const followerAddress = getAddress(slice4(receivedData, 0, 20));
|
|
4031
|
+
const values = [followerAddress, profileAddress];
|
|
4032
|
+
return {
|
|
4033
|
+
eventName: "URDFollow",
|
|
4034
|
+
...createNamedArgs(values, followParams),
|
|
4035
|
+
...encodeEventLog("URDFollow", followParams, values),
|
|
4036
|
+
standard: "LSP26FollowerSystem"
|
|
4037
|
+
};
|
|
4038
|
+
}
|
|
4039
|
+
__name(unwrapLSP26Follow, "unwrapLSP26Follow");
|
|
4040
|
+
function unwrapLSP26Unfollow(receivedData, _from, profileAddress, _eventName) {
|
|
4041
|
+
if (!receivedData || receivedData.length < 42) {
|
|
4042
|
+
return void 0;
|
|
4043
|
+
}
|
|
4044
|
+
const unfollowerAddress = getAddress(slice4(receivedData, 0, 20));
|
|
4045
|
+
const values = [unfollowerAddress, profileAddress];
|
|
4046
|
+
return {
|
|
4047
|
+
eventName: "URDUnfollow",
|
|
4048
|
+
...createNamedArgs(values, unfollowParams),
|
|
4049
|
+
...encodeEventLog("URDUnfollow", unfollowParams, values),
|
|
4050
|
+
standard: "LSP26FollowerSystem"
|
|
4051
|
+
};
|
|
4052
|
+
}
|
|
4053
|
+
__name(unwrapLSP26Unfollow, "unwrapLSP26Unfollow");
|
|
4054
|
+
function unwrapLSP7Transfer(receivedData, _from, _profileAddress, eventName) {
|
|
4055
|
+
try {
|
|
4056
|
+
const [operator, sender, recipient, amount, data] = decodeAbiParameters3(
|
|
4057
|
+
[
|
|
4058
|
+
{ name: "operator", type: "address" },
|
|
4059
|
+
{ name: "from", type: "address" },
|
|
4060
|
+
{ name: "to", type: "address" },
|
|
4061
|
+
{ name: "amount", type: "uint256" },
|
|
4062
|
+
{ name: "data", type: "bytes" }
|
|
4063
|
+
],
|
|
4064
|
+
receivedData
|
|
4065
|
+
);
|
|
4066
|
+
const values = [operator, sender, recipient, amount, true, data];
|
|
4067
|
+
return {
|
|
4068
|
+
eventName,
|
|
4069
|
+
...createNamedArgs(values, lsp7TransferParams),
|
|
4070
|
+
...encodeEventLog(eventName, lsp7TransferParams, values),
|
|
4071
|
+
standard: "LSP7DigitalAsset"
|
|
4072
|
+
};
|
|
4073
|
+
} catch {
|
|
4074
|
+
return void 0;
|
|
4075
|
+
}
|
|
4076
|
+
}
|
|
4077
|
+
__name(unwrapLSP7Transfer, "unwrapLSP7Transfer");
|
|
4078
|
+
function unwrapLSP8Transfer(receivedData, _from, _profileAddress, eventName) {
|
|
4079
|
+
try {
|
|
4080
|
+
const [operator, sender, recipient, tokenId, data] = decodeAbiParameters3(
|
|
4081
|
+
[
|
|
4082
|
+
{ name: "operator", type: "address" },
|
|
4083
|
+
{ name: "from", type: "address" },
|
|
4084
|
+
{ name: "to", type: "address" },
|
|
4085
|
+
{ name: "tokenId", type: "bytes32" },
|
|
4086
|
+
{ name: "data", type: "bytes" }
|
|
4087
|
+
],
|
|
4088
|
+
receivedData
|
|
4089
|
+
);
|
|
4090
|
+
const values = [operator, sender, recipient, tokenId, true, data];
|
|
4091
|
+
return {
|
|
4092
|
+
eventName,
|
|
4093
|
+
...createNamedArgs(values, lsp8TransferParams),
|
|
4094
|
+
...encodeEventLog(eventName, lsp8TransferParams, values),
|
|
4095
|
+
standard: "LSP8IdentifiableDigitalAsset"
|
|
4096
|
+
};
|
|
4097
|
+
} catch {
|
|
4098
|
+
return void 0;
|
|
4099
|
+
}
|
|
4100
|
+
}
|
|
4101
|
+
__name(unwrapLSP8Transfer, "unwrapLSP8Transfer");
|
|
4102
|
+
var typeIdUnwrappers = {
|
|
4103
|
+
[TYPEID_LSP26_FOLLOW]: { fn: unwrapLSP26Follow, eventName: "Follow" },
|
|
4104
|
+
[TYPEID_LSP26_UNFOLLOW]: { fn: unwrapLSP26Unfollow, eventName: "Unfollow" },
|
|
4105
|
+
[TYPEID_LSP7_TOKENSSENDER]: {
|
|
4106
|
+
fn: unwrapLSP7Transfer,
|
|
4107
|
+
eventName: "URDTokensSent"
|
|
4108
|
+
},
|
|
4109
|
+
[TYPEID_LSP7_TOKENSRECIPIENT]: {
|
|
4110
|
+
fn: unwrapLSP7Transfer,
|
|
4111
|
+
eventName: "URDTokensReceived"
|
|
4112
|
+
},
|
|
4113
|
+
[TYPEID_LSP8_TOKENSSENDER]: {
|
|
4114
|
+
fn: unwrapLSP8Transfer,
|
|
4115
|
+
eventName: "URDTokensSent"
|
|
4116
|
+
},
|
|
4117
|
+
[TYPEID_LSP8_TOKENSRECIPIENT]: {
|
|
4118
|
+
fn: unwrapLSP8Transfer,
|
|
4119
|
+
eventName: "URDTokensReceived"
|
|
4120
|
+
}
|
|
4121
|
+
};
|
|
4122
|
+
function unwrapUniversalReceiver(typeId, receivedData, from, profileAddress) {
|
|
4123
|
+
const entry = typeIdUnwrappers[typeId];
|
|
4124
|
+
if (entry) {
|
|
4125
|
+
const result = entry.fn(receivedData, from, profileAddress, entry.eventName);
|
|
4126
|
+
if (result) {
|
|
4127
|
+
return result;
|
|
4128
|
+
}
|
|
4129
|
+
}
|
|
4130
|
+
const values = [from, typeId, receivedData];
|
|
4131
|
+
return {
|
|
4132
|
+
eventName: "URDNotification",
|
|
4133
|
+
...createNamedArgs(values, notificationParams),
|
|
4134
|
+
...encodeEventLog("Notification", notificationParams, values)
|
|
4135
|
+
};
|
|
4136
|
+
}
|
|
4137
|
+
__name(unwrapUniversalReceiver, "unwrapUniversalReceiver");
|
|
4138
|
+
|
|
3975
4139
|
// src/decoder/plugins/enhanceLSP0ERC725Account.ts
|
|
3976
4140
|
var enhanceLSP0ERC725AccountPlugin = standardPlugin(
|
|
3977
4141
|
UniversalProfile,
|
|
@@ -3983,7 +4147,33 @@ var enhanceLSP0ERC725AccountPlugin = standardPlugin(
|
|
|
3983
4147
|
{
|
|
3984
4148
|
enhance: enhanceLSP0ERC725Account,
|
|
3985
4149
|
decodeEvent: /* @__PURE__ */ __name(async (log, options) => {
|
|
3986
|
-
|
|
4150
|
+
const decoded = decodeEvent(options.chain, UniversalProfile, log);
|
|
4151
|
+
if (!decoded || decoded.eventName !== "UniversalReceiver") {
|
|
4152
|
+
return decoded;
|
|
4153
|
+
}
|
|
4154
|
+
const typeId = decoded.args.find((a) => a.name === "typeId")?.value;
|
|
4155
|
+
const receivedData = decoded.args.find((a) => a.name === "receivedData")?.value;
|
|
4156
|
+
const from = decoded.args.find((a) => a.name === "from")?.value;
|
|
4157
|
+
const profileAddress = decoded.address;
|
|
4158
|
+
if (!typeId || !receivedData || !from) {
|
|
4159
|
+
return decoded;
|
|
4160
|
+
}
|
|
4161
|
+
const unwrapped = unwrapUniversalReceiver(
|
|
4162
|
+
typeId,
|
|
4163
|
+
receivedData,
|
|
4164
|
+
from,
|
|
4165
|
+
profileAddress
|
|
4166
|
+
);
|
|
4167
|
+
const { wrappers: _w, standard: _s, ...logBase } = decoded;
|
|
4168
|
+
return {
|
|
4169
|
+
...logBase,
|
|
4170
|
+
eventName: unwrapped.eventName,
|
|
4171
|
+
args: unwrapped.args,
|
|
4172
|
+
standard: unwrapped.standard,
|
|
4173
|
+
topics: unwrapped.topics,
|
|
4174
|
+
data: unwrapped.data,
|
|
4175
|
+
wrappers: [logBase]
|
|
4176
|
+
};
|
|
3987
4177
|
}, "decodeEvent")
|
|
3988
4178
|
}
|
|
3989
4179
|
);
|
|
@@ -5898,9 +6088,9 @@ var abi2 = [
|
|
|
5898
6088
|
|
|
5899
6089
|
// src/decoder/functionSignature.ts
|
|
5900
6090
|
import {
|
|
5901
|
-
decodeAbiParameters as
|
|
5902
|
-
encodeAbiParameters,
|
|
5903
|
-
getAddress,
|
|
6091
|
+
decodeAbiParameters as decodeAbiParameters4,
|
|
6092
|
+
encodeAbiParameters as encodeAbiParameters2,
|
|
6093
|
+
getAddress as getAddress2,
|
|
5904
6094
|
isAddress as isAddress2,
|
|
5905
6095
|
isAddressEqual as isAddressEqual2,
|
|
5906
6096
|
parseAbiParameters,
|
|
@@ -6055,7 +6245,7 @@ async function fetchAbi(chain, address, options) {
|
|
|
6055
6245
|
const explorer = chain.blockExplorers?.default?.apiUrl;
|
|
6056
6246
|
if (!explorer) return void 0;
|
|
6057
6247
|
const cache = options?.cache ?? defaultCache;
|
|
6058
|
-
let key =
|
|
6248
|
+
let key = getAddress2(address);
|
|
6059
6249
|
const cacheKey = makeCacheKey("abi" /* ABI */, key, String(chain.id));
|
|
6060
6250
|
return cache.getOrSet(
|
|
6061
6251
|
cacheKey,
|
|
@@ -6197,7 +6387,7 @@ var getFunctionSignature = /* @__PURE__ */ __name(async (chain, input, to, prefe
|
|
|
6197
6387
|
const params = generateNamedAbiParameters(
|
|
6198
6388
|
result.text_signature || result.name
|
|
6199
6389
|
);
|
|
6200
|
-
const args =
|
|
6390
|
+
const args = decodeAbiParameters4(params, `0x${data.slice(8)}`);
|
|
6201
6391
|
const encodeArgs = Array.from({ length: params.length }).map(
|
|
6202
6392
|
(_val, index) => {
|
|
6203
6393
|
if (params[index].type === "bool") {
|
|
@@ -6215,7 +6405,7 @@ var getFunctionSignature = /* @__PURE__ */ __name(async (chain, input, to, prefe
|
|
|
6215
6405
|
return args[`${index}`] ?? "0x";
|
|
6216
6406
|
}
|
|
6217
6407
|
);
|
|
6218
|
-
const newData =
|
|
6408
|
+
const newData = encodeAbiParameters2(
|
|
6219
6409
|
params,
|
|
6220
6410
|
encodeArgs
|
|
6221
6411
|
).slice(2);
|
|
@@ -6557,7 +6747,7 @@ __name(createMemoryAddressCache, "createMemoryAddressCache");
|
|
|
6557
6747
|
// src/server/lsp23Resolver.ts
|
|
6558
6748
|
import {
|
|
6559
6749
|
bytesToHex,
|
|
6560
|
-
decodeAbiParameters as
|
|
6750
|
+
decodeAbiParameters as decodeAbiParameters5,
|
|
6561
6751
|
isHex as isHex4,
|
|
6562
6752
|
parseAbiParameters as parseAbiParameters2
|
|
6563
6753
|
} from "viem";
|
|
@@ -6566,7 +6756,7 @@ var DEPLOY_ERC1167_PROXIES_SELECTOR = "0x6a66a753";
|
|
|
6566
6756
|
function decodeDeploymentCalldata(input) {
|
|
6567
6757
|
try {
|
|
6568
6758
|
const params = `0x${input.slice(10)}`;
|
|
6569
|
-
const decoded =
|
|
6759
|
+
const decoded = decodeAbiParameters5(
|
|
6570
6760
|
parseAbiParameters2(
|
|
6571
6761
|
"(bytes32,uint256,address,bytes), (uint256,address,bytes,bool,bytes), address, bytes"
|
|
6572
6762
|
),
|
|
@@ -6598,7 +6788,7 @@ function decodeDeploymentCalldata(input) {
|
|
|
6598
6788
|
__name(decodeDeploymentCalldata, "decodeDeploymentCalldata");
|
|
6599
6789
|
function decodeDeploymentOutput(output) {
|
|
6600
6790
|
try {
|
|
6601
|
-
const decoded =
|
|
6791
|
+
const decoded = decodeAbiParameters5(
|
|
6602
6792
|
parseAbiParameters2("address, address"),
|
|
6603
6793
|
output
|
|
6604
6794
|
);
|
|
@@ -6617,7 +6807,7 @@ function extractControllersFromInitCalldata(initializationCalldata) {
|
|
|
6617
6807
|
if (!initializationCalldata || initializationCalldata === "0x") {
|
|
6618
6808
|
return [];
|
|
6619
6809
|
}
|
|
6620
|
-
const decoded =
|
|
6810
|
+
const decoded = decodeAbiParameters5(
|
|
6621
6811
|
parseAbiParameters2("bytes32[], bytes[]"),
|
|
6622
6812
|
initializationCalldata
|
|
6623
6813
|
);
|
|
@@ -6833,7 +7023,7 @@ var getTransactionCount = consumerModel.getTransactionCount.bind(consumerModel);
|
|
|
6833
7023
|
var getDecodedCount = consumerModel.getDecodedCount.bind(consumerModel);
|
|
6834
7024
|
var getDecodedTransactions = consumerModel.getDecodedTransactions.bind(consumerModel);
|
|
6835
7025
|
var getTransactionsInOrder = consumerModel.getTransactionsInOrder.bind(consumerModel);
|
|
6836
|
-
var
|
|
7026
|
+
var getAddress3 = consumerModel.getAddress.bind(consumerModel);
|
|
6837
7027
|
var getSignal = consumerModel.getSignal.bind(consumerModel);
|
|
6838
7028
|
var subscribe = consumerModel.subscribe.bind(consumerModel);
|
|
6839
7029
|
var getState = consumerModel.getState.bind(consumerModel);
|
|
@@ -6872,7 +7062,7 @@ export {
|
|
|
6872
7062
|
extractControllersFromInitCalldata,
|
|
6873
7063
|
fetchMultipleAddresses,
|
|
6874
7064
|
fetchProfilesByControllers,
|
|
6875
|
-
|
|
7065
|
+
getAddress3 as getAddress,
|
|
6876
7066
|
getAllData,
|
|
6877
7067
|
getAllKeys,
|
|
6878
7068
|
getAllTransactions,
|