Marmalade-NG / marmalade-ng

Fork of Marmalade-V2
10 stars 2 forks source link

Add currency to events #10

Open CryptoPascal31 opened 6 months ago

CryptoPascal31 commented 6 months ago

With this PR, all events that handle price have now an additional currency field:

The currency is encoded as a string: eg: coin runonflux.flux

daplcor commented 6 months ago

this makes sense, any future policies should include this logic as well. Would you consider adding price to (emit-event (FIXED-SALE-BOUGHT (pact-id) (at 'id token))) and the other two policies? this will allow us to have one event to finalize sales vs multiple lookups. It looks like that field is already included in the enforce-sale-buy so it shouldn't create any new logic needs.