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

fetchEvents contract events are returned as sorted by alphabet order #900

Open
Pfed-prog opened this issue Apr 7, 2024 · 0 comments
Open

Comments

@Pfed-prog
Copy link

Pfed-prog commented Apr 7, 2024

image
example of output

const res = await fetchEvents({ publicKey: appId });

console.log(res[1].events);

contract events ordered by me as a developer:

events = {
  'updated-merkle-root': Field,
  'updated-fee': UInt64,
  'updated-total-supply': UInt64,
  'updated-inited-amount': Field,
  'inited-max-supply': Field,
  'inited-nft': Field,
  'minted-nft': Field,
  'transferred-nft': Field,
};

When sorted by alphabet:

events = {
  'inited-max-supply': Field,
  'inited-nft': Field,
  'minted-nft': Field,
  'transferred-nft': Field,
  'updated-fee': UInt64,
  'updated-inited-amount': Field,
  'updated-merkle-root': Field,
  'updated-total-supply': UInt64,
};

In the output the 6 event is 'updated-merkle-root', 5 is 'updated-inited-amount' and 'inited-nft'.

https://docs.minaprotocol.com/zkapps/o1js/fetch-events-and-actions
Does not mention such events behaviour

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

No branches or pull requests

1 participant