Merge pull request #391 from public-awesome/collection-creation-summary

Update parser for createVendingMinter transaction result
This commit is contained in:
Serkan Reis 2024-06-17 22:18:16 +03:00 committed by GitHub
commit ea7dea6a2a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -63,8 +63,10 @@ export const vendingFactory = (client: SigningCosmWasmClient, txSigner: string):
const result = await client.execute(senderAddress, contractAddress, msg, 'auto', '', funds)
return {
vendingMinterAddress: result.logs[0].events[16].attributes[0].value,
sg721Address: result.logs[0].events[18].attributes[0].value,
vendingMinterAddress: result.logs[0].events.filter((e) => e.type === 'instantiate')[0].attributes[0].value,
sg721Address: result.logs[0].events
.filter((e) => e.type === 'wasm')
.filter((e) => e.attributes[2]?.key === 'sg721_address')[0].attributes[2].value,
transactionHash: result.transactionHash,
logs: result.logs,
}