eigerco / nebula

A soroban contract library
https://nebula.eiger.co
Apache License 2.0
7 stars 2 forks source link

Marketplace Contract Implementation #81

Closed geofmureithi closed 1 year ago

geofmureithi commented 1 year ago

Objective: Develop a marketplace smart contract with fundamental methods to facilitate asset listing, buying, updating, and cancellation.

Methods:

  1. init(admin: Address, percentage: i128): Initialize the contract with the admin's address and a percentage for the admin fee.
  2. list_asset(seller: Address, asset: Address, price: i128): Allow sellers to list assets by specifying the seller's address, the asset's address, and the asset's price.
  3. buy_asset(buyer: Address, asset: Address, price: i128): Enable buyers to purchase assets by providing the buyer's address, the asset's address, and the agreed-upon price.
  4. update_listing(seller: Address, asset: Address, old_price: i128, new_price: i128): Permit sellers to update the price of a listed asset, ensuring they provide the correct seller and asset addresses, as well as the old and new prices.
  5. cancel_listing(seller: Address, asset: Address, price: i128): Allow sellers to remove a listing by specifying their address, the asset's address, and the price at which it was listed.

Checklist:

geofmureithi commented 1 year ago

@mariopil @eloylp Let me hear any thoughts and suggestions.

eloylp commented 1 year ago

82 Was reviewed and approved - with pending impl at #90 - closing this - re-open if necessary.