Skip to content

Commit

Permalink
feat(marketplace): escrow sell order credits (#878)
Browse files Browse the repository at this point in the history
* feat: escrow credits

* fix: revert mock times

* fix: typo

* chore: add event emission to sell

* fix: assert precision of sell order qty

* feat: pruning

* chore: fmt.Errorf -> sdkerrors.ErrInvalidRequest

* chore: change comment

* chore: move prune test to its own file

Co-authored-by: technicallyty <48813565+tytech3@users.noreply.github.com>
  • Loading branch information
technicallyty and technicallyty authored Mar 15, 2022
1 parent f0faf4c commit 3f1dff4
Show file tree
Hide file tree
Showing 8 changed files with 645 additions and 101 deletions.
215 changes: 183 additions & 32 deletions api/regen/ecocredit/v1/state.pulsar.go

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions proto/regen/ecocredit/v1/state.proto
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ message BatchBalance {

// retired is the retired amount of credits
string retired = 4;

// escrowed is the amount of credits locked up in escrow for the marketplace.
string escrowed = 5;
}

// BatchSupply tracks the supply of a credit batch
Expand All @@ -220,4 +223,8 @@ message BatchSupply {
// cancelled, effectively undoing the issuance. The sum of total_amount and
// amount_cancelled will always equal the original credit issuance amount.
string cancelled_amount = 4;

// escrowed_amount is the amount of credits in the batch that have been
// locked up in escrow for use in the marketplace.
string escrowed_amount = 5;
}
2 changes: 1 addition & 1 deletion x/data/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ require (
github.com/tendermint/tendermint v0.34.15
google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf
google.golang.org/grpc v1.44.0
google.golang.org/protobuf v1.27.1
)

require (
Expand Down Expand Up @@ -118,6 +117,7 @@ require (
golang.org/x/sys v0.0.0-20211004093028-2c5d950f24ef // indirect
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/ini.v1 v1.63.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
Expand Down
215 changes: 161 additions & 54 deletions x/ecocredit/core/state.pb.go

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

Loading

0 comments on commit 3f1dff4

Please sign in to comment.