Skip to content

Commit e3dadc6

Browse files
Peartesjburntjustinbarry
authored
Asset + Marketplace Contract (#81)
* chore: add in base spec msgs * chore: asset method trait * chore: implement default plugins * chore: listing an asset * chore: more coverage on Listing * chore: delist and buy WIP on timelocks * chore: unit test on delist * chore: reserve and reserve unit test * chore: more generic contract * feat: add in default plugins * feat: add in test and asset-base contract * chore: disable raw transfer if royalty is set * feat: add in query messages * fix: remove default features for asset-base * feat: make sure deductions are made in sellable buy logic * chore: add in query impl into asset-base contract * chore: remove unwrap() * fix: proper seller is owner * chore: remove the on_primary for royalty plugin * chore: add unreserve endpoint to asset contract * chore: use Timestamps instead of Expiration for reserve * chore: allow de-listing a reserved asset * fmt: linting * fmt: cargo fmt * fix: undeclared imports * chore: refractor * fmt: cargo fmt * fmt: clippy * chore: refractor * chore: - fail tx when multiple coins are set to make sure coins aren't stuck in contract - make sure Abstract types without sanitation enforced aren't used in msgs and then directly for logic * chore: add in marketplace details in emitted events * fix: failing test * chore: gate collection msg to collection owner * chore: remove marketplace fee * asset marketplace (#84) * chore: add in base spec msgs * chore: asset method trait * chore: implement default plugins * chore: listing an asset * chore: more coverage on Listing * chore: delist and buy WIP on timelocks * chore: unit test on delist * chore: reserve and reserve unit test * chore: more generic contract * feat: add in default plugins * feat: add in test and asset-base contract * chore: disable raw transfer if royalty is set * feat: add in query messages * fix: remove default features for asset-base * feat: make sure deductions are made in sellable buy logic * chore: add in query impl into asset-base contract * format toml * add marketplace to lockfile * add cw-address-like * add contract * update marketplace * add queries * add tests * move offers * add item-sold event * complete buy * offers * add more tests * remove unused * accept offer * change to queue * set fee recipient and update config by manager * chore: remove unwrap() * fix: proper seller is owner * fix linting * check listing is tied to seller * add justfile * fix clippy issues * add royalty test * Merge pull request #86 from burnt-labs/feature/marketplace-approval add approve/reject * update cargo file, finalize for and split execute * account for marketplace fees --------- Signed-off-by: Kehinde Faleye <Kenny.fale.kf@gmail.com> Co-authored-by: peartes <kenny.fale.kf@gmail.com> * fix: asset base contract * update marketplace fee and tests (#88) * handle asset price * split tests * fix tests * fix lint * format code * fix: stale listing and stale reservation * fee fixes (#89) * fix fee on approval * apply fee on accept offer * format * add tests * update test and approval --------- Co-authored-by: Kehinde Faleye <Kenny.fale.kf@gmail.com> * xion asset lint fixes (#90) * fmt code * handle linter fixes for account, user map and treasury contracts * handle asset lint issues * format code * reserve for (#92) * reserve for option * add test * fix lint issues * Update contracts/marketplace/src/execute.rs Co-authored-by: Justin <328965+justinbarry@users.noreply.github.com> Signed-off-by: jburnt <j@burnt.com> --------- Signed-off-by: jburnt <j@burnt.com> Co-authored-by: Justin <328965+justinbarry@users.noreply.github.com> * Fix errors (#94) * Fix cosmwasm/optimizer build errors * Update optimizer version in README to 0.17.0 * fix: compile errors in asset (#96) * fix: compile errors in asset * fix: update readme * fix: clippy --------- Signed-off-by: Kehinde Faleye <Kenny.fale.kf@gmail.com> * fix: cargo fmt --------- Signed-off-by: Kehinde Faleye <Kenny.fale.kf@gmail.com> Co-authored-by: Kehinde Faleye <Kenny.fale.kf@gmail.com> * fix linter and add build to ci * fix: rounding issues for small royalty values * fix: remove unneeded state update * fix: round ceil for royalty fee * fmt: cargo fmt * fix: round down royalty amount * chore: add in lint-asset to justfile * fix: clippy * chore: remove rounding royalty test * fix: revert back to round down royalties * fix: clippy * fmt: cargo fmt * fix(02): transfer and send nft disabled when listed (#100) * fix: transfer and send nft disabled when listed * fmt: cargo fmt * fix: clippy * use delist helper (#112) * fix (10): check for pre-existing pending sales (#111) * fix: check for pre-existing pending sales * fix fmt * fix(15): add sale_approvals to emitted events (#110) * fix: unreserve if applies on pending sale creation (#109) * fix(03): allow optional recipient through pending sales (#108) * fix: allow optional recipient through pending sales * fix format * fix(01): reject sale (#107) * add test case for rejecting an unlisted item * fix: check listing status before appending a delist message * fix linter * fix: use stored asset_price and price instead of recomputing during an approval buy (#104) * fix(07, 11 & 14): send marketplace fee to the fee_recipient (#106) * fix: send marketplace fee to the fee_recipient * fix: validate the config object to make sure the fee recipient is set * fix: remove reloading already loaded state * fix(05): min price plugin denom (#101) * fix: make sure min denom plugin checks denom match with ask price * fmt: cargo fmt * fix(08): remove exact price plugin on buy (#102) * fix: remove exact price plugin on buy * fix: clippy * fix failing test * cargo fmt --------- Signed-off-by: Kehinde Faleye <Kenny.fale.kf@gmail.com> Signed-off-by: jburnt <j@burnt.com> Co-authored-by: jburnt <j@burnt.com> Co-authored-by: Justin <328965+justinbarry@users.noreply.github.com>
1 parent d2b8ae9 commit e3dadc6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+12163
-192
lines changed

.cargo/config.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[alias]
2-
wasm = "build --release --lib --target wasm32-unknown-unknown"
32
schema = "run --example schema"
3+
wasm = "build --release --lib --target wasm32-unknown-unknown"
44

55
[env]
66
RUSTFLAGS = "-C link-arg=-s"
7-

.github/workflows/Basic.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- main
77
tags:
8-
- "v*.*.*"
8+
- 'v*.*.*'
99

1010
pull_request:
1111

@@ -23,7 +23,7 @@ jobs:
2323
uses: actions-rs/toolchain@v1
2424
with:
2525
profile: minimal
26-
toolchain: 1.89.0
26+
toolchain: 1.86.0
2727
target: wasm32-unknown-unknown
2828
override: true
2929

@@ -45,7 +45,7 @@ jobs:
4545
uses: actions-rs/toolchain@v1
4646
with:
4747
profile: minimal
48-
toolchain: 1.89.0
48+
toolchain: 1.86.0
4949
override: true
5050
components: rustfmt, clippy
5151

@@ -60,3 +60,11 @@ jobs:
6060
with:
6161
command: clippy
6262
args: -- -D warnings
63+
64+
build:
65+
runs-on: ubuntu-latest
66+
steps:
67+
- uses: actions/checkout@v4
68+
- name: Build development contracts
69+
run: |
70+
docker run --rm -v "${PWD}:/code" cosmwasm/optimizer:0.17.0

0 commit comments

Comments
 (0)