Skip to content

Commit

Permalink
Merge branch 'main' into daoregissuefixed
Browse files Browse the repository at this point in the history
  • Loading branch information
n0izn0iz authored Nov 5, 2024
2 parents 7224220 + 14ff1ee commit 5557097
Show file tree
Hide file tree
Showing 81 changed files with 2,640 additions and 285 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,27 @@ jobs:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown

- name: Build
run: make build.rust
- name: Format
run: make fmt.rust

- name: Lint
run: make lint.rust

- name: Test
run: make test.rust

- name: Check diff
run: git diff --exit-code
- name: Build
run: make build.rust

- name: Check that there is no diff
run: |
mrdiff=$(git status --porcelain)
if [[ $mrdiff ]]; then
echo 'ERROR: Diff found!'
echo $mrdiff
git diff
exit 1
fi
1 change: 1 addition & 0 deletions .gnoversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9786fa366f922f04e1251ec6f1df6423b4fd2bf4
127 changes: 117 additions & 10 deletions Cargo.lock

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

22 changes: 17 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ CANDYMACHINE_REPO=teritori-nfts
BUNKER_MINTER_PACKAGE=teritori-bunker-minter
GO?=go
GOFMT?=$(shell $(GO) env GOROOT)/bin/gofmt
CAT := $(if $(filter $(OS),Windows_NT),type,cat)

COSMWASM_CONTRACTS_DIR=rust/cw-contracts
INTERNAL_COSMWASM_CONTRACTS=$(wildcard $(COSMWASM_CONTRACTS_DIR)/*)
Expand Down Expand Up @@ -82,7 +83,7 @@ generate.graphql-thegraph:
go run github.com/Khan/genqlient@85e2e8dffd211c83a2be626474993ef68e44a242 go/pkg/thegraph/genqlient.yaml

.PHONY: lint
lint: lint.buf lint.js
lint: lint.buf lint.js lint.rust

.PHONY: lint.buf
lint.buf:
Expand All @@ -93,6 +94,14 @@ lint.buf:
lint.js: node_modules
yarn lint

.PHONY: lint.rust
lint.rust:
cargo clippy

.PHONY: fmt.rust
fmt.rust:
cargo fmt

.PHONY: go/pkg/holagql/holaplex-schema.graphql
go/pkg/holagql/holaplex-schema.graphql:
rover graph introspect https://graph.65.108.73.219.nip.io/v1 > $@
Expand Down Expand Up @@ -395,6 +404,7 @@ bump-app-build-number:

.PHONY: test.rust
test.rust:
set -e ; \
for file in $(INTERNAL_COSMWASM_CONTRACTS); do \
echo "> Testing $${file}" ; \
cd $${file} ; \
Expand All @@ -404,6 +414,7 @@ test.rust:

.PHONY: build.rust
build.rust:
set -e ; \
for file in $(INTERNAL_COSMWASM_CONTRACTS); do \
echo "> Building $${file}" ; \
cd $${file} ; \
Expand All @@ -413,10 +424,11 @@ build.rust:

.PHONY: generate.internal-contracts-clients
generate.internal-contracts-clients: node_modules
set -e ; \
for indir in $(INTERNAL_COSMWASM_CONTRACTS) ; do \
echo "> Generating client for $${indir}" ; \
rm -fr $${indir}/schema ; \
(cd $${indir} && cargo schema && cd -) || exit 1 ; \
cd $${indir} && cargo schema && cd - ; \
pkgname="$$(basename $${indir})" ; \
outdir="$(CONTRACTS_CLIENTS_DIR)/$${pkgname}" ; \
rm -fr $${outdir} ; \
Expand All @@ -426,8 +438,8 @@ generate.internal-contracts-clients: node_modules
--out $${outdir} \
--name $${pkgname} \
--no-bundle \
|| exit 1 ;\
npx tsx packages/scripts/makeTypescriptIndex $${outdir} || exit 1 ; \
;\
npx tsx packages/scripts/makeTypescriptIndex $${outdir} ; \
done

.PHONY: install-gno
Expand All @@ -446,7 +458,7 @@ start.gnodev-e2e:
clone-gno:
rm -fr gnobuild
mkdir -p gnobuild
cd gnobuild && git clone https://github.com/gnolang/gno.git && cd gno && git checkout 8f800ece85a765113dfa4924da1c06f56865460c
cd gnobuild && git clone https://github.com/gnolang/gno.git && cd gno && git checkout $(shell $(CAT) .gnoversion)
cp -r ./gno/p ./gnobuild/gno/examples/gno.land/p/teritori
cp -r ./gno/r ./gnobuild/gno/examples/gno.land/r/teritori

Expand Down
6 changes: 3 additions & 3 deletions assets/icons/info.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: 0 additions & 3 deletions assets/icons/warning-triangle-orange.svg

This file was deleted.

8 changes: 4 additions & 4 deletions assets/icons/warning-triangle.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.
35 changes: 35 additions & 0 deletions cypress/e2e/gno/organization-creation.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { connectWallet, resetChain } from "./lib";

describe("Create an organization flow", () => {
it("works", () => {
resetChain();

cy.visit("http://localhost:8081/orgs?network=gno-dev", {
timeout: 300000,
});

connectWallet();

const daoName = "Test Dao";
const handle = "testdao";
const url =
"https://images.unsplash.com/photo-1492571350019-22de08371fd3?fm=jpg&q=60&w=3000&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D";
const description = "Test Dao description";

cy.contains("Create Dao").click();

cy.get("input[placeholder='Type organization\\'s name here']").type(
daoName,
);
cy.get("input[placeholder='your_organization']").type(handle);
cy.get("input[placeholder='https://example.com/preview.png']").type(url);
cy.get('[data-testid="organization-description"]').type(description);

cy.contains("Next: Configure voting").click();
cy.contains("Next: Set tokens or members").click();
cy.get('[data-testid="member-settings-next"]').click();
cy.contains("Confirm & Launch the Organization").click();

cy.contains("Get Started", { timeout: 10000 }).should("exist");
});
});
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 5557097

Please sign in to comment.