Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function to decode return data if it's received by means other than as an exception when sending transaction #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sim31
Copy link

@sim31 sim31 commented Nov 11, 2024

The way it currently works is that you send a transactions using ethers and if transaction fails you provide a generated exception to this library so that it extracts and decodes an error.

I have a contract that sends custom messages ("calldata" specified by the user) to other contracts and emits return data from these calls as events. The original transaction does not revert (so no exception to decode is generated). I take return data from the emitted event and want to decode it into something meaningful.

So I added decodeReturnData to do that and extracted common code from decode and decodeReturnData to a separate function.

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

Successfully merging this pull request may close these issues.

1 participant