mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-02-04 05:53:11 +00:00
16 lines
361 B
NASM
16 lines
361 B
NASM
|
|
// struct Refund { amount }
|
||
|
|
|
||
|
|
%macro journal_refund
|
||
|
|
%journal_add_1(@JOURNAL_ENTRY_REFUND)
|
||
|
|
%endmacro
|
||
|
|
|
||
|
|
global revert_refund:
|
||
|
|
// stack: entry_type, ptr, retdest
|
||
|
|
POP
|
||
|
|
%journal_load_1
|
||
|
|
// stack: amount, retdest
|
||
|
|
%mload_global_metadata(@GLOBAL_METADATA_REFUND_COUNTER)
|
||
|
|
SUB
|
||
|
|
%mstore_global_metadata(@GLOBAL_METADATA_REFUND_COUNTER)
|
||
|
|
JUMP
|