-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: bring cosmwasm nft marketplace contract in monorepo
history of previously called teritori-vault repo: commit 75a692533b9188587ebfa909c5576376b8d65999 Author: yieldoption <[email protected]> Date: Thu Nov 3 23:26:23 2022 -0400 gas optimization for nft vault contract (#6) commit 0794cc77e08e1bc72c7d914ea391208dba25b9ca Author: yieldoption <[email protected]> Date: Thu Nov 3 12:16:51 2022 -0400 fix royalty query (#5) commit f48c7fe8869f2d83dc61308ceb37c64d3bb7e4c6 Merge: 6d528f0 b11d308 Author: n0izn0iz <[email protected]> Date: Thu Oct 6 18:14:13 2022 +0200 Merge pull request #4 from TERITORI/feature/royalty feature / royalty commit b11d3082666d4a4df3dcef08a4e69d327ebf3be9 Author: yieldoption <[email protected]> Date: Wed Oct 5 22:02:29 2022 -0400 cargo fmt commit 6f284d07f205e3256d0a7db0c6da458f20aa38f3 Author: yieldoption <[email protected]> Date: Wed Oct 5 22:00:09 2022 -0400 add cosmwasm binary commit 01e4bbdef8968af5c94d3708202ea372bf2bb424 Author: yieldoption <[email protected]> Date: Wed Oct 5 21:58:16 2022 -0400 update schema commit 6ada5b2346d12f27a7680a69fc93df016898e0cc Author: yieldoption <[email protected]> Date: Wed Oct 5 21:58:06 2022 -0400 implement royalty feature commit 6d528f06ee0d0a98daa5301578e495cf5386a62e Merge: e3a2d0e 68b85a8 Author: n0izn0iz <[email protected]> Date: Tue Oct 4 16:24:19 2022 +0200 Merge pull request #3 from TERITORI/ci chore: add ci checks commit 68b85a80fdd602c22296eb6d8fe6703e7df6e943 Author: Norman Meier <[email protected]> Date: Tue Oct 4 16:20:25 2022 +0200 chore: add ci checks Signed-off-by: Norman Meier <[email protected]> commit e3a2d0e8f943445a44b085d1bbbac8f65d7e0d76 Author: yieldoption <[email protected]> Date: Mon Sep 26 22:37:32 2022 -0400 add tests for nft vault contract commit a04e44fe54ed798d96659098914af72a0c36d8f5 Merge: 8aad97c 48f7ba2 Author: n0izn0iz <[email protected]> Date: Tue Sep 13 01:00:08 2022 +0200 Merge pull request #2 from TERITORI/schema-and-deploy chore: generate schema and deploy commit 48f7ba2b07f6dcf220ff79b4ee9088e24b4b2c63 Author: Norman Meier <[email protected]> Date: Mon Sep 12 22:13:25 2022 +0200 chore: generate schema and deploy Signed-off-by: Norman Meier <[email protected]> commit 8aad97ceb33e93f5c605e930074019a80ed5abb1 Author: sarawut <[email protected]> Date: Wed Jun 8 19:24:19 2022 +0700 upgrade cosmwasm version commit aef4da7c70376056cef6e2dc9f2a6a758a9012c7 Merge: c610270 c80a675 Author: Yannis <[email protected]> Date: Thu Mar 10 18:04:51 2022 +0100 Merge pull request #1 from POPSmartContract/fixed fix receivenft hook, save process commit c80a675f2c92b2dea0f82e7a1ca050908ccfff26 Author: unknown <[email protected]> Date: Thu Mar 10 12:01:30 2022 -0500 fix receivenft hook, save process commit c6102700dd3a51706bd2f2a1ba1a1b2be5ca2cdf Author: devstar <[email protected]> Date: Wed Mar 2 00:15:54 2022 +0700 set initial price for deposit, transfer nft when buy commit 20f335c01e44779ce8781d83d2a62bdad3272d42 Author: devstar <[email protected]> Date: Thu Feb 24 21:20:28 2022 +0700 add fee withdraw function, query_all_nft_list in vault commit 9963a9d7f413aed5942ee873283be6d0762ec533 Author: devstar <[email protected]> Date: Tue Feb 22 01:00:06 2022 +0700 complete buy function, add more queries commit 2fbcdcf01d2b335baff30783d444e6df2098d016 Author: devstar <[email protected]> Date: Thu Feb 10 20:08:30 2022 +0700 initial vault contract
- Loading branch information
Showing
15 changed files
with
66 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,9 @@ BUNKER_MINTER_PACKAGE=teritori-bunker-minter | |
GO?=go | ||
GOFMT?=$(shell $(GO) env GOROOT)/bin/gofmt | ||
|
||
COSMWASM_CONTRACTS_DIR=cosmwasm-contracts | ||
INTERNAL_COSMWASM_CONTRACTS=$(wildcard $(COSMWASM_CONTRACTS_DIR)/*) | ||
|
||
TOKEN_REPO=teritori-nfts | ||
TOKEN_PACKAGE=teritori-nft | ||
SQUAD_STAKING_PACKAGE=teritori-squad-staking | ||
|
@@ -15,9 +18,6 @@ NAME_SERVICE_PACKAGE=teritori-name-service | |
RIOTER_FOOTER_REPO=rioters-footer-nft | ||
RIOTER_FOOTER_PACKAGE=rioter-footer-nft | ||
|
||
VAULT_REPO=teritori-vault | ||
VAULT_PACKAGE=teritori-nft-vault | ||
|
||
ADDR_LIST_REPO=cw_addr_list | ||
ADDR_LIST_PACKAGE=cw-address-list | ||
|
||
|
@@ -89,26 +89,13 @@ docker.backend: | |
docker build . -f go/cmd/teritori-dapp-backend/Dockerfile -t teritori/teritori-dapp-backend:$(shell git rev-parse --short HEAD) | ||
|
||
.PHONY: generate.contracts-clients | ||
generate.contracts-clients: $(CONTRACTS_CLIENTS_DIR)/$(BUNKER_MINTER_PACKAGE) $(CONTRACTS_CLIENTS_DIR)/$(NAME_SERVICE_PACKAGE) $(CONTRACTS_CLIENTS_DIR)/$(RIOTER_FOOTER_PACKAGE) $(CONTRACTS_CLIENTS_DIR)/$(TOKEN_PACKAGE) $(CONTRACTS_CLIENTS_DIR)/$(VAULT_PACKAGE) $(CONTRACTS_CLIENTS_DIR)/cw721-membership | ||
generate.contracts-clients: generate.internal-contracts-clients $(CONTRACTS_CLIENTS_DIR)/$(BUNKER_MINTER_PACKAGE) $(CONTRACTS_CLIENTS_DIR)/$(NAME_SERVICE_PACKAGE) $(CONTRACTS_CLIENTS_DIR)/$(RIOTER_FOOTER_PACKAGE) $(CONTRACTS_CLIENTS_DIR)/$(TOKEN_PACKAGE) | ||
|
||
.PHONY: generate.go-networks | ||
generate.go-networks: node_modules validate-networks | ||
npx tsx packages/scripts/generateGoNetworks.ts | $(GOFMT) > go/pkg/networks/networks.gen.go | ||
npx tsx packages/scripts/codegen/generateGoNetworkFeatures.ts | $(GOFMT) > go/pkg/networks/features.gen.go | ||
|
||
.PHONY/: $(CONTRACTS_CLIENTS_DIR)/cw721-membership | ||
$(CONTRACTS_CLIENTS_DIR)/cw721-membership: node_modules | ||
rm -fr $@ | ||
cd cosmwasm-contracts/cw721-membership && cargo schema | ||
npx cosmwasm-ts-codegen generate \ | ||
--plugin client \ | ||
--schema cosmwasm-contracts/cw721-membership/schema \ | ||
--out $@ \ | ||
--name cw721-membership \ | ||
--no-bundle | ||
npx tsx packages/scripts/makeTypescriptIndex $@ | ||
touch $@ | ||
|
||
.PHONY: $(CONTRACTS_CLIENTS_DIR)/$(BUNKER_MINTER_PACKAGE) | ||
$(CONTRACTS_CLIENTS_DIR)/$(BUNKER_MINTER_PACKAGE): node_modules | ||
rm -fr $(CANDYMACHINE_REPO) | ||
|
@@ -216,23 +203,6 @@ $(CONTRACTS_CLIENTS_DIR)/$(BREEDING_PACKAGE): node_modules | |
go fmt ./go/pkg/contracts/breeding_minter_types | ||
rm -fr $(CANDYMACHINE_REPO) | ||
|
||
.PHONY: $(CONTRACTS_CLIENTS_DIR)/$(VAULT_PACKAGE) | ||
$(CONTRACTS_CLIENTS_DIR)/$(VAULT_PACKAGE): node_modules | ||
rm -fr $(VAULT_REPO) | ||
git clone [email protected]:TERITORI/$(VAULT_REPO).git | ||
cd $(VAULT_REPO) && git checkout 75a692533b9188587ebfa909c5576376b8d65999 | ||
rm -fr $@ | ||
npx cosmwasm-ts-codegen generate \ | ||
--plugin client \ | ||
--schema $(VAULT_REPO)/contracts/nft-vault/schema \ | ||
--out $@ \ | ||
--name $(VAULT_PACKAGE) \ | ||
--no-bundle | ||
mkdir -p go/pkg/contracts/vault_types | ||
go run github.com/a-h/generate/cmd/[email protected] -i $(VAULT_REPO)/contracts/nft-vault/schema/execute_msg.json -o go/pkg/contracts/vault_types/execute_msg.go -p vault_types | ||
go fmt ./go/pkg/contracts/vault_types | ||
rm -fr $(VAULT_REPO) | ||
|
||
.PHONY: $(CONTRACTS_CLIENTS_DIR)/$(ADDR_LIST_PACKAGE) | ||
$(CONTRACTS_CLIENTS_DIR)/$(ADDR_LIST_PACKAGE): node_modules | ||
rm -fr $(ADDR_LIST_REPO) | ||
|
@@ -404,8 +374,36 @@ bump-app-build-number: | |
|
||
.PHONY: test.rust | ||
test.rust: | ||
cd cosmwasm-contracts/cw721-membership && cargo test | ||
set -xeuo pipefail ; \ | ||
for file in $(INTERNAL_COSMWASM_CONTRACTS); do \ | ||
cd $${file} ; \ | ||
cargo test ; \ | ||
cd - ; \ | ||
done | ||
|
||
.PHONY: build.rust | ||
build.rust: | ||
cd cosmwasm-contracts/cw721-membership && cargo wasm | ||
set -xeuo pipefail ; \ | ||
for file in $(INTERNAL_COSMWASM_CONTRACTS); do \ | ||
cd $${file} ; \ | ||
cargo wasm ; \ | ||
cd - ; \ | ||
done | ||
|
||
.PHONY: generate.internal-contracts-clients | ||
generate.internal-contracts-clients: node_modules | ||
set -xeuo pipefail ; \ | ||
for indir in $(INTERNAL_COSMWASM_CONTRACTS) ; do \ | ||
(cd $${indir} && cargo schema && cd -) || exit 1 ; \ | ||
pkgname="$$(basename $${indir})" ; \ | ||
outdir="$(CONTRACTS_CLIENTS_DIR)/$${pkgname}" ; \ | ||
rm -fr $${outdir} ; \ | ||
npx cosmwasm-ts-codegen generate \ | ||
--plugin client \ | ||
--schema $${indir}/schema \ | ||
--out $${outdir} \ | ||
--name $${pkgname} \ | ||
--no-bundle ; \ | ||
npx tsx packages/scripts/makeTypescriptIndex $${outdir} ; \ | ||
done | ||
|
Submodule nft-marketplace
added at
75a692
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from "./NftMarketplace.client"; | ||
export * from "./NftMarketplace.types"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters