Skip to content

Commit

Permalink
Merge branch 'main' of github.com:TERITORI/teritori-dapp into feat/wa…
Browse files Browse the repository at this point in the history
…llet-single-delete

# Conflicts:
#	packages/screens/Mini/Wallet/TokenScreen.tsx
  • Loading branch information
omniwired committed Feb 23, 2024
2 parents 265c4c2 + fe0f35d commit 103b5e5
Show file tree
Hide file tree
Showing 198 changed files with 8,313 additions and 8,834 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
INDEXER_NETWORK_ID=teritori-testnet
TERITORI_MINTER_CODE_IDS=10
TENDERMINT_WEBSOCKET_ENDPOINT=wss://rpc.testnet.teritori.com/websocket
TERITORI_COLLECTION_WHITELIST=tori16w7h5tkkjtr36rpcdg8qv4sfs2e44xcrz6a9eczcslywyfpsynfqyj5pt0,tori1hzz0s0ucrhdp6tue2lxk3c03nj6f60qy463we7lgx0wudd72ctmstg4wkc,tori14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s3hewys,0x43cc70bf324d716782628bed38af97e4afe92f69,0x916ad9d549907ccbbaf9ba65526826bfc3a9c0c4,tori162skshe30f43kv2q2rw6we2mu3pvz43lm2zrg4hq50jdd2fjjdjsvm8mc7,tori1zxzv4j9dxarfhxhkxm5cfnv06vy6g4l80adjwaq3dxdzmh5jm8rsrkzz65,tori18etjzrma5604af50jjklk3wlkqcsxdrvmy6jzw5naw2t7kyv4rys3kpwky,tori10z8um7u47e24rv68ghd43tspeztmqy3cc283gvc3pj48zxs5ljdqn84deq,tori1afwrcs58afaka6ltynevwcvq8zhejr3ssn703c0hky5emh890vzsry5wp5
TERITORI_COLLECTION_WHITELIST=tori1rs244rjrhap2v4setxlugkh8ungxlrsh8asvh0trsgvqvplvkd5q7752l6,tori1hzz0s0ucrhdp6tue2lxk3c03nj6f60qy463we7lgx0wudd72ctmstg4wkc,tori14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s3hewys,0x43cc70bf324d716782628bed38af97e4afe92f69,0x916ad9d549907ccbbaf9ba65526826bfc3a9c0c4,tori162skshe30f43kv2q2rw6we2mu3pvz43lm2zrg4hq50jdd2fjjdjsvm8mc7,tori1zxzv4j9dxarfhxhkxm5cfnv06vy6g4l80adjwaq3dxdzmh5jm8rsrkzz65,tori18etjzrma5604af50jjklk3wlkqcsxdrvmy6jzw5naw2t7kyv4rys3kpwky,tori10z8um7u47e24rv68ghd43tspeztmqy3cc283gvc3pj48zxs5ljdqn84deq,tori1afwrcs58afaka6ltynevwcvq8zhejr3ssn703c0hky5emh890vzsry5wp5

PUBLIC_TENOR_KEY=AIzaSyA8TpVfoyoBaDdLww6wJ1Xe0OVN-Hi8qPE

Expand Down
14 changes: 10 additions & 4 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
/.yarn/** linguist-vendored
/.yarn/releases/* binary
/.yarn/plugins/**/* binary
/.pnp.* binary linguist-generated
/.yarn/** linguist-vendored
/.yarn/releases/* binary
/.yarn/plugins/**/* binary
/.pnp.* binary linguist-generated
/cosmwasm-contracts/*/schema/**/* linguist-generated
/packages/contracts-clients/**/* linguist-generated
/packages/api/**/* linguist-generated
/go/pkg/*pb/**/* linguist-generated
/packages/evm-contracts-clients/**/*.ts linguist-generated
/.expo-shared/assets.json linguist-generated
3 changes: 2 additions & 1 deletion .github/workflows/gen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
with:
go-version: "1.19"

- uses: dtolnay/rust-toolchain@stable

- uses: bufbuild/[email protected]
with:
version: 1.28.0
Expand All @@ -33,7 +35,6 @@ jobs:
with:
ssh-private-key: |
${{ secrets.NFTS_DEPLOY_KEY }}
${{ secrets.VAULT_DEPLOY_KEY }}
${{ secrets.FOOTER_DEPLOY_KEY }}
${{ secrets.TNS_DEPLOY_KEY }}
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/mobile-build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ jobs:
- name: Cancel Previous Runs
uses: styfle/[email protected]

- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
android: false
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true

- uses: actions/setup-go@v3
with:
go-version: "1.19"
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:

- uses: dtolnay/rust-toolchain@stable

- name: Build
run: make build.rust

- name: Test
run: make test.rust

Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ web-build/
/cache/
/ios
/android
/weshd/ios/Frameworks/
/weshd/android/libs/
/app-build/

# macOS
Expand Down Expand Up @@ -93,7 +91,9 @@ substreams-*/target


# weshnet
/temp/
/weshd/ios/Frameworks/
/weshd/android/libs/
/weshd/temp/

# eslint
/.eslintcache
Expand Down
91 changes: 45 additions & 46 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -41,7 +41,7 @@ node_modules: package.json yarn.lock
.PHONY: go-mod-tidy
go-mod-tidy:
go mod tidy
cd electron && go mod tidy
cd ./weshd && go mod tidy

.PHONY: generate
generate: generate.protobuf generate.graphql generate.contracts-clients generate.go-networks networks.json
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -326,7 +296,7 @@ build-electron-macos-amd64:
rm -fr ./electron/dist
rm -fr ./electron/build
cd ./electron && npm i
cd ./electron && GOOS=darwin GOARCH=amd64 $(GO) build -tags noNativeLogger -o ./build/mac ./prod.go
cd ./weshd && GOOS=darwin GOARCH=amd64 $(GO) build -tags noNativeLogger -o ../electron/build/mac ./go/electron/prod.go
cd ./electron && node ./builder/mac.js amd64

# requires prepare-electron
Expand All @@ -335,7 +305,7 @@ build-electron-macos-arm64:
rm -fr ./electron/dist
rm -fr ./electron/build
cd ./electron && npm i
cd ./electron && GOOS=darwin GOARCH=arm64 $(GO) build -tags noNativeLogger -o ./build/mac ./prod.go
cd ./weshd && GOOS=darwin GOARCH=arm64 $(GO) build -tags noNativeLogger -o ../electron/build/mac ./go/electron/prod.go
cd ./electron && node ./builder/mac.js arm64

# requires prepare-electron
Expand All @@ -344,7 +314,7 @@ build-electron-windows-amd64:
rm -fr ./electron/dist
rm -fr ./electron/build
cd ./electron && npm i
cd ./electron && GOOS=windows GOARCH=amd64 $(GO) build -tags noNativeLogger -o ./build/win.exe ./prod.go
cd ./weshd && GOOS=windows GOARCH=amd64 $(GO) build -tags noNativeLogger -o ../electron/build/win.exe ./go/electron/prod.go
cd ./electron && node ./builder/win.js

# requires prepare-electron
Expand All @@ -353,7 +323,7 @@ build-electron-linux-amd64:
rm -fr ./electron/dist
rm -fr ./electron/build
cd ./electron && npm i
cd ./electron && GOOS=linux GOARCH=amd64 $(GO) build -tags noNativeLogger -o ./build/linux ./prod.go
cd ./weshd && GOOS=linux GOARCH=amd64 $(GO) build -tags noNativeLogger -o ../electron/build/linux ./go/electron/prod.go
cd ./electron && node ./builder/linux.js

.PHONY: check-ios-weshframework
Expand All @@ -366,11 +336,10 @@ check-ios-weshframework:
.PHONY: build-ios-weshframework
build-ios-weshframework:
$(MAKE) init-weshd-go
CGO_CPPFLAGS="-Wno-error -Wno-nullability-completeness -Wno-expansion-to-defined -DHAVE_GETHOSTUUID=0"
cd ./weshd && gomobile bind \
cd ./weshd && gomobile bind -v \
-o ./ios/Frameworks/WeshFramework.xcframework \
-tags "fts5 sqlite sqlite_unlock_notify" -tags 'nowatchdog' -target ios -iosversion 13.0 \
./go/
-tags 'nowatchdog' -target ios \
./go/app

.PHONY: check-android-weshframework
check-android-weshframework:
Expand All @@ -388,7 +357,7 @@ build-android-weshframework:
-javapkg=com.weshnet \
-o ./android/libs/WeshFramework.aar \
-tags "fts5 sqlite sqlite_unlock_notify" -tags 'nowatchdog' -target android -androidapi 21 \
./go/
./go/app

.PHONY: init-weshd-go
init-weshd-go:
Expand All @@ -405,8 +374,38 @@ bump-app-build-number:

.PHONY: test.rust
test.rust:
cd cosmwasm-contracts/cw721-membership && cargo test
for file in $(INTERNAL_COSMWASM_CONTRACTS); do \
echo "> Testing $${file}" ; \
cd $${file} ; \
cargo test ; \
cd - ; \
done

.PHONY: build.rust
build.rust:
cd cosmwasm-contracts/cw721-membership && cargo wasm
for file in $(INTERNAL_COSMWASM_CONTRACTS); do \
echo "> Building $${file}" ; \
cd $${file} ; \
cargo wasm ; \
cd - ; \
done

.PHONY: generate.internal-contracts-clients
generate.internal-contracts-clients: node_modules
for indir in $(INTERNAL_COSMWASM_CONTRACTS) ; do \
echo "> Generating client for $${indir}" ; \
rm -fr $${indir}/schema ; \
(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 \
|| exit 1 ;\
npx tsx packages/scripts/makeTypescriptIndex $${outdir} || exit 1 ; \
done

10 changes: 9 additions & 1 deletion app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,15 @@ const config = {
projectId: "9ce165de-0199-478c-b3bd-8688e5ce03eb",
},
},
plugins: ["expo-font"],
plugins: [
"expo-font",
[
"expo-document-picker",
{
iCloudContainerEnvironment: "Production",
},
],
],
},
};

Expand Down
3 changes: 3 additions & 0 deletions assets/icons/audio-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/icons/download.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/icons/feed-gray.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/icons/passed.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/icons/reject.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/icons/voting.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
85 changes: 85 additions & 0 deletions assets/illustrations/message-onboarding.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 103b5e5

Please sign in to comment.