0

Context: I'm trying to integrate a contract call in React and I need to need call another contract call if the previous one is completed successfully. Is there any other way that we can know if the safeTransaction is completed? One way I can see is to use this API - https://safe-transaction-mainnet.safe.global/api/v1/multisig-transactions/ and use isSuccessful key from the response. But is there any other alternative method using web3.js or ether.js or any other web3 solution?

1 Answer 1

0

It depends if both of them called by your code or not. If the fist call of another contract called is not code in your side(for example a DEX smart contract called by a user who is not your user, in this case you should use emitted events. But if not(if your contract called by a user and you want to called another a function in another contract), you can return a bool from first call that shows if tx is failed or not, if returns true sends second call (to doing this you can use useStateand useEffect from React. I hope it makes sense

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.