Skip to content

Storing objects created by entry functions offchain #401

Discussion options

You must be logged in to vote

@kshitjee i can do one more thing.
Get the tx hash, filter out the event and get the data
this will work.
is it correct method??

something like this

const transaction = await aptos.getTransactionByHash({ transactionHash: response.hash });
                if(transaction.type === "user_transaction"){
                    const event = transaction.events.find((event) => event.type === `${ABI_ADDRESS}::main::MyEvent`);
                    if(event){
                        
                    }
                }

i know that the type of txn is user txn and i know this will emit that specific event for my app. so this might work

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@ajaythxkur
Comment options

@ajaythxkur
Comment options

@kshitjee
Comment options

@ajaythxkur
Comment options

Answer selected by ajaythxkur
@kshitjee
Comment options

@ajaythxkur
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants