Summary
The buy function emits a contract event on success but no integration test verifies the event fields are correct. A test should perform a buy transaction and assert the emitted event contains the expected buyer, creator, quantity, price, and timestamp fields.
Scope
- Deploy the contract and perform a buy of 1 key for a seeded creator
- Extract the contract events from the transaction result meta
- Assert one buy event is emitted with fields:
buyer, creator_id, quantity, price_paid, ledger
- Assert field values match the transaction inputs and current ledger number
Acceptance Criteria
ETA: 12 hours
Coordinate on Telegram
Summary
The buy function emits a contract event on success but no integration test verifies the event fields are correct. A test should perform a buy transaction and assert the emitted event contains the expected buyer, creator, quantity, price, and timestamp fields.
Scope
buyer,creator_id,quantity,price_paid,ledgerAcceptance Criteria
price_paidmatches bonding curve price at the supply step before the buyledgermatches the transaction ledger numberETA: 12 hours
Coordinate on Telegram