Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auction: implementation #13

Merged
merged 100 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from 87 commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
7d63acf
after rebase conflicts
gangov Aug 20, 2024
c488cd1
wip
gangov Aug 20, 2024
aed5c7d
updates place_bid
gangov Aug 20, 2024
4007fc6
refactors place_bid
gangov Aug 21, 2024
8d75b46
wip, validations
gangov Aug 21, 2024
86543c3
validations
gangov Aug 21, 2024
2f795e3
adds token into play
gangov Aug 21, 2024
9aba8c4
wip - finalize auctoin
gangov Aug 21, 2024
3a180c6
wip - buy now
gangov Aug 21, 2024
531f2d4
refactors auction
gangov Aug 21, 2024
c315f99
removes the token from source as it comes from the sdk
gangov Aug 21, 2024
b2d1252
refactors
gangov Aug 22, 2024
5971412
save auction by seller
gangov Aug 22, 2024
e5c1e7d
all auctions query
gangov Aug 22, 2024
b7c5d7b
tests
gangov Aug 22, 2024
4bb7589
test wip
gangov Aug 23, 2024
78cdc66
init twice should fail
gangov Aug 26, 2024
b4ca5f4
refactors for ease of use
gangov Aug 26, 2024
989b796
lints
gangov Aug 26, 2024
ae56326
test to check if we have at least one item
gangov Aug 26, 2024
789d307
adds test for successful bid with multiple users
gangov Aug 26, 2024
cea3894
adds an assertion that should fail
gangov Aug 26, 2024
014fb28
test to check if a bidder places a bid after an auction has been ended
gangov Aug 26, 2024
f81b85b
finalyze auction should fail when not correct state
gangov Aug 26, 2024
87db909
minimum bid not met
gangov Aug 26, 2024
0914417
fails when after the allowed period
gangov Aug 26, 2024
2354ccf
removes dbg!
gangov Aug 26, 2024
3dfce9c
adds token contract to the repo
gangov Aug 27, 2024
997428c
adds token contract to repo
gangov Aug 27, 2024
b9c3255
fixes a test and logic
gangov Aug 27, 2024
3ee2dbb
adds refunds when new bid comes in
gangov Aug 27, 2024
1796215
issues refund when not winning an auction
gangov Aug 28, 2024
f654052
pagination in place
gangov Aug 28, 2024
1f690fa
initialize is now separate function
gangov Aug 28, 2024
93824e0
test case for when the seller tries to place a bid on the auction he …
gangov Aug 29, 2024
82c6451
wip finalize bid
gangov Aug 29, 2024
4131125
adds a test case where we finalize an auction
gangov Aug 29, 2024
39860d7
refactors buy_now
gangov Aug 29, 2024
51cbd9d
refactors the tests
gangov Aug 29, 2024
2c37905
test when we try to buy_now after the auction has ended
gangov Aug 29, 2024
4c0cb50
buy_now when no buy now price has been set
gangov Aug 29, 2024
e2ef948
test for buy now
gangov Aug 29, 2024
5211709
pause works
gangov Aug 29, 2024
481198f
refactors test name
gangov Aug 29, 2024
27f25c4
pause / unpause tests
gangov Aug 29, 2024
7557420
wip - big test
gangov Aug 29, 2024
061c970
wip - lints
gangov Aug 29, 2024
b7331c3
two auctions for seller_a
gangov Aug 29, 2024
cf3441b
assertion that the get by seller works, 100% coverage in contract.rs
gangov Aug 29, 2024
83071b7
wip - assertions before bids okay
gangov Aug 29, 2024
55c486d
day #1 bids successful
gangov Aug 29, 2024
5243caf
wip big test
gangov Aug 29, 2024
c1645c6
updates with assertion about the current mp balance
gangov Aug 30, 2024
4241759
WIP
gangov Aug 30, 2024
0ba5d06
fixes a bug in get_all_by_seller
gangov Aug 30, 2024
08fd60f
buy_now now updates highest_bid and bidder
gangov Aug 30, 2024
648ae3f
assertions about sellers
gangov Aug 30, 2024
0cdddb1
big test complete
gangov Aug 30, 2024
01c7622
adds tests to increase coverage
gangov Aug 30, 2024
34cf613
removes a constant
gangov Sep 4, 2024
65d0207
adds currency to the initialize function and moving it away from crea…
gangov Sep 4, 2024
65e75cb
renames a var
gangov Sep 4, 2024
62871b3
wip
gangov Sep 4, 2024
6a0aca9
lints
gangov Sep 4, 2024
f4cd464
removes authorisation for finalizing an auction
gangov Sep 4, 2024
ff90ac4
fixes all the tests after rebase from master
gangov Sep 6, 2024
c6bfe4f
refactors finalize auction
gangov Sep 6, 2024
010dd11
fixes the failing test - quick and dirty
gangov Sep 6, 2024
5cdff65
refactors the logs
gangov Sep 6, 2024
7a8da9c
upgrade msg
gangov Sep 6, 2024
da8369c
logs
gangov Sep 6, 2024
fb9ae5c
env logs
gangov Sep 6, 2024
484b02f
wip
gangov Sep 6, 2024
a61d9e9
change storage type of bid related storage fns
gangov Sep 6, 2024
e0f0f0b
logs
gangov Sep 6, 2024
c775a2b
refactors test
gangov Sep 6, 2024
df9ac2f
wip
gangov Sep 9, 2024
3399df2
adds approval for transfer when creating an auction
gangov Sep 9, 2024
7745f7f
adds test to check if auth fails when unauthorized
gangov Sep 9, 2024
e00e466
extends the check for transfer and batch transfer
gangov Sep 10, 2024
2f19c6f
more tests
gangov Sep 10, 2024
17dba5f
adds better logging
gangov Sep 10, 2024
c8a92a2
adds better auth to burn and burn_batch
gangov Sep 10, 2024
bb03e33
pr comments
gangov Sep 10, 2024
4604ffb
changes the check for minimum_price_reached
gangov Sep 10, 2024
19c37b3
removes unnecessary functions that obfuscate code
gangov Sep 10, 2024
02330b1
refactors how we save code
gangov Sep 10, 2024
e51f8ac
extends a pause-unpause test case
gangov Sep 11, 2024
dcf9220
further expands the assertions
gangov Sep 11, 2024
699d8c2
handles an edge case when we search for active auctions and some of t…
gangov Sep 11, 2024
26f3d37
test for when buy now is used when the auction is not active
gangov Sep 11, 2024
52150af
adds test for when sender is not from and is not authorized
gangov Sep 11, 2024
f80f15e
refactors a test to incrase branch coverage
gangov Sep 11, 2024
ff23c9b
renames currency to auction_token
gangov Sep 11, 2024
d6cc82f
adds more test for better buy_now case handling when there's no previ…
gangov Sep 11, 2024
eb91785
optimizes the code in buy_now
gangov Sep 11, 2024
f171bce
refactors how we save the auction during pause and unpause
gangov Sep 11, 2024
03e7601
removes utils.rs
gangov Sep 11, 2024
3980a6a
enhances the assertions
gangov Sep 11, 2024
7604f85
renames all the occurances of currency to auction_token
gangov Sep 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SUBDIRS := contracts/collections contracts/deployer
SUBDIRS := contracts/token contracts/collections contracts/deployer contracts/auctions
BUILD_FLAGS ?=

default: build
Expand Down
2 changes: 1 addition & 1 deletion contracts/auctions/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "phoenix-nft-auctions"
version = { workspace = true }
authors = ["Jakub <[email protected]>"]
authors = ["Jakub <[email protected]>", "Kaloyan <[email protected]>"]
repository = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
Expand Down
Loading
Loading