0xPolygonMiden / miden-base

Core components of the Polygon Miden rollup
MIT License
73 stars 45 forks source link

Refactor transaction kernel events and errors #768

Open Dominik1999 opened 5 months ago

Dominik1999 commented 5 months ago

We need to refactor the kernel a bit in how we handle storage-related procedures.

If we don't do this in this PR, let's create an issue for it.

_Originally posted by @bobbinth in https://github.com/0xPolygonMiden/miden-base/pull/758#discussion_r1647214142_

Dominik1999 commented 3 months ago

Should we only do storage-related procedures in this PR or should we move all events into api.masm? For example, we also have some events in tx.masm

# EVENTS
# =================================================================================================

# Event emitted before a new note is created.
const.NOTE_BEFORE_CREATED_EVENT=131083
# Event emitted after a new note is created.
const.NOTE_AFTER_CREATED_EVENT=131084

# Event emitted before an ASSET is added to a note
const.NOTE_BEFORE_ADD_ASSET_EVENT=131085
# Event emitted after an ASSET is added to a note
const.NOTE_AFTER_ADD_ASSET_EVENT=131086