├── anone-cw721 ├── src │ ├── state.rs │ ├── lib.rs │ ├── error.rs │ ├── msg.rs │ └── metadata.rs ├── .gitignore ├── default_nft │ ├── README.md │ ├── ERC_721_MOCK_DATA.json │ └── ERC_721_FORMAT.json ├── .cargo │ └── config ├── scripts │ ├── build_contract.sh │ ├── query_all.sh │ ├── query_single.sh │ ├── mint.sh │ └── deploy_contract.sh ├── Cargo.toml └── examples │ └── schema.rs ├── lambda ├── src │ ├── public │ │ ├── scripts │ │ │ └── index.js │ │ └── stylesheets │ │ │ └── style.css │ ├── models │ │ ├── Attestation.ts │ │ └── mongo │ │ │ └── AttestationModel.ts │ ├── shared │ │ ├── Logger.ts │ │ ├── constants.ts │ │ └── functions.ts │ ├── routes │ │ ├── index.ts │ │ └── testing.ts │ ├── views │ │ └── index.html │ ├── index.ts │ ├── util.ts │ ├── preStart.ts │ ├── event-sample.json │ └── Server.ts ├── .gitignore ├── tsconfig.prod.json ├── build.ts ├── README.md └── index.js ├── x └── claims │ ├── types │ ├── types.go │ ├── events.go │ ├── errors.go │ ├── keys.go │ ├── tx_test.go │ ├── message_claim_for_test.go │ ├── expected_keepers.go │ ├── message_initial_claim_test.go │ ├── codec.go │ ├── genesis.go │ ├── message_initial_claim.go │ ├── message_claim_for.go │ └── genesis_test.go │ ├── script │ └── gov_proposal_time.sh │ ├── keeper │ ├── msg_server.go │ ├── params.go │ ├── params_test.go │ ├── msg_server_test.go │ ├── grpc_query_params_test.go │ ├── msg_server_initial_claim.go │ └── msg_server_claim_for.go │ ├── simulation │ └── simap.go │ ├── abci.go │ ├── client │ └── cli │ │ ├── tx.go │ │ ├── query_params.go │ │ └── tx_initial_claim.go │ ├── genesis_test.go │ ├── genesis.go │ ├── handler.go │ └── wasm │ └── encoder.go ├── buf.work.yaml ├── .DS_Store ├── vue ├── .browserslistrc ├── jest.config.js ├── src │ ├── store │ │ ├── generated │ │ │ ├── readme.md │ │ │ ├── cosmos │ │ │ │ ├── cosmos-sdk │ │ │ │ │ ├── cosmos.bank.v1beta1 │ │ │ │ │ │ ├── vuex-root │ │ │ │ │ │ ├── module │ │ │ │ │ │ │ ├── types │ │ │ │ │ │ │ │ ├── gogoproto │ │ │ │ │ │ │ │ │ ├── gogo.d.ts │ │ │ │ │ │ │ │ │ ├── gogo.js │ │ │ │ │ │ │ │ │ └── gogo.ts │ │ │ │ │ │ │ │ ├── cosmos_proto │ │ │ │ │ │ │ │ │ ├── cosmos.d.ts │ │ │ │ │ │ │ │ │ ├── cosmos.js │ │ │ │ │ │ │ │ │ └── cosmos.ts │ │ │ │ │ │ │ │ ├── google │ │ │ │ │ │ │ │ │ └── api │ │ │ │ │ │ │ │ │ │ ├── annotations.d.ts │ │ │ │ │ │ │ │ │ │ ├── annotations.ts │ │ │ │ │ │ │ │ │ │ └── annotations.js │ │ │ │ │ │ │ │ └── cosmos │ │ │ │ │ │ │ │ │ └── bank │ │ │ │ │ │ │ │ │ └── v1beta1 │ │ │ │ │ │ │ │ │ └── authz.d.ts │ │ │ │ │ │ │ ├── index.d.ts │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ └── index.d.ts │ │ │ │ │ ├── cosmos.gov.v1beta1 │ │ │ │ │ │ ├── vuex-root │ │ │ │ │ │ ├── module │ │ │ │ │ │ │ ├── types │ │ │ │ │ │ │ │ ├── gogoproto │ │ │ │ │ │ │ │ │ ├── gogo.d.ts │ │ │ │ │ │ │ │ │ ├── gogo.ts │ │ │ │ │ │ │ │ │ └── gogo.js │ │ │ │ │ │ │ │ ├── cosmos_proto │ │ │ │ │ │ │ │ │ ├── cosmos.d.ts │ │ │ │ │ │ │ │ │ ├── cosmos.js │ │ │ │ │ │ │ │ │ └── cosmos.ts │ │ │ │ │ │ │ │ ├── google │ │ │ │ │ │ │ │ │ └── api │ │ │ │ │ │ │ │ │ │ ├── annotations.d.ts │ │ │ │ │ │ │ │ │ │ ├── annotations.js │ │ │ │ │ │ │ │ │ │ └── annotations.ts │ │ │ │ │ │ │ │ └── cosmos │ │ │ │ │ │ │ │ │ └── gov │ │ │ │ │ │ │ │ │ └── v1beta1 │ │ │ │ │ │ │ │ │ └── genesis.d.ts │ │ │ │ │ │ │ └── index.d.ts │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ └── index.d.ts │ │ │ │ │ ├── cosmos.authz.v1beta1 │ │ │ │ │ │ ├── vuex-root │ │ │ │ │ │ ├── module │ │ │ │ │ │ │ ├── types │ │ │ │ │ │ │ │ ├── gogoproto │ │ │ │ │ │ │ │ │ ├── gogo.d.ts │ │ │ │ │ │ │ │ │ ├── gogo.js │ │ │ │ │ │ │ │ │ └── gogo.ts │ │ │ │ │ │ │ │ ├── cosmos_proto │ │ │ │ │ │ │ │ │ ├── cosmos.d.ts │ │ │ │ │ │ │ │ │ ├── cosmos.ts │ │ │ │ │ │ │ │ │ └── cosmos.js │ │ │ │ │ │ │ │ ├── google │ │ │ │ │ │ │ │ │ └── api │ │ │ │ │ │ │ │ │ │ ├── annotations.d.ts │ │ │ │ │ │ │ │ │ │ ├── annotations.js │ │ │ │ │ │ │ │ │ │ └── annotations.ts │ │ │ │ │ │ │ │ ├── tendermint │ │ │ │ │ │ │ │ │ ├── crypto │ │ │ │ │ │ │ │ │ │ └── keys.d.ts │ │ │ │ │ │ │ │ │ └── version │ │ │ │ │ │ │ │ │ │ └── types.d.ts │ │ │ │ │ │ │ │ └── cosmos │ │ │ │ │ │ │ │ │ └── authz │ │ │ │ │ │ │ │ │ └── v1beta1 │ │ │ │ │ │ │ │ │ ├── genesis.d.ts │ │ │ │ │ │ │ │ │ ├── event.d.ts │ │ │ │ │ │ │ │ │ └── authz.d.ts │ │ │ │ │ │ │ ├── index.d.ts │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ ├── index.d.ts │ │ │ │ │ │ └── package.json │ │ │ │ │ ├── cosmos.crisis.v1beta1 │ │ │ │ │ │ ├── vuex-root │ │ │ │ │ │ ├── index.d.ts │ │ │ │ │ │ ├── module │ │ │ │ │ │ │ ├── types │ │ │ │ │ │ │ │ ├── gogoproto │ │ │ │ │ │ │ │ │ ├── gogo.d.ts │ │ │ │ │ │ │ │ │ ├── gogo.js │ │ │ │ │ │ │ │ │ └── gogo.ts │ │ │ │ │ │ │ │ └── cosmos │ │ │ │ │ │ │ │ │ └── crisis │ │ │ │ │ │ │ │ │ └── v1beta1 │ │ │ │ │ │ │ │ │ └── genesis.d.ts │ │ │ │ │ │ │ ├── index.d.ts │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ └── package.json │ │ │ │ │ ├── cosmos.evidence.v1beta1 │ │ │ │ │ │ ├── vuex-root │ │ │ │ │ │ ├── module │ │ │ │ │ │ │ ├── types │ │ │ │ │ │ │ │ ├── gogoproto │ │ │ │ │ │ │ │ │ ├── gogo.d.ts │ │ │ │ │ │ │ │ │ ├── gogo.ts │ │ │ │ │ │ │ │ │ └── gogo.js │ │ │ │ │ │ │ │ ├── cosmos_proto │ │ │ │ │ │ │ │ │ ├── cosmos.d.ts │ │ │ │ │ │ │ │ │ ├── cosmos.js │ │ │ │ │ │ │ │ │ └── cosmos.ts │ │ │ │ │ │ │ │ ├── google │ │ │ │ │ │ │ │ │ └── api │ │ │ │ │ │ │ │ │ │ ├── annotations.d.ts │ │ │ │ │ │ │ │ │ │ ├── annotations.js │ │ │ │ │ │ │ │ │ │ └── annotations.ts │ │ │ │ │ │ │ │ └── cosmos │ │ │ │ │ │ │ │ │ └── evidence │ │ │ │ │ │ │ │ │ └── v1beta1 │ │ │ │ │ │ │ │ │ ├── genesis.d.ts │ │ │ │ │ │ │ │ │ └── evidence.d.ts │ │ │ │ │ │ │ ├── index.d.ts │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── index.d.ts │ │ │ │ │ │ └── package.json │ │ │ │ │ ├── cosmos.feegrant.v1beta1 │ │ │ │ │ │ ├── vuex-root │ │ │ │ │ │ ├── module │ │ │ │ │ │ │ ├── types │ │ │ │ │ │ │ │ ├── gogoproto │ │ │ │ │ │ │ │ │ ├── gogo.d.ts │ │ │ │ │ │ │ │ │ ├── gogo.ts │ │ │ │ │ │ │ │ │ └── gogo.js │ │ │ │ │ │ │ │ ├── cosmos_proto │ │ │ │ │ │ │ │ │ ├── cosmos.d.ts │ │ │ │ │ │ │ │ │ ├── cosmos.js │ │ │ │ │ │ │ │ │ └── cosmos.ts │ │ │ │ │ │ │ │ ├── google │ │ │ │ │ │ │ │ │ └── api │ │ │ │ │ │ │ │ │ │ ├── annotations.d.ts │ │ │ │ │ │ │ │ │ │ ├── annotations.js │ │ │ │ │ │ │ │ │ │ └── annotations.ts │ │ │ │ │ │ │ │ └── cosmos │ │ │ │ │ │ │ │ │ └── feegrant │ │ │ │ │ │ │ │ │ └── v1beta1 │ │ │ │ │ │ │ │ │ └── genesis.d.ts │ │ │ │ │ │ │ ├── index.d.ts │ │ │ │ │ │ │ └── index.js │ │ │ │ │ │ ├── index.d.ts │ │ │ │ │ │ └── package.json │ │ │ │ │ ├── cosmos.slashing.v1beta1 │ │ │ │ │ │ ├── vuex-root │ │ │ │ │ │ ├── module │ │ │ │ │ │ │ ├── types │ │ │ │ │ │ │ │ ├── gogoproto │ │ │ │ │ │ │ │ │ ├── gogo.d.ts │ │ │ │ │ │ │ │ │ ├── gogo.ts │ │ │ │ │ │ │ │ │ └── gogo.js │ │ │ │ │ │ │ │ └── google │ │ │ │ │ │ │ │ │ └── api │ │ │ │ │ │ │ │ │ ├── annotations.d.ts │ │ │ │ │ │ │ │ │ ├── annotations.js │ │ │ │ │ │ │ │ │ └── annotations.ts │ │ │ │ │ │ │ ├── index.d.ts │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── index.d.ts │ │ │ │ │ │ └── package.json │ │ │ │ │ ├── cosmos.staking.v1beta1 │ │ │ │ │ │ ├── vuex-root │ │ │ │ │ │ ├── module │ │ │ │ │ │ │ ├── types │ │ │ │ │ │ │ │ ├── gogoproto │ │ │ │ │ │ │ │ │ ├── gogo.d.ts │ │ │ │ │ │ │ │ │ ├── gogo.js │ │ │ │ │ │ │ │ │ └── gogo.ts │ │ │ │ │ │ │ │ ├── cosmos_proto │ │ │ │ │ │ │ │ │ ├── cosmos.d.ts │ │ │ │ │ │ │ │ │ ├── cosmos.js │ │ │ │ │ │ │ │ │ └── cosmos.ts │ │ │ │ │ │ │ │ ├── google │ │ │ │ │ │ │ │ │ └── api │ │ │ │ │ │ │ │ │ │ ├── annotations.d.ts │ │ │ │ │ │ │ │ │ │ ├── annotations.js │ │ │ │ │ │ │ │ │ │ └── annotations.ts │ │ │ │ │ │ │ │ └── tendermint │ │ │ │ │ │ │ │ │ ├── crypto │ │ │ │ │ │ │ │ │ └── keys.d.ts │ │ │ │ │ │ │ │ │ └── version │ │ │ │ │ │ │ │ │ └── types.d.ts │ │ │ │ │ │ │ └── index.d.ts │ │ │ │ │ │ └── package.json │ │ │ │ │ ├── cosmos.vesting.v1beta1 │ │ │ │ │ │ ├── vuex-root │ │ │ │ │ │ ├── module │ │ │ │ │ │ │ ├── types │ │ │ │ │ │ │ │ ├── gogoproto │ │ │ │ │ │ │ │ │ ├── gogo.d.ts │ │ │ │ │ │ │ │ │ ├── gogo.js │ │ │ │ │ │ │ │ │ └── gogo.ts │ │ │ │ │ │ │ │ └── cosmos_proto │ │ │ │ │ │ │ │ │ ├── cosmos.d.ts │ │ │ │ │ │ │ │ │ ├── cosmos.js │ │ │ │ │ │ │ │ │ └── cosmos.ts │ │ │ │ │ │ │ ├── index.d.ts │ │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ └── index.d.ts │ │ │ │ │ └── cosmos.distribution.v1beta1 │ │ │ │ │ │ ├── vuex-root │ │ │ │ │ │ ├── module │ │ │ │ │ │ ├── types │ │ │ │ │ │ │ ├── gogoproto │ │ │ │ │ │ │ │ ├── gogo.d.ts │ │ │ │ │ │ │ │ ├── gogo.js │ │ │ │ │ │ │ │ └── gogo.ts │ │ │ │ │ │ │ └── google │ │ │ │ │ │ │ │ └── api │ │ │ │ │ │ │ │ ├── annotations.d.ts │ │ │ │ │ │ │ │ ├── annotations.js │ │ │ │ │ │ │ │ └── annotations.ts │ │ │ │ │ │ └── index.d.ts │ │ │ │ │ │ └── package.json │ │ │ │ └── ibc-go │ │ │ │ │ └── ibc.applications.transfer.v1 │ │ │ │ │ ├── vuex-root │ │ │ │ │ ├── module │ │ │ │ │ ├── types │ │ │ │ │ │ ├── gogoproto │ │ │ │ │ │ │ ├── gogo.d.ts │ │ │ │ │ │ │ ├── gogo.js │ │ │ │ │ │ │ └── gogo.ts │ │ │ │ │ │ ├── google │ │ │ │ │ │ │ └── api │ │ │ │ │ │ │ │ ├── annotations.d.ts │ │ │ │ │ │ │ │ ├── annotations.ts │ │ │ │ │ │ │ │ └── annotations.js │ │ │ │ │ │ └── ibc │ │ │ │ │ │ │ └── applications │ │ │ │ │ │ │ └── transfer │ │ │ │ │ │ │ └── v1 │ │ │ │ │ │ │ └── genesis.d.ts │ │ │ │ │ ├── index.d.ts │ │ │ │ │ ├── index.js │ │ │ │ │ └── index.ts │ │ │ │ │ ├── index.d.ts │ │ │ │ │ └── package.json │ │ │ ├── package.json │ │ │ └── index.d.ts │ │ ├── index.js │ │ └── config.js │ ├── views │ │ ├── Relayers.vue │ │ ├── Types.vue │ │ └── Index.vue │ ├── main.js │ ├── router │ │ └── index.js │ ├── App.vue │ ├── scss │ │ └── app.scss │ └── components │ │ ├── Sidebar.vue │ │ ├── AnOneWelcome │ │ └── AnOneWelcome.vue │ │ └── AnButton │ │ └── AnButton.vue ├── lint-staged.config.js ├── public │ ├── favicon.ico │ ├── another1_logo.png │ └── index.html ├── babel.config.js ├── .env ├── .gitignore ├── jsconfig.json ├── vue.config.js ├── README.md ├── .eslintrc.js └── package.json ├── guides ├── 1.png ├── 2.png ├── 3.png ├── 4.png └── How-to-mint-an-NFT.pdf ├── .gitignore ├── docs ├── docs.go ├── plan-timeline-outline.drawio.png ├── chain-interaction UI │ ├── UI-Diagrams.asta │ ├── UI-Diagrams │ │ ├── Overview.png │ │ ├── Account Management.png │ │ ├── Profile Management.png │ │ ├── Marketplace Engagement.png │ │ ├── Design-Projects Management.png │ │ └── NFT Collection Management.png │ ├── definition.md │ ├── profile_page.drawio │ ├── edit_profile.drawio │ └── profile_management.drawio ├── plan-timeline-outline.drawio └── one-pager-plan-outline.md ├── networks └── testnet-1 │ └── seeds.txt ├── .vscode └── settings.json ├── proto ├── buf.yaml ├── buf.lock └── claims │ ├── genesis.proto │ ├── claim_record.proto │ ├── tx.proto │ └── params.proto ├── Dockerfile ├── testutil ├── sample │ └── sample.go └── simapp │ └── simapp.go ├── scripts ├── README.md ├── protocgen.sh ├── protoc-swagger-gen.sh └── protoc-gen-installer.sh ├── config.yml ├── buf.gen.yaml ├── .github ├── ISSUE_TEMPLATE │ └── anone-task.md └── workflows │ └── deploy.yml ├── cmd └── anoned │ ├── main.go │ └── genwasm.go ├── internal └── wasm │ ├── registry.go │ ├── distribution.go │ └── encoder.go ├── validator creation.md ├── app ├── genesis.go └── wasm_config.go ├── keplr_suggestion.txt └── gentx-instruction.md /anone-cw721/src/state.rs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lambda/src/public/scripts/index.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /x/claims/types/types.go: -------------------------------------------------------------------------------- 1 | package types 2 | -------------------------------------------------------------------------------- /anone-cw721/.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | schema 3 | artifacts -------------------------------------------------------------------------------- /buf.work.yaml: -------------------------------------------------------------------------------- 1 | version: v1 2 | directories: 3 | - proto -------------------------------------------------------------------------------- /x/claims/script/gov_proposal_time.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/notional-labs/anone/HEAD/.DS_Store -------------------------------------------------------------------------------- /anone-cw721/default_nft/README.md: -------------------------------------------------------------------------------- 1 | this folder contains default NFT for testing -------------------------------------------------------------------------------- /vue/.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not dead 4 | not ie 11 5 | -------------------------------------------------------------------------------- /guides/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/notional-labs/anone/HEAD/guides/1.png -------------------------------------------------------------------------------- /guides/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/notional-labs/anone/HEAD/guides/2.png -------------------------------------------------------------------------------- /guides/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/notional-labs/anone/HEAD/guides/3.png -------------------------------------------------------------------------------- /guides/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/notional-labs/anone/HEAD/guides/4.png -------------------------------------------------------------------------------- /vue/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: '@vue/cli-plugin-unit-jest', 3 | } 4 | -------------------------------------------------------------------------------- /vue/src/store/generated/readme.md: -------------------------------------------------------------------------------- 1 | THIS FOLDER IS GENERATED AUTOMATICALLY. DO NOT MODIFY. 2 | -------------------------------------------------------------------------------- /lambda/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .DS_Store 3 | dist/ 4 | node_modules/ 5 | .env 6 | lambda.zip 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | vue/node_modules 2 | vue/dist 3 | release/ 4 | .env 5 | debug.txt 6 | .DS_Store 7 | .idea -------------------------------------------------------------------------------- /docs/docs.go: -------------------------------------------------------------------------------- 1 | package docs 2 | 3 | import "embed" 4 | 5 | //go:embed static 6 | var Docs embed.FS 7 | -------------------------------------------------------------------------------- /vue/lint-staged.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | '*.{js,jsx,vue}': 'vue-cli-service lint', 3 | } 4 | -------------------------------------------------------------------------------- /vue/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/notional-labs/anone/HEAD/vue/public/favicon.ico -------------------------------------------------------------------------------- /guides/How-to-mint-an-NFT.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/notional-labs/anone/HEAD/guides/How-to-mint-an-NFT.pdf -------------------------------------------------------------------------------- /vue/public/another1_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/notional-labs/anone/HEAD/vue/public/another1_logo.png -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/vuex-root: -------------------------------------------------------------------------------- 1 | THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/vuex-root: -------------------------------------------------------------------------------- 1 | THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. 2 | -------------------------------------------------------------------------------- /docs/plan-timeline-outline.drawio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/notional-labs/anone/HEAD/docs/plan-timeline-outline.drawio.png -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/vuex-root: -------------------------------------------------------------------------------- 1 | THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/vuex-root: -------------------------------------------------------------------------------- 1 | THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/vuex-root: -------------------------------------------------------------------------------- 1 | THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/vuex-root: -------------------------------------------------------------------------------- 1 | THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/vuex-root: -------------------------------------------------------------------------------- 1 | THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/vuex-root: -------------------------------------------------------------------------------- 1 | THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/vuex-root: -------------------------------------------------------------------------------- 1 | THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/vuex-root: -------------------------------------------------------------------------------- 1 | THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/vuex-root: -------------------------------------------------------------------------------- 1 | THIS FILE IS GENERATED AUTOMATICALLY. DO NOT DELETE. 2 | -------------------------------------------------------------------------------- /docs/chain-interaction UI/UI-Diagrams.asta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/notional-labs/anone/HEAD/docs/chain-interaction UI/UI-Diagrams.asta -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/index.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | declare const _default; 3 | export default _default; 4 | -------------------------------------------------------------------------------- /x/claims/types/events.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | const ( 4 | EventTypeClaim = "claim" 5 | AttributeValueCategory = ModuleName 6 | ) 7 | -------------------------------------------------------------------------------- /vue/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['@vue/cli-plugin-babel/preset'], 3 | plugins: ['@babel/plugin-transform-runtime'], 4 | } 5 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/gogoproto/gogo.d.ts: -------------------------------------------------------------------------------- 1 | export declare const protobufPackage = "gogoproto"; 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/gogoproto/gogo.d.ts: -------------------------------------------------------------------------------- 1 | export declare const protobufPackage = "gogoproto"; 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/gogoproto/gogo.d.ts: -------------------------------------------------------------------------------- 1 | export declare const protobufPackage = "gogoproto"; 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/gogoproto/gogo.d.ts: -------------------------------------------------------------------------------- 1 | export declare const protobufPackage = "gogoproto"; 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/gogoproto/gogo.d.ts: -------------------------------------------------------------------------------- 1 | export declare const protobufPackage = "gogoproto"; 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/gogoproto/gogo.d.ts: -------------------------------------------------------------------------------- 1 | export declare const protobufPackage = "gogoproto"; 2 | -------------------------------------------------------------------------------- /anone-cw721/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod contract; 2 | mod error; 3 | pub mod msg; 4 | pub mod state; 5 | pub mod metadata; 6 | 7 | pub use crate::error::ContractError; -------------------------------------------------------------------------------- /docs/chain-interaction UI/UI-Diagrams/Overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/notional-labs/anone/HEAD/docs/chain-interaction UI/UI-Diagrams/Overview.png -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos_proto/cosmos.d.ts: -------------------------------------------------------------------------------- 1 | export declare const protobufPackage = "cosmos_proto"; 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/gogoproto/gogo.d.ts: -------------------------------------------------------------------------------- 1 | export declare const protobufPackage = "gogoproto"; 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/gogoproto/gogo.d.ts: -------------------------------------------------------------------------------- 1 | export declare const protobufPackage = "gogoproto"; 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/gogoproto/gogo.d.ts: -------------------------------------------------------------------------------- 1 | export declare const protobufPackage = "gogoproto"; 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos_proto/cosmos.d.ts: -------------------------------------------------------------------------------- 1 | export declare const protobufPackage = "cosmos_proto"; 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/annotations.d.ts: -------------------------------------------------------------------------------- 1 | export declare const protobufPackage = "google.api"; 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/gogoproto/gogo.d.ts: -------------------------------------------------------------------------------- 1 | export declare const protobufPackage = "gogoproto"; 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/gogoproto/gogo.d.ts: -------------------------------------------------------------------------------- 1 | export declare const protobufPackage = "gogoproto"; 2 | -------------------------------------------------------------------------------- /anone-cw721/.cargo/config: -------------------------------------------------------------------------------- 1 | [alias] 2 | wasm = "build --release --target wasm32-unknown-unknown" 3 | unit-test = "test --lib" 4 | schema = "run --example schema" 5 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos_proto/cosmos.d.ts: -------------------------------------------------------------------------------- 1 | export declare const protobufPackage = "cosmos_proto"; 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/api/annotations.d.ts: -------------------------------------------------------------------------------- 1 | export declare const protobufPackage = "google.api"; 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/annotations.d.ts: -------------------------------------------------------------------------------- 1 | export declare const protobufPackage = "google.api"; 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos_proto/cosmos.d.ts: -------------------------------------------------------------------------------- 1 | export declare const protobufPackage = "cosmos_proto"; 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/annotations.d.ts: -------------------------------------------------------------------------------- 1 | export declare const protobufPackage = "google.api"; 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos_proto/cosmos.d.ts: -------------------------------------------------------------------------------- 1 | export declare const protobufPackage = "cosmos_proto"; 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/api/annotations.d.ts: -------------------------------------------------------------------------------- 1 | export declare const protobufPackage = "google.api"; 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/gogoproto/gogo.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'gogoproto' 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/annotations.d.ts: -------------------------------------------------------------------------------- 1 | export declare const protobufPackage = "google.api"; 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos_proto/cosmos.d.ts: -------------------------------------------------------------------------------- 1 | export declare const protobufPackage = "cosmos_proto"; 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/annotations.d.ts: -------------------------------------------------------------------------------- 1 | export declare const protobufPackage = "google.api"; 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos_proto/cosmos.d.ts: -------------------------------------------------------------------------------- 1 | export declare const protobufPackage = "cosmos_proto"; 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/gogoproto/gogo.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'gogoproto'; 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/gogoproto/gogo.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'gogoproto' 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/gogoproto/gogo.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'gogoproto'; 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/gogoproto/gogo.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'gogoproto' 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/gogoproto/gogo.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'gogoproto'; 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/gogoproto/gogo.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'gogoproto' 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/annotations.d.ts: -------------------------------------------------------------------------------- 1 | export declare const protobufPackage = "google.api"; 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/gogoproto/gogo.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'gogoproto' 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/gogoproto/gogo.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'gogoproto' 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/gogoproto/gogo.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'gogoproto'; 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/gogoproto/gogo.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'gogoproto' 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/gogoproto/gogo.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'gogoproto'; 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/gogoproto/gogo.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'gogoproto' 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/gogoproto/gogo.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'gogoproto'; 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/gogoproto/gogo.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'gogoproto' 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/api/annotations.d.ts: -------------------------------------------------------------------------------- 1 | export declare const protobufPackage = "google.api"; 2 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos_proto/cosmos.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'cosmos_proto' 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos_proto/cosmos.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'cosmos_proto'; 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos_proto/cosmos.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'cosmos_proto' 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/annotations.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'google.api' 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/gogoproto/gogo.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'gogoproto'; 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/gogoproto/gogo.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'gogoproto' 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/gogoproto/gogo.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'gogoproto'; 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/gogoproto/gogo.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'gogoproto'; 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos_proto/cosmos.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'cosmos_proto'; 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos_proto/cosmos.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'cosmos_proto' 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/annotations.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'google.api'; 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/google/api/annotations.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'google.api' 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/gogoproto/gogo.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'gogoproto'; 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/gogoproto/gogo.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'gogoproto'; 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/gogoproto/gogo.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'gogoproto' 3 | -------------------------------------------------------------------------------- /docs/chain-interaction UI/UI-Diagrams/Account Management.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/notional-labs/anone/HEAD/docs/chain-interaction UI/UI-Diagrams/Account Management.png -------------------------------------------------------------------------------- /docs/chain-interaction UI/UI-Diagrams/Profile Management.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/notional-labs/anone/HEAD/docs/chain-interaction UI/UI-Diagrams/Profile Management.png -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos_proto/cosmos.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'cosmos_proto'; 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/api/annotations.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'google.api'; 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/google/api/annotations.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'google.api' 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/google/api/annotations.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'google.api'; 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos_proto/cosmos.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'cosmos_proto'; 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos_proto/cosmos.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'cosmos_proto' 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/annotations.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'google.api'; 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/google/api/annotations.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'google.api' 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos_proto/cosmos.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'cosmos_proto'; 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos_proto/cosmos.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'cosmos_proto' 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/api/annotations.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'google.api'; 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/google/api/annotations.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'google.api' 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/annotations.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'google.api'; 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/types/google/api/annotations.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'google.api' 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos_proto/cosmos.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'cosmos_proto'; 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/cosmos_proto/cosmos.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'cosmos_proto' 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/annotations.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'google.api'; 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/google/api/annotations.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'google.api' 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos_proto/cosmos.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'cosmos_proto'; 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/types/cosmos_proto/cosmos.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'cosmos_proto' 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/api/annotations.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'google.api' 3 | -------------------------------------------------------------------------------- /docs/chain-interaction UI/UI-Diagrams/Marketplace Engagement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/notional-labs/anone/HEAD/docs/chain-interaction UI/UI-Diagrams/Marketplace Engagement.png -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/annotations.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'google.api'; 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/types/google/api/annotations.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'google.api' 3 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/google/api/annotations.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export const protobufPackage = 'google.api'; 3 | -------------------------------------------------------------------------------- /docs/chain-interaction UI/UI-Diagrams/Design-Projects Management.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/notional-labs/anone/HEAD/docs/chain-interaction UI/UI-Diagrams/Design-Projects Management.png -------------------------------------------------------------------------------- /docs/chain-interaction UI/UI-Diagrams/NFT Collection Management.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/notional-labs/anone/HEAD/docs/chain-interaction UI/UI-Diagrams/NFT Collection Management.png -------------------------------------------------------------------------------- /lambda/src/models/Attestation.ts: -------------------------------------------------------------------------------- 1 | 2 | export interface IAttestation { 3 | ethAddress:string, 4 | oneAddress:string, 5 | NFTs: string[], 6 | signature: string 7 | added?: Date | string 8 | } 9 | -------------------------------------------------------------------------------- /networks/testnet-1/seeds.txt: -------------------------------------------------------------------------------- 1 | 49a49db05e945fc38b7a1bc00352cafdaef2176c@95.217.121.243:2280,80f0ef5d7c432d2bae99dc8437a9c3db464890cd@65.108.128.139:2280,3afac655e3be5c5fc4a64ec5197346ffb5a855c1@49.12.213.105:2280 2 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "protoc": { 3 | 4 | "path": "/usr/local/bin/protoc", 5 | "options": [ 6 | "--proto_path=$HOME/go/pkg/mod/go.buf.build/protocolbuffers", 7 | ] 8 | } 9 | } -------------------------------------------------------------------------------- /lambda/tsconfig.prod.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "sourceMap": false 5 | }, 6 | "exclude": [ 7 | "spec", 8 | "src/**/*.mock.ts", 9 | "src/public/" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /proto/buf.yaml: -------------------------------------------------------------------------------- 1 | version: v1 2 | name: buf.build/notional-labs/anone 3 | deps: 4 | - buf.build/googleapis/googleapis 5 | - buf.build/cosmos/cosmos-sdk 6 | breaking: 7 | use: 8 | - FILE 9 | lint: 10 | use: 11 | - DEFAULT 12 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/index.d.ts: -------------------------------------------------------------------------------- 1 | import { Equivocation } from "./module/types/cosmos/evidence/v1beta1/evidence"; 2 | export { Equivocation }; 3 | declare const _default; 4 | export default _default; 5 | -------------------------------------------------------------------------------- /anone-cw721/default_nft/ERC_721_MOCK_DATA.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Megumin", 3 | "description": "A very cute girl who loves \"Explosion\"", 4 | "image": "https://drive.google.com/file/d/1sMElSrt5mXMLwHF_crPs6YfNUg0PMMq2/view?usp=sharing" 5 | } -------------------------------------------------------------------------------- /vue/src/views/Relayers.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /vue/src/store/index.js: -------------------------------------------------------------------------------- 1 | import { createStore } from 'vuex' 2 | import init from './config' 3 | 4 | const store = createStore({ 5 | state() { 6 | return {} 7 | }, 8 | mutations: {}, 9 | actions: {}, 10 | }) 11 | init(store) 12 | export default store 13 | -------------------------------------------------------------------------------- /lambda/src/shared/Logger.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Setup the jet-logger. 3 | * 4 | * Documentation: https://github.com/seanpmaxwell/jet-logger 5 | */ 6 | 7 | import Logger from 'jet-logger'; 8 | 9 | 10 | const logger = new Logger(); 11 | 12 | export default logger; 13 | -------------------------------------------------------------------------------- /vue/src/views/Types.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /lambda/src/shared/constants.ts: -------------------------------------------------------------------------------- 1 | import { Request } from 'express'; 2 | 3 | export const paramMissingError = 'One or more of the required parameters was missing.'; 4 | 5 | export interface IRequest extends Request { 6 | body: { 7 | user: any, 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /vue/.env: -------------------------------------------------------------------------------- 1 | VUE_APP_WS_TENDERMINT=NULL 2 | VUE_APP_API_COSMOS=https://api-anone.notional.ventures 3 | VUE_APP_API_TENDERMINT=https://rpc-anone.notional.ventures 4 | VUE_APP_ADDRESS_PREFIX=one 5 | VUE_APP_CHAIN_ID=anoned-1 6 | VUE_APP_CHAIN_NAME=AnotherOne 7 | VUE_APP_COIN_DECIMAL=6 8 | VUE_APP_COIN_TYPE=118 9 | -------------------------------------------------------------------------------- /lambda/src/shared/functions.ts: -------------------------------------------------------------------------------- 1 | import logger from './Logger'; 2 | 3 | export const pErr = (err: Error) => { 4 | if (err) { 5 | logger.err(err); 6 | } 7 | }; 8 | 9 | export const getRandomInt = () => { 10 | return Math.floor(Math.random() * 1_000_000_000_000); 11 | }; 12 | -------------------------------------------------------------------------------- /anone-cw721/src/error.rs: -------------------------------------------------------------------------------- 1 | use cosmwasm_std::StdError; 2 | use thiserror::Error; 3 | 4 | /// Never is a placeholder to ensure we don't return any errors 5 | #[derive(Error, Debug, PartialEq)] 6 | pub enum Never {} 7 | 8 | #[derive(Error, Debug, PartialEq)] 9 | pub enum ContractError { 10 | #[error("{0}")] 11 | Std(#[from] StdError), 12 | } -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1 2 | 3 | ## Build 4 | FROM golang:1.17-bullseye as build 5 | 6 | WORKDIR /anone 7 | COPY . /anone 8 | RUN make install 9 | 10 | ## Deploy 11 | FROM gcr.io/distroless/base-debian11 12 | 13 | WORKDIR / 14 | 15 | EXPOSE 26656 16 | EXPOSE 26657 17 | EXPOSE 1317 18 | EXPOSE 9090 19 | 20 | ENTRYPOINT ["/anone"] -------------------------------------------------------------------------------- /vue/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /anone-cw721/scripts/build_contract.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # build cargo 4 | cargo build 5 | 6 | # compile contract 7 | sudo docker run --rm -v "$(pwd)":/code \ 8 | --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \ 9 | --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ 10 | cosmwasm/rust-optimizer:0.12.5 -------------------------------------------------------------------------------- /testutil/sample/sample.go: -------------------------------------------------------------------------------- 1 | package sample 2 | 3 | import ( 4 | "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" 5 | sdk "github.com/cosmos/cosmos-sdk/types" 6 | ) 7 | 8 | // AccAddress returns a sample account address 9 | func AccAddress() string { 10 | pk := ed25519.GenPrivKey().PubKey() 11 | addr := pk.Address() 12 | return sdk.AccAddress(addr).String() 13 | } 14 | -------------------------------------------------------------------------------- /vue/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "esnext", 5 | "baseUrl": "./", 6 | "moduleResolution": "node", 7 | "paths": { 8 | "@/*": [ 9 | "src/*" 10 | ] 11 | }, 12 | "lib": [ 13 | "esnext", 14 | "dom", 15 | "dom.iterable", 16 | "scripthost" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /scripts/README.md: -------------------------------------------------------------------------------- 1 | # Scripts 2 | 3 | These scripts are copied from the [Cosmos-SDK](https://github.com/cosmos/cosmos-sdk/tree/v0.42.1/scripts) respository 4 | with minor modifications. All credits and big thanks go to the original authors. 5 | 6 | Please note that a custom [fork](github.com/regen-network/protobuf) by the Regen network team is used. 7 | See [`go.mod`](../go.mod) for version. -------------------------------------------------------------------------------- /vue/src/store/config.js: -------------------------------------------------------------------------------- 1 | import { env, blocks, wallet, transfers, relayers } from '@starport/vuex' 2 | import generated from './generated' 3 | export default function init(store) { 4 | for (const moduleInit of Object.values(generated)) { 5 | moduleInit(store) 6 | } 7 | transfers(store) 8 | blocks(store) 9 | env(store) 10 | wallet(store) 11 | relayers(store) 12 | } 13 | -------------------------------------------------------------------------------- /lambda/src/routes/index.ts: -------------------------------------------------------------------------------- 1 | import { Router } from 'express'; 2 | 3 | import testRouter from './testing'; 4 | // Init router and path 5 | const router = Router(); 6 | 7 | router.use('/testing', testRouter) 8 | router.use('/', (req, res) => { 9 | console.log(req); 10 | res.send("Unknown api: "+req.baseUrl) 11 | }) 12 | 13 | // Export the base-router 14 | export default router; 15 | -------------------------------------------------------------------------------- /scripts/protocgen.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -eo pipefail 4 | 5 | go get go.buf.build/protocolbuffers/go/cosmos/cosmos-sdk 6 | go get go.buf.build/protocolbuffers/go/googleapis/googleapis 7 | 8 | cd proto 9 | buf mod update 10 | cd .. 11 | 12 | buf generate 13 | 14 | # move proto files to the right places 15 | cp -r github.com/notional-labs/anone/* ./ 16 | rm -rf github.com 17 | -------------------------------------------------------------------------------- /config.yml: -------------------------------------------------------------------------------- 1 | accounts: 2 | - name: alice 3 | coins: ["20000token", "200000000stake"] 4 | - name: bob 5 | coins: ["10000token", "100000000stake"] 6 | validator: 7 | name: alice 8 | staked: "100000000stake" 9 | client: 10 | openapi: 11 | path: "docs/static/openapi.yml" 12 | vuex: 13 | path: "vue/src/store" 14 | faucet: 15 | name: bob 16 | coins: ["5token", "100000stake"] 17 | -------------------------------------------------------------------------------- /lambda/src/views/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ExpressGeneratorTypeScriptApp 6 | 7 | 8 | 9 | Testing loaded. 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /vue/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import store from './store' 4 | import router from './router' 5 | import vueLib from '@starport/vue' 6 | // import AnOneWelcome from './components/AnOneWelcome/AnOneWelcome' 7 | 8 | const app = createApp(App) 9 | app.config.globalProperties._depsLoaded = true 10 | app.use(store).use(router).use(vueLib).mount('#app') 11 | -------------------------------------------------------------------------------- /buf.gen.yaml: -------------------------------------------------------------------------------- 1 | version: v1 2 | plugins: 3 | - name: gocosmos 4 | out: . 5 | opt: plugins=interfacetype+grpc,Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types 6 | - name: grpc-gateway 7 | out: . 8 | opt: logtostderr=true,allow_colon_final_segments=true 9 | - name: doc 10 | out: ./docs/proto 11 | opt: 12 | - ./docs/proto/protodoc-markdown.tmpl 13 | - proto-docs.md -------------------------------------------------------------------------------- /x/claims/keeper/msg_server.go: -------------------------------------------------------------------------------- 1 | package keeper 2 | 3 | import ( 4 | "github.com/notional-labs/anone/x/claims/types" 5 | ) 6 | 7 | type msgServer struct { 8 | Keeper 9 | } 10 | 11 | // NewMsgServerImpl returns an implementation of the MsgServer interface 12 | // for the provided Keeper. 13 | func NewMsgServerImpl(keeper Keeper) types.MsgServer { 14 | return &msgServer{Keeper: keeper} 15 | } 16 | 17 | var _ types.MsgServer = msgServer{} 18 | -------------------------------------------------------------------------------- /lambda/build.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Remove old files, copy front-end ones. 3 | */ 4 | 5 | import fs from 'fs-extra'; 6 | import Logger from 'jet-logger'; 7 | 8 | 9 | try { 10 | // Remove current build 11 | fs.removeSync('./dist/'); 12 | // Copy front-end files 13 | fs.copySync('./src/public', './dist/public'); 14 | fs.copySync('./src/views', './dist/views'); 15 | } catch (err) { 16 | Logger.Err(err); 17 | } 18 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/index.d.ts: -------------------------------------------------------------------------------- 1 | import { FungibleTokenPacketData } from "./module/types/ibc/applications/transfer/v1/transfer"; 2 | import { DenomTrace } from "./module/types/ibc/applications/transfer/v1/transfer"; 3 | import { Params } from "./module/types/ibc/applications/transfer/v1/transfer"; 4 | export { FungibleTokenPacketData, DenomTrace, Params }; 5 | declare const _default; 6 | export default _default; 7 | -------------------------------------------------------------------------------- /anone-cw721/scripts/query_all.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #NODE="tcp://localhost:2281" 4 | NODE="http://65.108.128.139:2281" 5 | #ACCOUNT="test" 6 | ACCOUNT="Developer" 7 | CHAINID="anone-testnet-1" 8 | SLEEP_TIME="15s" 9 | CONTRACT="one1nc5tatafv6eyq7llkr2gv50ff9e22mnf70qgjlv737ktmt4eswrq9jdqcm" 10 | 11 | ALL_NFTS_QUERY="{\"all_tokens\": {}}" 12 | OWNER_OF=$(anoned query wasm contract-state smart "$CONTRACT" "$ALL_NFTS_QUERY" --node "$NODE" --output json) 13 | 14 | echo $OWNER_OF -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/anone-task.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Anone Task 3 | about: Create a task for the whole team 4 | title: '' 5 | labels: task 6 | assignees: 'nghuyenthevinh2000' 7 | 8 | --- 9 | 10 | # I. Task description 11 | Describe your task 12 | 13 | # II. Task timeline 14 | Specify timeline if exists 15 | 16 | # III. Task deliverables 17 | What deliverables do this task need to deliver? 18 | 19 | # IV. Task goals 20 | goals that this task needs to achieve 21 | 22 | - [ ] goal here 23 | -------------------------------------------------------------------------------- /vue/src/store/generated/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "notional-labs-anone-js", 3 | "version": "0.1.0", 4 | "description": "Autogenerated cosmos modules vuex store", 5 | "author": "Starport Codegen ", 6 | "license": "Apache-2.0", 7 | "licenses": [ 8 | { 9 | "type": "Apache-2.0", 10 | "url": "http://www.apache.org/licenses/LICENSE-2.0" 11 | } 12 | ], 13 | "main": "index.js", 14 | "publishConfig": { 15 | "access": "public" 16 | } 17 | } -------------------------------------------------------------------------------- /x/claims/simulation/simap.go: -------------------------------------------------------------------------------- 1 | package simulation 2 | 3 | import ( 4 | sdk "github.com/cosmos/cosmos-sdk/types" 5 | simtypes "github.com/cosmos/cosmos-sdk/types/simulation" 6 | ) 7 | 8 | // FindAccount find a specific address from an account list 9 | func FindAccount(accs []simtypes.Account, address string) (simtypes.Account, bool) { 10 | creator, err := sdk.AccAddressFromBech32(address) 11 | if err != nil { 12 | panic(err) 13 | } 14 | return simtypes.FindAccount(accs, creator) 15 | } 16 | -------------------------------------------------------------------------------- /x/claims/keeper/params.go: -------------------------------------------------------------------------------- 1 | package keeper 2 | 3 | import ( 4 | sdk "github.com/cosmos/cosmos-sdk/types" 5 | "github.com/notional-labs/anone/x/claims/types" 6 | ) 7 | 8 | // GetParams get all parameters as types.Params 9 | func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { 10 | k.paramstore.GetParamSet(ctx, ¶ms) 11 | return params 12 | } 13 | 14 | // SetParams set the params 15 | func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { 16 | k.paramstore.SetParamSet(ctx, ¶ms) 17 | } 18 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/index.d.ts: -------------------------------------------------------------------------------- 1 | import { BasicAllowance } from "./module/types/cosmos/feegrant/v1beta1/feegrant"; 2 | import { PeriodicAllowance } from "./module/types/cosmos/feegrant/v1beta1/feegrant"; 3 | import { AllowedMsgAllowance } from "./module/types/cosmos/feegrant/v1beta1/feegrant"; 4 | import { Grant } from "./module/types/cosmos/feegrant/v1beta1/feegrant"; 5 | export { BasicAllowance, PeriodicAllowance, AllowedMsgAllowance, Grant }; 6 | declare const _default; 7 | export default _default; 8 | -------------------------------------------------------------------------------- /lambda/src/index.ts: -------------------------------------------------------------------------------- 1 | import './preStart'; // Must be the first import 2 | import app from './Server'; 3 | import mongoose, {Connection} from 'mongoose'; 4 | 5 | mongoose.set('useNewUrlParser', true); 6 | mongoose.set('useUnifiedTopology', true); 7 | mongoose.set('useFindAndModify', false); 8 | 9 | /** 10 | * THIS IS USED FOR TESTING LOCALLY 11 | */ 12 | // Start the server 13 | const port = Number(process.env.PORT || 3000); 14 | app.listen(port, () => { 15 | console.info('Express server started on port: ' + port); 16 | }); 17 | -------------------------------------------------------------------------------- /docs/chain-interaction UI/definition.md: -------------------------------------------------------------------------------- 1 | # Use Cases Group 2 | 1. Account Management (Security): Deals with user and wallet authorization, verification information 3 | 2. Profile Management (Normal User): Deals with user's profile information 4 | 3. Design/Projects Management (Artists): Deals with artist's projects and design information 5 | 4. NFT Collections Management: Deals with user's NFT collections management 6 | 5. Marketplace Engagement: Deals with how user will interact with marketplace 7 | 6. Notification Center: Deals with how user wants to set notification 8 | -------------------------------------------------------------------------------- /x/claims/types/errors.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // DONTCOVER 4 | 5 | import ( 6 | sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" 7 | ) 8 | 9 | // x/claim module sentinel errors 10 | var ( 11 | ErrAirdropNotEnabled = sdkerrors.Register(ModuleName, 2, "airdrop not enabled") 12 | ErrIncorrectModuleAccountBalance = sdkerrors.Register(ModuleName, 3, "claim module account balance != sum of all claim record InitialClaimableAmounts") 13 | ErrUnauthorizedClaimer = sdkerrors.Register(ModuleName, 4, "address is not allowed to claim") 14 | ) 15 | -------------------------------------------------------------------------------- /anone-cw721/scripts/query_single.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #NODE="tcp://localhost:2281" 4 | NODE="http://65.108.128.139:2281" 5 | #ACCOUNT="test" 6 | ACCOUNT="Developer" 7 | CHAINID="anone-testnet-1" 8 | SLEEP_TIME="15s" 9 | CONTRACT="one1nc5tatafv6eyq7llkr2gv50ff9e22mnf70qgjlv737ktmt4eswrq9jdqcm" 10 | 11 | # CHANGE TOKEN_ID HERE 12 | # $# is to check number of arguments 13 | TOKEN_ID="$1" 14 | 15 | QUERY="{\"all_nft_info\": {\"token_id\": \"$TOKEN_ID\"}}" 16 | echo $(anoned query wasm contract-state smart "$CONTRACT" "$QUERY" --node "$NODE" --output json | jq --color-output -r .) -------------------------------------------------------------------------------- /vue/src/router/index.js: -------------------------------------------------------------------------------- 1 | import { createRouter, createWebHistory } from 'vue-router' 2 | import Index from '@/views/Index.vue' 3 | import Types from '@/views/Types.vue' 4 | import Relayers from '@/views/Relayers.vue' 5 | 6 | const routerHistory = createWebHistory() 7 | const routes = [ 8 | { 9 | path: '/', 10 | component: Index, 11 | }, 12 | { path: '/types', component: Types }, 13 | { path: '/relayers', component: Relayers }, 14 | ] 15 | 16 | const router = createRouter({ 17 | history: routerHistory, 18 | routes, 19 | }) 20 | 21 | export default router 22 | -------------------------------------------------------------------------------- /proto/buf.lock: -------------------------------------------------------------------------------- 1 | # Generated by buf. DO NOT EDIT. 2 | version: v1 3 | deps: 4 | - remote: buf.build 5 | owner: cosmos 6 | repository: cosmos-proto 7 | commit: 1935555c206d4afb9e94615dfd0fad31 8 | - remote: buf.build 9 | owner: cosmos 10 | repository: cosmos-sdk 11 | commit: bfe2fb50c22b479e8653f81e23b32659 12 | - remote: buf.build 13 | owner: cosmos 14 | repository: gogo-proto 15 | commit: bee5511075b7499da6178d9e4aaa628b 16 | - remote: buf.build 17 | owner: googleapis 18 | repository: googleapis 19 | commit: 6fa2578641f0414ba54e648d502b34cc 20 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/index.d.ts: -------------------------------------------------------------------------------- 1 | import { GenericAuthorization } from "./module/types/cosmos/authz/v1beta1/authz"; 2 | import { Grant } from "./module/types/cosmos/authz/v1beta1/authz"; 3 | import { EventGrant } from "./module/types/cosmos/authz/v1beta1/event"; 4 | import { EventRevoke } from "./module/types/cosmos/authz/v1beta1/event"; 5 | import { GrantAuthorization } from "./module/types/cosmos/authz/v1beta1/genesis"; 6 | export { GenericAuthorization, Grant, EventGrant, EventRevoke, GrantAuthorization }; 7 | declare const _default; 8 | export default _default; 9 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cosmos-gov-v1beta1-js", 3 | "version": "0.1.0", 4 | "description": "Autogenerated vuex store for Cosmos module cosmos.gov.v1beta1", 5 | "author": "Starport Codegen ", 6 | "homepage": "http://github.com/cosmos/cosmos-sdk/x/gov/types", 7 | "license": "Apache-2.0", 8 | "licenses": [ 9 | { 10 | "type": "Apache-2.0", 11 | "url": "http://www.apache.org/licenses/LICENSE-2.0" 12 | } 13 | ], 14 | "main": "index.js", 15 | "publishConfig": { 16 | "access": "public" 17 | } 18 | } -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cosmos-authz-v1beta1-js", 3 | "version": "0.1.0", 4 | "description": "Autogenerated vuex store for Cosmos module cosmos.authz.v1beta1", 5 | "author": "Starport Codegen ", 6 | "homepage": "http://github.com/cosmos/cosmos-sdk/x/authz", 7 | "license": "Apache-2.0", 8 | "licenses": [ 9 | { 10 | "type": "Apache-2.0", 11 | "url": "http://www.apache.org/licenses/LICENSE-2.0" 12 | } 13 | ], 14 | "main": "index.js", 15 | "publishConfig": { 16 | "access": "public" 17 | } 18 | } -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cosmos-bank-v1beta1-js", 3 | "version": "0.1.0", 4 | "description": "Autogenerated vuex store for Cosmos module cosmos.bank.v1beta1", 5 | "author": "Starport Codegen ", 6 | "homepage": "http://github.com/cosmos/cosmos-sdk/x/bank/types", 7 | "license": "Apache-2.0", 8 | "licenses": [ 9 | { 10 | "type": "Apache-2.0", 11 | "url": "http://www.apache.org/licenses/LICENSE-2.0" 12 | } 13 | ], 14 | "main": "index.js", 15 | "publishConfig": { 16 | "access": "public" 17 | } 18 | } -------------------------------------------------------------------------------- /anone-cw721/src/msg.rs: -------------------------------------------------------------------------------- 1 | use schemars::JsonSchema; 2 | use serde::{Deserialize, Serialize}; 3 | 4 | #[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] 5 | pub struct InstantiateMsg { 6 | 7 | } 8 | 9 | #[derive(Serialize, Deserialize, Clone, Debug, JsonSchema)] 10 | pub struct MigrateMsg {} 11 | 12 | #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] 13 | #[serde(rename_all = "snake_case")] 14 | pub enum ExecuteMsg { 15 | 16 | } 17 | 18 | #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] 19 | #[serde(rename_all = "snake_case")] 20 | pub enum QueryMsg { 21 | 22 | } -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cosmos-crisis-v1beta1-js", 3 | "version": "0.1.0", 4 | "description": "Autogenerated vuex store for Cosmos module cosmos.crisis.v1beta1", 5 | "author": "Starport Codegen ", 6 | "homepage": "http://github.com/cosmos/cosmos-sdk/x/crisis/types", 7 | "license": "Apache-2.0", 8 | "licenses": [ 9 | { 10 | "type": "Apache-2.0", 11 | "url": "http://www.apache.org/licenses/LICENSE-2.0" 12 | } 13 | ], 14 | "main": "index.js", 15 | "publishConfig": { 16 | "access": "public" 17 | } 18 | } -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cosmos-feegrant-v1beta1-js", 3 | "version": "0.1.0", 4 | "description": "Autogenerated vuex store for Cosmos module cosmos.feegrant.v1beta1", 5 | "author": "Starport Codegen ", 6 | "homepage": "http://github.com/cosmos/cosmos-sdk/x/feegrant", 7 | "license": "Apache-2.0", 8 | "licenses": [ 9 | { 10 | "type": "Apache-2.0", 11 | "url": "http://www.apache.org/licenses/LICENSE-2.0" 12 | } 13 | ], 14 | "main": "index.js", 15 | "publishConfig": { 16 | "access": "public" 17 | } 18 | } -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/index.d.ts: -------------------------------------------------------------------------------- 1 | import { SigningInfo } from "./module/types/cosmos/slashing/v1beta1/genesis"; 2 | import { ValidatorMissedBlocks } from "./module/types/cosmos/slashing/v1beta1/genesis"; 3 | import { MissedBlock } from "./module/types/cosmos/slashing/v1beta1/genesis"; 4 | import { ValidatorSigningInfo } from "./module/types/cosmos/slashing/v1beta1/slashing"; 5 | import { Params } from "./module/types/cosmos/slashing/v1beta1/slashing"; 6 | export { SigningInfo, ValidatorMissedBlocks, MissedBlock, ValidatorSigningInfo, Params }; 7 | declare const _default; 8 | export default _default; 9 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cosmos-staking-v1beta1-js", 3 | "version": "0.1.0", 4 | "description": "Autogenerated vuex store for Cosmos module cosmos.staking.v1beta1", 5 | "author": "Starport Codegen ", 6 | "homepage": "http://github.com/cosmos/cosmos-sdk/x/staking/types", 7 | "license": "Apache-2.0", 8 | "licenses": [ 9 | { 10 | "type": "Apache-2.0", 11 | "url": "http://www.apache.org/licenses/LICENSE-2.0" 12 | } 13 | ], 14 | "main": "index.js", 15 | "publishConfig": { 16 | "access": "public" 17 | } 18 | } -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cosmos-evidence-v1beta1-js", 3 | "version": "0.1.0", 4 | "description": "Autogenerated vuex store for Cosmos module cosmos.evidence.v1beta1", 5 | "author": "Starport Codegen ", 6 | "homepage": "http://github.com/cosmos/cosmos-sdk/x/evidence/types", 7 | "license": "Apache-2.0", 8 | "licenses": [ 9 | { 10 | "type": "Apache-2.0", 11 | "url": "http://www.apache.org/licenses/LICENSE-2.0" 12 | } 13 | ], 14 | "main": "index.js", 15 | "publishConfig": { 16 | "access": "public" 17 | } 18 | } -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cosmos-slashing-v1beta1-js", 3 | "version": "0.1.0", 4 | "description": "Autogenerated vuex store for Cosmos module cosmos.slashing.v1beta1", 5 | "author": "Starport Codegen ", 6 | "homepage": "http://github.com/cosmos/cosmos-sdk/x/slashing/types", 7 | "license": "Apache-2.0", 8 | "licenses": [ 9 | { 10 | "type": "Apache-2.0", 11 | "url": "http://www.apache.org/licenses/LICENSE-2.0" 12 | } 13 | ], 14 | "main": "index.js", 15 | "publishConfig": { 16 | "access": "public" 17 | } 18 | } -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cosmos-vesting-v1beta1-js", 3 | "version": "0.1.0", 4 | "description": "Autogenerated vuex store for Cosmos module cosmos.vesting.v1beta1", 5 | "author": "Starport Codegen ", 6 | "homepage": "http://github.com/cosmos/cosmos-sdk/x/auth/vesting/types", 7 | "license": "Apache-2.0", 8 | "licenses": [ 9 | { 10 | "type": "Apache-2.0", 11 | "url": "http://www.apache.org/licenses/LICENSE-2.0" 12 | } 13 | ], 14 | "main": "index.js", 15 | "publishConfig": { 16 | "access": "public" 17 | } 18 | } -------------------------------------------------------------------------------- /x/claims/keeper/params_test.go: -------------------------------------------------------------------------------- 1 | package keeper_test 2 | 3 | import ( 4 | "testing" 5 | 6 | simapp "github.com/notional-labs/anone/testutil/simapp" 7 | "github.com/notional-labs/anone/x/claims/types" 8 | "github.com/stretchr/testify/require" 9 | tmproto "github.com/tendermint/tendermint/proto/tendermint/types" 10 | ) 11 | 12 | func TestGetParams(t *testing.T) { 13 | app := simapp.New(t.TempDir()) 14 | 15 | ctx := app.BaseApp.NewContext(true, tmproto.Header{}) 16 | 17 | k := app.ClaimKeeper 18 | params := types.DefaultParams() 19 | 20 | k.SetParams(ctx, params) 21 | 22 | require.EqualValues(t, params, k.GetParams(ctx)) 23 | } 24 | -------------------------------------------------------------------------------- /cmd/anoned/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "os" 5 | 6 | svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" 7 | "github.com/notional-labs/anone/app" 8 | "github.com/tendermint/spm/cosmoscmd" 9 | ) 10 | 11 | func main() { 12 | cmdOptions := GetWasmCmdOptions() 13 | rootCmd, _ := cosmoscmd.NewRootCmd( 14 | app.Name, 15 | app.AccountAddressPrefix, 16 | app.DefaultNodeHome, 17 | app.Name, 18 | app.ModuleBasics, 19 | app.New, 20 | // this line is used by starport scaffolding # root/arguments 21 | cmdOptions..., 22 | ) 23 | if err := svrcmd.Execute(rootCmd, app.DefaultNodeHome); err != nil { 24 | os.Exit(1) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cosmos-distribution-v1beta1-js", 3 | "version": "0.1.0", 4 | "description": "Autogenerated vuex store for Cosmos module cosmos.distribution.v1beta1", 5 | "author": "Starport Codegen ", 6 | "homepage": "http://github.com/cosmos/cosmos-sdk/x/distribution/types", 7 | "license": "Apache-2.0", 8 | "licenses": [ 9 | { 10 | "type": "Apache-2.0", 11 | "url": "http://www.apache.org/licenses/LICENSE-2.0" 12 | } 13 | ], 14 | "main": "index.js", 15 | "publishConfig": { 16 | "access": "public" 17 | } 18 | } -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ibc-applications-transfer-v1-js", 3 | "version": "0.1.0", 4 | "description": "Autogenerated vuex store for Cosmos module ibc.applications.transfer.v1", 5 | "author": "Starport Codegen ", 6 | "homepage": "http://github.com/cosmos/ibc-go/modules/apps/transfer/types", 7 | "license": "Apache-2.0", 8 | "licenses": [ 9 | { 10 | "type": "Apache-2.0", 11 | "url": "http://www.apache.org/licenses/LICENSE-2.0" 12 | } 13 | ], 14 | "main": "index.js", 15 | "publishConfig": { 16 | "access": "public" 17 | } 18 | } -------------------------------------------------------------------------------- /vue/vue.config.js: -------------------------------------------------------------------------------- 1 | const NodePolyfillPlugin = require('node-polyfill-webpack-plugin') 2 | const path = require('path') 3 | const webpack = require('webpack') 4 | 5 | const lambda = process.env.LAMBDA || 'http://localhost:8080/api/testing/attest' 6 | 7 | module.exports = { 8 | transpileDependencies: true, 9 | configureWebpack: { 10 | resolve: { 11 | symlinks: false, 12 | alias: { 13 | vue$: path.resolve('./node_modules/vue/dist/vue.esm-bundler.js'), 14 | }, 15 | }, 16 | plugins: [ 17 | new NodePolyfillPlugin(), 18 | new webpack.DefinePlugin({ 19 | __lambda__: lambda, 20 | }), 21 | ], 22 | }, 23 | } 24 | -------------------------------------------------------------------------------- /vue/README.md: -------------------------------------------------------------------------------- 1 | ## App UI Template 2 | 3 | [Vue.js](https://vuejs.org/)-based web app template for your Cosmos SDK blockchain. Use the template to quickly bootstrap your app. To learn more, check out the components in `@starport/vue` and the [Starport documentation](https://docs.starport.network/). 4 | 5 | 6 | ## Project setup 7 | 8 | ``` 9 | npm install 10 | ``` 11 | 12 | ### Compiles and reloads the app on save for development 13 | 14 | ``` 15 | npm run dev 16 | ``` 17 | 18 | ### Compiles and minifies for production 19 | 20 | ``` 21 | npm run build 22 | ``` 23 | 24 | ### Customize configuration 25 | 26 | See [Configuration Reference](https://cli.vuejs.org/config/). 27 | -------------------------------------------------------------------------------- /internal/wasm/registry.go: -------------------------------------------------------------------------------- 1 | package wasm 2 | 3 | import "fmt" 4 | 5 | type EncoderRegistry struct { 6 | encoders map[string]Encoder 7 | } 8 | 9 | // NewEncoderRegistry creates a new registry for message encoders. 10 | func NewEncoderRegistry() *EncoderRegistry { 11 | return &EncoderRegistry{ 12 | encoders: make(map[string]Encoder), 13 | } 14 | } 15 | 16 | // RegisterEncoder adds a message encoder for the given route. 17 | func (qr *EncoderRegistry) RegisterEncoder(route string, encoder Encoder) { 18 | if _, exists := qr.encoders[route]; exists { 19 | panic(fmt.Sprintf("wasm: encoder already registered for route: %s", route)) 20 | } 21 | qr.encoders[route] = encoder 22 | } -------------------------------------------------------------------------------- /x/claims/abci.go: -------------------------------------------------------------------------------- 1 | package claims 2 | 3 | import ( 4 | sdk "github.com/cosmos/cosmos-sdk/types" 5 | "github.com/notional-labs/anone/x/claims/keeper" 6 | ) 7 | 8 | // EndBlocker called every block, process inflation, update validator set. 9 | func EndBlocker(ctx sdk.Context, k keeper.Keeper) { 10 | params := k.GetParams(ctx) 11 | if !params.IsAirdropEnabled(ctx.BlockTime()) { 12 | return 13 | } 14 | // End Airdrop 15 | goneTime := ctx.BlockTime().Sub(params.AirdropStartTime) 16 | if goneTime > params.DurationUntilDecay+params.DurationOfDecay { 17 | // airdrop time passed 18 | err := k.EndAirdrop(ctx) 19 | if err != nil { 20 | panic(err) 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /x/claims/keeper/msg_server_test.go: -------------------------------------------------------------------------------- 1 | package keeper_test 2 | 3 | import ( 4 | "context" 5 | "testing" 6 | 7 | sdk "github.com/cosmos/cosmos-sdk/types" 8 | simapp "github.com/notional-labs/anone/testutil/simapp" 9 | "github.com/notional-labs/anone/x/claims/keeper" 10 | "github.com/notional-labs/anone/x/claims/types" 11 | tmproto "github.com/tendermint/tendermint/proto/tendermint/types" 12 | ) 13 | 14 | func setupMsgServer(t testing.TB) (types.MsgServer, context.Context) { 15 | app := simapp.New(t.TempDir()) 16 | 17 | ctx := app.BaseApp.NewContext(true, tmproto.Header{}) 18 | 19 | k := app.ClaimKeeper 20 | return keeper.NewMsgServerImpl(k), sdk.WrapSDKContext(ctx) 21 | } 22 | -------------------------------------------------------------------------------- /lambda/src/models/mongo/AttestationModel.ts: -------------------------------------------------------------------------------- 1 | import {Schema, Date, model} from 'mongoose'; 2 | import {IAttestation} from "../Attestation"; 3 | 4 | 5 | export interface AttestationModel extends IAttestation { 6 | _id: string, 7 | added: string, 8 | ethAddress: string, 9 | oneAddress: string, 10 | NFTs: string[], 11 | signature: string 12 | } 13 | 14 | export const AttestationSchema = new Schema({ 15 | _id: {type: String}, 16 | added: Date, 17 | ethAddress: String, 18 | oneAddress: String, 19 | NFTs: [], 20 | signature: String 21 | }, { versionKey: false }); 22 | 23 | 24 | 25 | export const Attestation = model('User', AttestationSchema); 26 | -------------------------------------------------------------------------------- /scripts/protoc-swagger-gen.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -eo pipefail 4 | 5 | mkdir -p ./docs/client 6 | proto_dirs=$(find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) 7 | for dir in $proto_dirs; do 8 | 9 | # generate swagger files (filter query files) 10 | query_file=$(find "${dir}" -maxdepth 1 \( -name 'query.proto' -o -name 'service.proto' \)) 11 | if [[ ! -z "$query_file" ]]; then 12 | buf protoc \ 13 | -I "proto" \ 14 | -I "third_party/proto" \ 15 | "$query_file" \ 16 | --swagger_out=./docs/client \ 17 | --swagger_opt=logtostderr=true --swagger_opt=fqn_for_swagger_name=true --swagger_opt=simple_operation_ids=true 18 | fi 19 | done 20 | -------------------------------------------------------------------------------- /lambda/src/public/stylesheets/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 100px; 3 | font: 14px "Lucida Grande", Helvetica, Arial, sans-serif; 4 | } 5 | 6 | body .users-column { 7 | display: inline-block; 8 | margin-right: 2em; 9 | vertical-align: top; 10 | } 11 | 12 | body .users-column .column-header { 13 | padding-bottom: 5px; 14 | font-weight: 700; 15 | font-size: 1.2em; 16 | } 17 | 18 | body .add-user-col input { 19 | margin-bottom: 10px; 20 | } 21 | 22 | body .users-column .user-display-ele { 23 | padding-bottom: 10px; 24 | } 25 | 26 | body .users-column .user-display-ele button { 27 | margin-top: 2px; 28 | margin-bottom: 10px; 29 | } 30 | 31 | body .users-column .user-display-ele .edit-view { 32 | display: none; 33 | } 34 | -------------------------------------------------------------------------------- /anone-cw721/default_nft/ERC_721_FORMAT.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Asset Metadata", 3 | "type": "object", 4 | "properties": { 5 | "name": { 6 | "type": "string", 7 | "description": "Identifies the asset to which this NFT represents" 8 | }, 9 | "description": { 10 | "type": "string", 11 | "description": "Describes the asset to which this NFT represents" 12 | }, 13 | "image": { 14 | "type": "string", 15 | "description": "A URI pointing to a resource with mime type image/* representing the asset to which this NFT represents. Consider making any images at a width between 320 and 1080 pixels and aspect ratio between 1.91:1 and 4:5 inclusive." 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /vue/src/views/Index.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 30 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/index.d.ts: -------------------------------------------------------------------------------- 1 | import { BaseVestingAccount } from "./module/types/cosmos/vesting/v1beta1/vesting"; 2 | import { ContinuousVestingAccount } from "./module/types/cosmos/vesting/v1beta1/vesting"; 3 | import { DelayedVestingAccount } from "./module/types/cosmos/vesting/v1beta1/vesting"; 4 | import { Period } from "./module/types/cosmos/vesting/v1beta1/vesting"; 5 | import { PeriodicVestingAccount } from "./module/types/cosmos/vesting/v1beta1/vesting"; 6 | import { PermanentLockedAccount } from "./module/types/cosmos/vesting/v1beta1/vesting"; 7 | export { BaseVestingAccount, ContinuousVestingAccount, DelayedVestingAccount, Period, PeriodicVestingAccount, PermanentLockedAccount }; 8 | declare const _default; 9 | export default _default; 10 | -------------------------------------------------------------------------------- /validator creation.md: -------------------------------------------------------------------------------- 1 | ``` 2 | anoned keys add 3 | ``` 4 | If you have validator address before, add `--recover` flag and type your mnemonic to recover. 5 | 6 | Then, go to Faucet channel in Discord to get your token: https://discord.com/channels/908103165143023666/944946627880316938. Send your wallet address to receive tokens 7 | 8 | Create a new validator: 9 | ``` 10 | anoned tx staking create-validator \ 11 | --amount=1500000000uan1 \ 12 | --pubkey=$(anoned tendermint show-validator) \ 13 | --moniker= \ 14 | --chain-id=anone-testnet-1 \ 15 | --commission-rate="0.05" \ 16 | --commission-max-rate="0.20" \ 17 | --commission-max-change-rate="0.01" \ 18 | --min-self-delegation=1 \ 19 | --gas 200000 \ 20 | --fees 250000uan1 \ 21 | --from= 22 | ``` 23 | -------------------------------------------------------------------------------- /vue/src/store/generated/index.d.ts: -------------------------------------------------------------------------------- 1 | declare const _default: { 2 | CosmosCosmosSdkCosmosAuthzV1Beta1: (store: any) => void; 3 | CosmosCosmosSdkCosmosBankV1Beta1: (store: any) => void; 4 | CosmosCosmosSdkCosmosCrisisV1Beta1: (store: any) => void; 5 | CosmosCosmosSdkCosmosDistributionV1Beta1: (store: any) => void; 6 | CosmosCosmosSdkCosmosEvidenceV1Beta1: (store: any) => void; 7 | CosmosCosmosSdkCosmosFeegrantV1Beta1: (store: any) => void; 8 | CosmosCosmosSdkCosmosGovV1Beta1: (store: any) => void; 9 | CosmosCosmosSdkCosmosSlashingV1Beta1: (store: any) => void; 10 | CosmosCosmosSdkCosmosStakingV1Beta1: (store: any) => void; 11 | CosmosCosmosSdkCosmosVestingV1Beta1: (store: any) => void; 12 | CosmosIbcGoIbcApplicationsTransferV1: (store: any) => void; 13 | }; 14 | export default _default; 15 | -------------------------------------------------------------------------------- /app/genesis.go: -------------------------------------------------------------------------------- 1 | package app 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "github.com/cosmos/cosmos-sdk/codec" 7 | ) 8 | 9 | // The genesis state of the blockchain is represented here as a map of raw json 10 | // messages key'd by a identifier string. 11 | // The identifier is used to determine which module genesis information belongs 12 | // to so it may be appropriately routed during init chain. 13 | // Within this application default genesis information is retrieved from 14 | // the ModuleBasicManager which populates json from each BasicModule 15 | // object provided to it during init. 16 | type GenesisState map[string]json.RawMessage 17 | 18 | // NewDefaultGenesisState generates the default state for the application. 19 | func NewDefaultGenesisState(cdc codec.JSONCodec) GenesisState { 20 | return ModuleBasics.DefaultGenesis(cdc) 21 | } 22 | -------------------------------------------------------------------------------- /app/wasm_config.go: -------------------------------------------------------------------------------- 1 | package app 2 | 3 | import ( 4 | wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" 5 | ) 6 | 7 | const ( 8 | // DefaultAnoneInstanceCost is initially set the same as in wasmd 9 | DefaultAnOneInstanceCost uint64 = 60_000 10 | // DefaultAnoneCompileCost set to a large number for testing 11 | DefaultAnOneCompileCost uint64 = 100 12 | ) 13 | 14 | // AnoneGasRegisterConfig is defaults plus a custom compile amount 15 | func AnoneGasRegisterConfig() wasmkeeper.WasmGasRegisterConfig { 16 | gasConfig := wasmkeeper.DefaultGasRegisterConfig() 17 | gasConfig.InstanceCost = DefaultAnOneInstanceCost 18 | gasConfig.CompileCost = DefaultAnOneCompileCost 19 | 20 | return gasConfig 21 | } 22 | 23 | func NewJunoWasmGasRegister() wasmkeeper.WasmGasRegister { 24 | return wasmkeeper.NewWasmGasRegister(AnoneGasRegisterConfig()) 25 | } 26 | -------------------------------------------------------------------------------- /anone-cw721/src/metadata.rs: -------------------------------------------------------------------------------- 1 | use schemars::JsonSchema; 2 | use serde::{Deserialize, Serialize}; 3 | 4 | #[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug, Default)] 5 | pub struct Trait { 6 | pub display_type: Option, 7 | pub trait_type: String, 8 | pub value: String, 9 | } 10 | 11 | // see: https://docs.opensea.io/docs/metadata-standards 12 | #[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug, Default)] 13 | pub struct Metadata { 14 | pub image: Option, 15 | pub image_data: Option, 16 | pub external_url: Option, 17 | pub description: Option, 18 | pub name: Option, 19 | pub attributes: Option>, 20 | pub background_color: Option, 21 | pub animation_url: Option, 22 | pub youtube_url: Option, 23 | } -------------------------------------------------------------------------------- /x/claims/types/keys.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | const ( 4 | // ModuleName defines the module name 5 | ModuleName = "claims" 6 | 7 | // StoreKey defines the primary module store key 8 | StoreKey = ModuleName 9 | 10 | // RouterKey is the message route for slashing 11 | RouterKey = ModuleName 12 | 13 | // QuerierRoute defines the module's query routing key 14 | QuerierRoute = ModuleName 15 | 16 | // MemStoreKey defines the in-memory store key 17 | MemStoreKey = "mem_claims" 18 | 19 | // ParamsKey defines the store key for claim module parameters 20 | ParamsKey = "params" 21 | 22 | // ActionKey defines the store key to store user accomplished actions 23 | ActionKey = "action" 24 | ) 25 | 26 | // KVStore keys 27 | var ( 28 | // ClaimRecordsStorePrefix defines the store prefix for the claim records 29 | ClaimRecordsStorePrefix = []byte{0x01} 30 | ) 31 | -------------------------------------------------------------------------------- /x/claims/keeper/grpc_query_params_test.go: -------------------------------------------------------------------------------- 1 | package keeper_test 2 | 3 | import ( 4 | "testing" 5 | 6 | sdk "github.com/cosmos/cosmos-sdk/types" 7 | simapp "github.com/notional-labs/anone/testutil/simapp" 8 | "github.com/notional-labs/anone/x/claims/types" 9 | "github.com/stretchr/testify/require" 10 | 11 | tmproto "github.com/tendermint/tendermint/proto/tendermint/types" 12 | ) 13 | 14 | func TestParamsQuery(t *testing.T) { 15 | 16 | app := simapp.New(t.TempDir()) 17 | 18 | ctx := app.BaseApp.NewContext(true, tmproto.Header{}) 19 | 20 | keeper := app.ClaimKeeper 21 | wctx := sdk.WrapSDKContext(ctx) 22 | params := types.DefaultParams() 23 | keeper.SetParams(ctx, params) 24 | 25 | response, err := keeper.Params(wctx, &types.QueryParamsRequest{}) 26 | require.NoError(t, err) 27 | require.Equal(t, &types.QueryParamsResponse{Params: params}, response) 28 | } 29 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/index.d.ts: -------------------------------------------------------------------------------- 1 | import { SendAuthorization } from "./module/types/cosmos/bank/v1beta1/authz"; 2 | import { Params } from "./module/types/cosmos/bank/v1beta1/bank"; 3 | import { SendEnabled } from "./module/types/cosmos/bank/v1beta1/bank"; 4 | import { Input } from "./module/types/cosmos/bank/v1beta1/bank"; 5 | import { Output } from "./module/types/cosmos/bank/v1beta1/bank"; 6 | import { Supply } from "./module/types/cosmos/bank/v1beta1/bank"; 7 | import { DenomUnit } from "./module/types/cosmos/bank/v1beta1/bank"; 8 | import { Metadata } from "./module/types/cosmos/bank/v1beta1/bank"; 9 | import { Balance } from "./module/types/cosmos/bank/v1beta1/genesis"; 10 | export { SendAuthorization, Params, SendEnabled, Input, Output, Supply, DenomUnit, Metadata, Balance }; 11 | declare const _default; 12 | export default _default; 13 | -------------------------------------------------------------------------------- /x/claims/types/tx_test.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | import ( 4 | "testing" 5 | 6 | sdk "github.com/cosmos/cosmos-sdk/types" 7 | "github.com/cosmos/cosmos-sdk/x/auth/legacy/legacytx" 8 | "github.com/stretchr/testify/assert" 9 | ) 10 | 11 | func TestMsgJsonSignBytes(t *testing.T) { 12 | goodAddress := sdk.AccAddress(make([]byte, 20)).String() 13 | specs := map[string]struct { 14 | src legacytx.LegacyMsg 15 | exp string 16 | }{ 17 | "MsgInitialClaim": { 18 | src: &MsgInitialClaim{Sender: goodAddress}, 19 | exp: ` 20 | { 21 | "type":"claim/InitialClaim", 22 | "value": {"sender": "cosmos1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqnrql8a"} 23 | }`, 24 | }, 25 | } 26 | for name, spec := range specs { 27 | t.Run(name, func(t *testing.T) { 28 | bz := spec.src.GetSignBytes() 29 | assert.JSONEq(t, spec.exp, string(bz), "raw: %s", string(bz)) 30 | }) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /vue/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Another-1 Attestation 11 | 12 | 13 | 15 | 16 | 17 | 18 | 22 |
23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/index.d.ts: -------------------------------------------------------------------------------- 1 | import { WeightedVoteOption } from "./module/types/cosmos/gov/v1beta1/gov"; 2 | import { TextProposal } from "./module/types/cosmos/gov/v1beta1/gov"; 3 | import { Deposit } from "./module/types/cosmos/gov/v1beta1/gov"; 4 | import { Proposal } from "./module/types/cosmos/gov/v1beta1/gov"; 5 | import { TallyResult } from "./module/types/cosmos/gov/v1beta1/gov"; 6 | import { Vote } from "./module/types/cosmos/gov/v1beta1/gov"; 7 | import { DepositParams } from "./module/types/cosmos/gov/v1beta1/gov"; 8 | import { VotingParams } from "./module/types/cosmos/gov/v1beta1/gov"; 9 | import { TallyParams } from "./module/types/cosmos/gov/v1beta1/gov"; 10 | export { WeightedVoteOption, TextProposal, Deposit, Proposal, TallyResult, Vote, DepositParams, VotingParams, TallyParams }; 11 | declare const _default; 12 | export default _default; 13 | -------------------------------------------------------------------------------- /x/claims/client/cli/tx.go: -------------------------------------------------------------------------------- 1 | package cli 2 | 3 | import ( 4 | "fmt" 5 | "time" 6 | 7 | "github.com/spf13/cobra" 8 | 9 | "github.com/cosmos/cosmos-sdk/client" 10 | "github.com/notional-labs/anone/x/claims/types" 11 | ) 12 | 13 | var ( 14 | DefaultRelativePacketTimeoutTimestamp = uint64((time.Duration(10) * time.Minute).Nanoseconds()) 15 | ) 16 | 17 | // GetTxCmd returns the transaction commands for this module 18 | func GetTxCmd() *cobra.Command { 19 | cmd := &cobra.Command{ 20 | Use: types.ModuleName, 21 | Short: fmt.Sprintf("%s transactions subcommands", types.ModuleName), 22 | DisableFlagParsing: true, 23 | SuggestionsMinimumDistance: 2, 24 | RunE: client.ValidateCmd, 25 | } 26 | 27 | cmd.AddCommand(CmdInitialClaim()) 28 | // this line is used by starport scaffolding # 1 29 | 30 | return cmd 31 | } 32 | -------------------------------------------------------------------------------- /x/claims/client/cli/query_params.go: -------------------------------------------------------------------------------- 1 | package cli 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/cosmos/cosmos-sdk/client" 7 | "github.com/cosmos/cosmos-sdk/client/flags" 8 | "github.com/notional-labs/anone/x/claims/types" 9 | "github.com/spf13/cobra" 10 | ) 11 | 12 | func CmdQueryParams() *cobra.Command { 13 | cmd := &cobra.Command{ 14 | Use: "params", 15 | Short: "shows the parameters of the module", 16 | Args: cobra.NoArgs, 17 | RunE: func(cmd *cobra.Command, args []string) error { 18 | clientCtx := client.GetClientContextFromCmd(cmd) 19 | 20 | queryClient := types.NewQueryClient(clientCtx) 21 | 22 | res, err := queryClient.Params(context.Background(), &types.QueryParamsRequest{}) 23 | if err != nil { 24 | return err 25 | } 26 | 27 | return clientCtx.PrintProto(res) 28 | }, 29 | } 30 | 31 | flags.AddQueryFlagsToCmd(cmd) 32 | 33 | return cmd 34 | } 35 | -------------------------------------------------------------------------------- /docs/chain-interaction UI/profile_page.drawio: -------------------------------------------------------------------------------- 1 | zZbJboMwEIafhmMkjCnLsc16aKpWqZSzhR1wBZgap5A+fU0xWyFNIpU0Egf7n/HY8zED1uA0ypccJcGaYRJqho5zDc40wwCmYWjFo+NDqUyAXQo+p1g5NcKGfhIl6krdU0zSjqNgLBQ06Yoei2PiiY6GOGdZ123Hwu6uCfJJT9h4KOyrW4pFoFRguY1hRagfqK0dQ+UXocpZZZIGCLOsJcG5BqecMVGOonxKwgJexaVctzhirQ/GSSzOWcB27+vH7cPyZT0x+WyxIux+O1FRPlC4Vwmrw4pDRYCzfYxJEUTX4EMWUEE2CfIKaybfudQCEYVyBuRQhSNckPzoOUGdvSwbwiIi+EG6VAsqYKpiHEfNs4a/YyotaKE3K0ek3rlfx26wyIEicwEl4wYpWacp2fYAJTAaJXiakowiG5ecJoTSpOzmHc0Lqn+BzHS7yIAOBiprANloxMxL6gpcpa4c8BOS24dUt2ibkmGOhemuh+lp8ZreXAuej2o0UlaP1DNnb7KT/p9W3UW/0oLXpGXf/mcd1ERalKyhvx9wL8ckp83949vWusXB+Rc= -------------------------------------------------------------------------------- /x/claims/genesis_test.go: -------------------------------------------------------------------------------- 1 | package claims_test 2 | 3 | import ( 4 | "testing" 5 | 6 | simapp "github.com/notional-labs/anone/testutil/simapp" 7 | "github.com/notional-labs/anone/x/claims" 8 | "github.com/notional-labs/anone/x/claims/types" 9 | "github.com/stretchr/testify/require" 10 | 11 | tmproto "github.com/tendermint/tendermint/proto/tendermint/types" 12 | ) 13 | 14 | func TestGenesis(t *testing.T) { 15 | genesisState := types.GenesisState{ 16 | Params: types.DefaultParams(), 17 | 18 | // this line is used by starport scaffolding # genesis/test/state 19 | } 20 | 21 | app := simapp.New(t.TempDir()) 22 | 23 | ctx := app.BaseApp.NewContext(true, tmproto.Header{}) 24 | 25 | k := app.ClaimKeeper 26 | claims.InitGenesis(ctx, k, genesisState) 27 | got := claims.ExportGenesis(ctx, k) 28 | require.NotNil(t, got) 29 | 30 | // this line is used by starport scaffolding # genesis/test/assert 31 | } 32 | -------------------------------------------------------------------------------- /x/claims/types/message_claim_for_test.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | import ( 4 | "testing" 5 | 6 | sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" 7 | "github.com/notional-labs/anone/testutil/sample" 8 | "github.com/stretchr/testify/require" 9 | ) 10 | 11 | func TestMsgClaimFor_ValidateBasic(t *testing.T) { 12 | tests := []struct { 13 | name string 14 | msg MsgClaimFor 15 | err error 16 | }{ 17 | { 18 | name: "invalid address", 19 | msg: MsgClaimFor{ 20 | Sender: "invalid_address", 21 | }, 22 | err: sdkerrors.ErrInvalidAddress, 23 | }, { 24 | name: "valid address", 25 | msg: MsgClaimFor{ 26 | Sender: sample.AccAddress(), 27 | }, 28 | }, 29 | } 30 | for _, tt := range tests { 31 | t.Run(tt.name, func(t *testing.T) { 32 | err := tt.msg.ValidateBasic() 33 | if tt.err != nil { 34 | require.ErrorIs(t, err, tt.err) 35 | return 36 | } 37 | require.NoError(t, err) 38 | }) 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /x/claims/types/expected_keepers.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | import ( 4 | sdk "github.com/cosmos/cosmos-sdk/types" 5 | "github.com/cosmos/cosmos-sdk/x/auth/types" 6 | ) 7 | 8 | type AccountKeeper interface { 9 | GetModuleAddress(name string) sdk.AccAddress 10 | SetModuleAccount(ctx sdk.Context, macc types.ModuleAccountI) 11 | } 12 | 13 | type BankKeeper interface { 14 | SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error 15 | SendCoinsFromModuleToModule(ctx sdk.Context, senderPool, recipientPool string, amt sdk.Coins) error 16 | GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin 17 | MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error 18 | } 19 | 20 | type StakingKeeper interface { 21 | BondDenom(sdk.Context) string 22 | } 23 | 24 | type DistrKeeper interface { 25 | FundCommunityPool(ctx sdk.Context, amount sdk.Coins, sender sdk.AccAddress) error 26 | } 27 | -------------------------------------------------------------------------------- /lambda/README.md: -------------------------------------------------------------------------------- 1 | # Metrics Handler 2 | 3 | ## SQS Queue Config 4 | Queue should be normal. We do not care about order. 5 | Naming convention 6 | `${ENVIRONMENT}-Analytics` 7 | 8 | The final name of the Queue created in the AWS dashboard should be kept and saved in lambda environment config 9 | 10 | ## Lambda config 11 | Handler function in AWS console should be set to **dist/lambda.handler** 12 | 13 | **Runtime:** node 12.x+ 14 | 15 | ## Lambda build 16 | Do the following: 17 | * `npm install` 18 | * `npm run package` 19 | * Upload the created `lambda.zip` in the AWS lambda console. 20 | 21 | ### Env variables: 22 | SQS_QUEUE_URL should be set to the URL of the created metrics queue. 23 | 24 | ## Putting items on the Queue. 25 | Look at the code in /routes/Metric.ts. This is an example of putting a message in the SQS Queue to be processed by the Metric handler. 26 | 27 | You can run `npm start` and this will launch a webserver. 28 | 29 | ## Environment Variables: 30 | -------------------------------------------------------------------------------- /x/claims/types/message_initial_claim_test.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | import ( 4 | "testing" 5 | 6 | sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" 7 | "github.com/notional-labs/anone/testutil/sample" 8 | "github.com/stretchr/testify/require" 9 | ) 10 | 11 | func TestMsgInitialClaim_ValidateBasic(t *testing.T) { 12 | tests := []struct { 13 | name string 14 | msg MsgInitialClaim 15 | err error 16 | }{ 17 | { 18 | name: "invalid address", 19 | msg: MsgInitialClaim{ 20 | Sender: "invalid_address", 21 | }, 22 | err: sdkerrors.ErrInvalidAddress, 23 | }, { 24 | name: "valid address", 25 | msg: MsgInitialClaim{ 26 | Sender: sample.AccAddress(), 27 | }, 28 | }, 29 | } 30 | for _, tt := range tests { 31 | t.Run(tt.name, func(t *testing.T) { 32 | err := tt.msg.ValidateBasic() 33 | if tt.err != nil { 34 | require.ErrorIs(t, err, tt.err) 35 | return 36 | } 37 | require.NoError(t, err) 38 | }) 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/index.d.ts: -------------------------------------------------------------------------------- 1 | import { StdFee } from "@cosmjs/launchpad"; 2 | import { Registry, OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; 3 | import { Api } from "./rest"; 4 | import { MsgUnjail } from "./types/cosmos/slashing/v1beta1/tx"; 5 | export declare const MissingWalletError: Error; 6 | export declare const registry: Registry; 7 | interface TxClientOptions { 8 | addr: string; 9 | } 10 | interface SignAndBroadcastOptions { 11 | fee: StdFee; 12 | memo?: string; 13 | } 14 | declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ 15 | signAndBroadcast: (msgs: EncodeObject[], { fee, memo }?: SignAndBroadcastOptions) => any; 16 | msgUnjail: (data: MsgUnjail) => EncodeObject; 17 | }>; 18 | interface QueryClientOptions { 19 | addr: string; 20 | } 21 | declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; 22 | export { txClient, queryClient, }; 23 | -------------------------------------------------------------------------------- /vue/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true, 5 | }, 6 | extends: ['plugin:vue/vue3-essential', 'eslint:recommended', 'plugin:prettier/recommended', '@vue/prettier'], 7 | parserOptions: { 8 | parser: '@babel/eslint-parser', 9 | }, 10 | rules: { 11 | 'no-tabs': 'warn', 12 | 'no-console': 'off', 13 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 14 | 'no-unused-vars': 'off', 15 | 'vue/component-name-in-template-casing': ['error', 'PascalCase'], 16 | 'prettier/prettier': [ 17 | 'warn', 18 | { 19 | trailingComma: 'all', 20 | semi: false, 21 | useTabs: false, 22 | singleQuote: true, 23 | printWidth: 120, 24 | endOfLine: 'auto', 25 | }, 26 | ], 27 | }, 28 | overrides: [ 29 | { 30 | files: ['**/__tests__/*.{j,t}s?(x)', '**/tests/unit/**/*.spec.{j,t}s?(x)'], 31 | env: { 32 | jest: true, 33 | }, 34 | }, 35 | ], 36 | } 37 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/index.d.ts: -------------------------------------------------------------------------------- 1 | import { StdFee } from "@cosmjs/launchpad"; 2 | import { Registry, OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; 3 | import { Api } from "./rest"; 4 | import { MsgTransfer } from "./types/ibc/applications/transfer/v1/tx"; 5 | export declare const MissingWalletError: Error; 6 | export declare const registry: Registry; 7 | interface TxClientOptions { 8 | addr: string; 9 | } 10 | interface SignAndBroadcastOptions { 11 | fee: StdFee; 12 | memo?: string; 13 | } 14 | declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ 15 | signAndBroadcast: (msgs: EncodeObject[], { fee, memo }?: SignAndBroadcastOptions) => any; 16 | msgTransfer: (data: MsgTransfer) => EncodeObject; 17 | }>; 18 | interface QueryClientOptions { 19 | addr: string; 20 | } 21 | declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; 22 | export { txClient, queryClient, }; 23 | -------------------------------------------------------------------------------- /x/claims/genesis.go: -------------------------------------------------------------------------------- 1 | package claims 2 | 3 | import ( 4 | "fmt" 5 | 6 | sdk "github.com/cosmos/cosmos-sdk/types" 7 | "github.com/notional-labs/anone/x/claims/keeper" 8 | "github.com/notional-labs/anone/x/claims/types" 9 | ) 10 | 11 | // InitGenesis initializes the capability module's state from a provided genesis 12 | // state. 13 | func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) { 14 | // this line is used by starport scaffolding # genesis/module/init 15 | k.SetParams(ctx, genState.Params) 16 | k.CreateModuleAccount(ctx, genState.ModuleAccountBalance) 17 | k.SetClaimRecords(ctx, genState.ClaimRecords) 18 | fmt.Println(genState) 19 | } 20 | 21 | // ExportGenesis returns the capability module's exported genesis. 22 | func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { 23 | genesis := types.DefaultGenesis() 24 | genesis.Params = k.GetParams(ctx) 25 | 26 | // this line is used by starport scaffolding # genesis/module/export 27 | 28 | return genesis 29 | } 30 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/index.d.ts: -------------------------------------------------------------------------------- 1 | import { StdFee } from "@cosmjs/launchpad"; 2 | import { Registry, OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; 3 | import { Api } from "./rest"; 4 | import { MsgVerifyInvariant } from "./types/cosmos/crisis/v1beta1/tx"; 5 | export declare const MissingWalletError: Error; 6 | export declare const registry: Registry; 7 | interface TxClientOptions { 8 | addr: string; 9 | } 10 | interface SignAndBroadcastOptions { 11 | fee: StdFee; 12 | memo?: string; 13 | } 14 | declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ 15 | signAndBroadcast: (msgs: EncodeObject[], { fee, memo }?: SignAndBroadcastOptions) => any; 16 | msgVerifyInvariant: (data: MsgVerifyInvariant) => EncodeObject; 17 | }>; 18 | interface QueryClientOptions { 19 | addr: string; 20 | } 21 | declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; 22 | export { txClient, queryClient, }; 23 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/index.d.ts: -------------------------------------------------------------------------------- 1 | import { StdFee } from "@cosmjs/launchpad"; 2 | import { Registry, OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; 3 | import { Api } from "./rest"; 4 | import { MsgSubmitEvidence } from "./types/cosmos/evidence/v1beta1/tx"; 5 | export declare const MissingWalletError: Error; 6 | export declare const registry: Registry; 7 | interface TxClientOptions { 8 | addr: string; 9 | } 10 | interface SignAndBroadcastOptions { 11 | fee: StdFee; 12 | memo?: string; 13 | } 14 | declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ 15 | signAndBroadcast: (msgs: EncodeObject[], { fee, memo }?: SignAndBroadcastOptions) => any; 16 | msgSubmitEvidence: (data: MsgSubmitEvidence) => EncodeObject; 17 | }>; 18 | interface QueryClientOptions { 19 | addr: string; 20 | } 21 | declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; 22 | export { txClient, queryClient, }; 23 | -------------------------------------------------------------------------------- /docs/chain-interaction UI/edit_profile.drawio: -------------------------------------------------------------------------------- 1 | 5ZfLbqMwFIafhuVIGIdLl4VJW7VqN8n0MjsLO+DW4MhxhmSevodiCASiptIQRVMpC/s/B1++3z4EC0fZ5lqRZXovKROWY9ONhX9ajoMmjmOVP5tuKyVAdiUkilOTtBNm/C8zYp225pStOolaSqH5sivGMs9ZrDsaUUoW3bSFFN1ZlyRhPWEWE9FXnzjVqVGRd7EL3DCepGbqwPGrQEbqZLOTVUqoLFoSnlo4UlLqqpVtIiZKeDWX6rmrA9FmYYrl+pgH5ovX4u33yzy8Du/ub6fP+tftzQ9cjfKHiLXZsFms3tYElFznlJWD2BYOi5RrNluSuIwW4Dloqc4E9BA0zXBMabY5uE7U7B6ODZMZ02oLKeaBwPAyBwbV/IoWfts2YtpC79UiMZ4nzdg7LNAwZL5Ayf0KJXQSSgjvYfIGMKEBSq4zFiXv/Cg5/ueUfH+IEh6Lkt+j9MgUX5SLvoxj4KN71GD/uotmpZV8Y5EUUoGSyxwywwUXYk8igic5dGPgxUAPS5ocqtulCWSc0nKaQS+6N/8f2OGiPTuCvh1NvWzbMZobwfnVP7x3s5vNtyEFA5AmY0G6OH9I2D4S0mgnqT7aLUohS0kODM4Oljs5EpY3FizUgxUR6D8AsP+3/CHX/bT8eSc9s/2/f/XL6Lt4MFRdT+vBpOfBw9V89Y0cGO8WQHf3ffURa32l4uk7 -------------------------------------------------------------------------------- /docs/chain-interaction UI/profile_management.drawio: -------------------------------------------------------------------------------- 1 | 5ZfLbqMwFIafhuVIGIdLl4VJW7VqN8n0MjsLO+DW4MhxhmSevodiCASiptIQRVMpC/s/B1++3z4EC0fZ5lqRZXovKROWY9ONhX9ajoMmjmOVP5tuKyVAdiUkilOTtBNm/C8zYp225pStOolaSqH5sivGMs9ZrDsaUUoW3bSFFN1ZlyRhPWEWE9FXnzjVqVGRd7EL3DCepGbqwPGrQEbqZLOTVUqoLFoSnlo4UlLqqpVtIiZKeDWX6rmrA9FmYYrl+pgH5ovX4u33yzy8Du/ub6fP+tftzQ9cjfKHiLXZsFms3tYElFznlJWD2BYOi5RrNluSuIwW4Dloqc4E9BA0zXBMabY5uE7U7B6ODZMZ02oLKeaBwPAyBwbV/IoWfts2YtpC79UiMZ4nzdg7LNAwZL5Ayf0KJXQSSgjvYfIGMKEBSq4zFiXv/Cg5/ueUfH+IEh6Lkt+j9MgUX5SLvoxj4KN71GD/uotmpZV8Y5EUUoGSyxwywwUXYk8igic5dGPgxUAPS5ocqtulCWSc0nKaQS+6N/8f2OGiPTuCvh1NvWzbMZobwfnVP7x3s5vNtyEFA5AmY0G6OH9I2D4S0mgnqT7aLUohS0kODM4Oljs5EpY3FizUgxUR6D8AsP+3/CHX/bT8eSc9s/2/f/XL6Lt4MFRdT+vBpOfBw9V89Y0cGO8WQHf3ffURa32l4uk7 -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/index.d.ts: -------------------------------------------------------------------------------- 1 | import { StdFee } from "@cosmjs/launchpad"; 2 | import { Registry, OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; 3 | import { Api } from "./rest"; 4 | import { MsgCreateVestingAccount } from "./types/cosmos/vesting/v1beta1/tx"; 5 | export declare const MissingWalletError: Error; 6 | export declare const registry: Registry; 7 | interface TxClientOptions { 8 | addr: string; 9 | } 10 | interface SignAndBroadcastOptions { 11 | fee: StdFee; 12 | memo?: string; 13 | } 14 | declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ 15 | signAndBroadcast: (msgs: EncodeObject[], { fee, memo }?: SignAndBroadcastOptions) => any; 16 | msgCreateVestingAccount: (data: MsgCreateVestingAccount) => EncodeObject; 17 | }>; 18 | interface QueryClientOptions { 19 | addr: string; 20 | } 21 | declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; 22 | export { txClient, queryClient, }; 23 | -------------------------------------------------------------------------------- /x/claims/client/cli/tx_initial_claim.go: -------------------------------------------------------------------------------- 1 | package cli 2 | 3 | import ( 4 | "strconv" 5 | 6 | "github.com/spf13/cobra" 7 | 8 | "github.com/cosmos/cosmos-sdk/client" 9 | "github.com/cosmos/cosmos-sdk/client/flags" 10 | "github.com/cosmos/cosmos-sdk/client/tx" 11 | "github.com/notional-labs/anone/x/claims/types" 12 | ) 13 | 14 | var _ = strconv.Itoa(0) 15 | 16 | func CmdInitialClaim() *cobra.Command { 17 | cmd := &cobra.Command{ 18 | Use: "initial-claim", 19 | Short: "Claim Initial Amount", 20 | Args: cobra.ExactArgs(0), 21 | RunE: func(cmd *cobra.Command, args []string) (err error) { 22 | clientCtx, err := client.GetClientTxContext(cmd) 23 | if err != nil { 24 | return err 25 | } 26 | 27 | msg := types.NewMsgInitialClaim( 28 | clientCtx.GetFromAddress().String(), 29 | ) 30 | 31 | if err := msg.ValidateBasic(); err != nil { 32 | return err 33 | } 34 | return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) 35 | }, 36 | } 37 | 38 | flags.AddTxFlagsToCmd(cmd) 39 | 40 | return cmd 41 | } 42 | -------------------------------------------------------------------------------- /lambda/src/util.ts: -------------------------------------------------------------------------------- 1 | import AWS from "aws-sdk"; 2 | 3 | export async function deleteMessage(sqs: AWS.SQS,queueURL: string, message: AWS.SQS.Types.Message) { 4 | return new Promise((resolve, reject) => { 5 | const deleteParams: any = { 6 | QueueUrl: queueURL, 7 | }; 8 | // Have to do this because AWS lowercases the param name and types are wrong. WTF. 9 | // eslint-disable-next-line @typescript-eslint/ban-ts-comment 10 | // @ts-ignore 11 | deleteParams.ReceiptHandle = message.ReceiptHandle || message.receiptHandle 12 | console.log(message); 13 | sqs.deleteMessage(deleteParams, function (err, data) { 14 | if (err) { 15 | console.log(`Delete Error with queue: ${queueURL}`, err); 16 | reject(err); 17 | return; 18 | } else { 19 | console.log("Message Deleted", data); 20 | resolve(data); 21 | return; 22 | } 23 | reject("Cannot delete"); 24 | return; 25 | }); 26 | }) 27 | } -------------------------------------------------------------------------------- /x/claims/keeper/msg_server_initial_claim.go: -------------------------------------------------------------------------------- 1 | package keeper 2 | 3 | import ( 4 | "context" 5 | 6 | sdk "github.com/cosmos/cosmos-sdk/types" 7 | "github.com/notional-labs/anone/x/claims/types" 8 | ) 9 | 10 | func (k msgServer) InitialClaim(goCtx context.Context, msg *types.MsgInitialClaim) (*types.MsgInitialClaimResponse, error) { 11 | ctx := sdk.UnwrapSDKContext(goCtx) 12 | sender, err := sdk.AccAddressFromBech32(msg.Sender) 13 | if err != nil { 14 | return nil, err 15 | } 16 | params := k.GetParams(ctx) 17 | if !params.IsAirdropEnabled(ctx.BlockTime()) { 18 | return nil, types.ErrAirdropNotEnabled 19 | } 20 | coins, err := k.Keeper.ClaimCoinsForAction(ctx, sender, types.ActionInitialClaim) 21 | if err != nil { 22 | return nil, err 23 | } 24 | ctx.EventManager().EmitEvents(sdk.Events{ 25 | sdk.NewEvent( 26 | sdk.EventTypeMessage, 27 | sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), 28 | sdk.NewAttribute(sdk.AttributeKeySender, msg.Sender), 29 | ), 30 | }) 31 | return &types.MsgInitialClaimResponse{ 32 | ClaimedAmount: coins, 33 | }, nil 34 | } 35 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/crypto/keys.d.ts: -------------------------------------------------------------------------------- 1 | import { Writer, Reader } from 'protobufjs/minimal'; 2 | export declare const protobufPackage = "tendermint.crypto"; 3 | /** PublicKey defines the keys available for use with Tendermint Validators */ 4 | export interface PublicKey { 5 | ed25519: Uint8Array | undefined; 6 | secp256k1: Uint8Array | undefined; 7 | } 8 | export declare const PublicKey: { 9 | encode(message: PublicKey, writer?: Writer): Writer; 10 | decode(input: Reader | Uint8Array, length?: number): PublicKey; 11 | fromJSON(object: any): PublicKey; 12 | toJSON(message: PublicKey): unknown; 13 | fromPartial(object: DeepPartial): PublicKey; 14 | }; 15 | declare type Builtin = Date | Function | Uint8Array | string | number | undefined; 16 | export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { 17 | [K in keyof T]?: DeepPartial; 18 | } : Partial; 19 | export {}; 20 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/crypto/keys.d.ts: -------------------------------------------------------------------------------- 1 | import { Writer, Reader } from 'protobufjs/minimal'; 2 | export declare const protobufPackage = "tendermint.crypto"; 3 | /** PublicKey defines the keys available for use with Tendermint Validators */ 4 | export interface PublicKey { 5 | ed25519: Uint8Array | undefined; 6 | secp256k1: Uint8Array | undefined; 7 | } 8 | export declare const PublicKey: { 9 | encode(message: PublicKey, writer?: Writer): Writer; 10 | decode(input: Reader | Uint8Array, length?: number): PublicKey; 11 | fromJSON(object: any): PublicKey; 12 | toJSON(message: PublicKey): unknown; 13 | fromPartial(object: DeepPartial): PublicKey; 14 | }; 15 | declare type Builtin = Date | Function | Uint8Array | string | number | undefined; 16 | export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { 17 | [K in keyof T]?: DeepPartial; 18 | } : Partial; 19 | export {}; 20 | -------------------------------------------------------------------------------- /proto/claims/genesis.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package notionallabs.anone.claims; 3 | 4 | import "gogoproto/gogo.proto"; 5 | import "cosmos/base/v1beta1/coin.proto"; 6 | import "claims/params.proto"; 7 | import "claims/claim_record.proto"; 8 | 9 | option go_package = "github.com/notional-labs/anone/x/claims/types"; 10 | 11 | // GenesisState defines the claims module's genesis state. 12 | message GenesisState { 13 | // this line is used by starport scaffolding # genesis/proto/state 14 | // balance of the claim module's account 15 | cosmos.base.v1beta1.Coin module_account_balance = 1 [ 16 | (gogoproto.moretags) = "yaml:\"module_account_balance\"", 17 | (gogoproto.nullable) = false 18 | ]; 19 | 20 | // params defines all the parameters of the module. 21 | Params params = 2 [ 22 | (gogoproto.moretags) = "yaml:\"params\"", 23 | (gogoproto.nullable) = false 24 | ]; 25 | 26 | // list of claim records, one for every airdrop recipient 27 | repeated ClaimRecord claim_records = 3 [ 28 | (gogoproto.moretags) = "yaml:\"claim_records\"", 29 | (gogoproto.nullable) = false 30 | ]; 31 | } 32 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/index.d.ts: -------------------------------------------------------------------------------- 1 | import { StdFee } from "@cosmjs/launchpad"; 2 | import { Registry, OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; 3 | import { Api } from "./rest"; 4 | import { MsgMultiSend } from "./types/cosmos/bank/v1beta1/tx"; 5 | import { MsgSend } from "./types/cosmos/bank/v1beta1/tx"; 6 | export declare const MissingWalletError: Error; 7 | export declare const registry: Registry; 8 | interface TxClientOptions { 9 | addr: string; 10 | } 11 | interface SignAndBroadcastOptions { 12 | fee: StdFee; 13 | memo?: string; 14 | } 15 | declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ 16 | signAndBroadcast: (msgs: EncodeObject[], { fee, memo }?: SignAndBroadcastOptions) => any; 17 | msgMultiSend: (data: MsgMultiSend) => EncodeObject; 18 | msgSend: (data: MsgSend) => EncodeObject; 19 | }>; 20 | interface QueryClientOptions { 21 | addr: string; 22 | } 23 | declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; 24 | export { txClient, queryClient, }; 25 | -------------------------------------------------------------------------------- /anone-cw721/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "anone-cw721" 3 | description = "An implementation of cw721 for Anone project" 4 | version = "0.1.0" 5 | authors = ["Nguyen The Vinh "] 6 | edition = "2021" 7 | repository = "https://github.com/notional-labs/anone" 8 | 9 | exclude = [ 10 | # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. 11 | "artifacts/*", 12 | ] 13 | 14 | [lib] 15 | crate-type = ["cdylib", "rlib"] 16 | 17 | [features] 18 | # for more explicit tests, cargo test --features=backtraces 19 | backtraces = ["cosmwasm-std/backtraces"] 20 | # use library feature to disable all instantiate/execute/query exports 21 | library = [] 22 | 23 | [dependencies] 24 | cw721 = "0.11.0" 25 | cw721-base = { version = "0.11.0", features = ["library"] } 26 | cosmwasm-std = { version = "1.0.0-beta" } 27 | schemars = "0.8" 28 | serde = { version = "1.0.130", default-features = false, features = ["derive"] } 29 | thiserror = { version = "1.0.30" } 30 | 31 | [dev-dependencies] 32 | cosmwasm-schema = { version = "1.0.0-beta3" } -------------------------------------------------------------------------------- /proto/claims/claim_record.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package notionallabs.anone.claims; 3 | 4 | import "gogoproto/gogo.proto"; 5 | import "cosmos/base/v1beta1/coin.proto"; 6 | 7 | option go_package = "github.com/notional-labs/anone/x/claims/types"; 8 | 9 | enum Action { 10 | option (gogoproto.goproto_enum_prefix) = false; 11 | 12 | ActionInitialClaim = 0; 13 | ActionMintNFT = 1; 14 | ActionVote = 2; 15 | ActionDelegateStake = 3; 16 | } 17 | 18 | message ClaimRecord { 19 | // address of claim user 20 | string address = 1 [ (gogoproto.moretags) = "yaml:\"address\"" ]; 21 | 22 | // total initial claimable amount for the user 23 | repeated cosmos.base.v1beta1.Coin initial_claimable_amount = 2 [ 24 | (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", 25 | (gogoproto.nullable) = false, 26 | (gogoproto.moretags) = "yaml:\"initial_claimable_amount\"" 27 | ]; 28 | 29 | // true if action is completed 30 | // index of bool in array refers to action enum # 31 | repeated bool action_completed = 4 [ 32 | (gogoproto.moretags) = "yaml:\"action_completed\"", 33 | (gogoproto.nullable) = false 34 | ]; 35 | } 36 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/types/cosmos/feegrant/v1beta1/genesis.d.ts: -------------------------------------------------------------------------------- 1 | import { Grant } from '../../../cosmos/feegrant/v1beta1/feegrant'; 2 | import { Writer, Reader } from 'protobufjs/minimal'; 3 | export declare const protobufPackage = "cosmos.feegrant.v1beta1"; 4 | /** GenesisState contains a set of fee allowances, persisted from the store */ 5 | export interface GenesisState { 6 | allowances: Grant[]; 7 | } 8 | export declare const GenesisState: { 9 | encode(message: GenesisState, writer?: Writer): Writer; 10 | decode(input: Reader | Uint8Array, length?: number): GenesisState; 11 | fromJSON(object: any): GenesisState; 12 | toJSON(message: GenesisState): unknown; 13 | fromPartial(object: DeepPartial): GenesisState; 14 | }; 15 | declare type Builtin = Date | Function | Uint8Array | string | number | undefined; 16 | export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { 17 | [K in keyof T]?: DeepPartial; 18 | } : Partial; 19 | export {}; 20 | -------------------------------------------------------------------------------- /vue/src/App.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 20 | 21 | 52 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/index.d.ts: -------------------------------------------------------------------------------- 1 | import { StdFee } from "@cosmjs/launchpad"; 2 | import { Registry, OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; 3 | import { Api } from "./rest"; 4 | import { MsgGrantAllowance } from "./types/cosmos/feegrant/v1beta1/tx"; 5 | import { MsgRevokeAllowance } from "./types/cosmos/feegrant/v1beta1/tx"; 6 | export declare const MissingWalletError: Error; 7 | export declare const registry: Registry; 8 | interface TxClientOptions { 9 | addr: string; 10 | } 11 | interface SignAndBroadcastOptions { 12 | fee: StdFee; 13 | memo?: string; 14 | } 15 | declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ 16 | signAndBroadcast: (msgs: EncodeObject[], { fee, memo }?: SignAndBroadcastOptions) => any; 17 | msgGrantAllowance: (data: MsgGrantAllowance) => EncodeObject; 18 | msgRevokeAllowance: (data: MsgRevokeAllowance) => EncodeObject; 19 | }>; 20 | interface QueryClientOptions { 21 | addr: string; 22 | } 23 | declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; 24 | export { txClient, queryClient, }; 25 | -------------------------------------------------------------------------------- /x/claims/types/codec.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | import ( 4 | "github.com/cosmos/cosmos-sdk/codec" 5 | cdctypes "github.com/cosmos/cosmos-sdk/codec/types" 6 | 7 | cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" 8 | 9 | // this line is used by starport scaffolding # 1 10 | "github.com/cosmos/cosmos-sdk/types/msgservice" 11 | 12 | sdk "github.com/cosmos/cosmos-sdk/types" 13 | ) 14 | 15 | func RegisterCodec(cdc *codec.LegacyAmino) { 16 | cdc.RegisterConcrete(&MsgInitialClaim{}, "claim/InitialClaim", nil) 17 | cdc.RegisterConcrete(&MsgClaimFor{}, "claim/ClaimFor", nil) 18 | // this line is used by starport scaffolding # 2 19 | } 20 | 21 | func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { 22 | registry.RegisterImplementations((*sdk.Msg)(nil), 23 | &MsgInitialClaim{}, 24 | &MsgClaimFor{}, 25 | ) 26 | 27 | // this line is used by starport scaffolding # 3 28 | msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) 29 | } 30 | 31 | var ( 32 | amino = codec.NewLegacyAmino() 33 | ModuleCdc = codec.NewAminoCodec(amino) 34 | ) 35 | 36 | func init() { 37 | RegisterCodec(amino) 38 | cryptocodec.RegisterCrypto(amino) 39 | amino.Seal() 40 | } 41 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/genesis.d.ts: -------------------------------------------------------------------------------- 1 | import { Any } from '../../../google/protobuf/any'; 2 | import { Writer, Reader } from 'protobufjs/minimal'; 3 | export declare const protobufPackage = "cosmos.evidence.v1beta1"; 4 | /** GenesisState defines the evidence module's genesis state. */ 5 | export interface GenesisState { 6 | /** evidence defines all the evidence at genesis. */ 7 | evidence: Any[]; 8 | } 9 | export declare const GenesisState: { 10 | encode(message: GenesisState, writer?: Writer): Writer; 11 | decode(input: Reader | Uint8Array, length?: number): GenesisState; 12 | fromJSON(object: any): GenesisState; 13 | toJSON(message: GenesisState): unknown; 14 | fromPartial(object: DeepPartial): GenesisState; 15 | }; 16 | declare type Builtin = Date | Function | Uint8Array | string | number | undefined; 17 | export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { 18 | [K in keyof T]?: DeepPartial; 19 | } : Partial; 20 | export {}; 21 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/types/cosmos/bank/v1beta1/authz.d.ts: -------------------------------------------------------------------------------- 1 | import { Coin } from '../../../cosmos/base/v1beta1/coin'; 2 | import { Writer, Reader } from 'protobufjs/minimal'; 3 | export declare const protobufPackage = "cosmos.bank.v1beta1"; 4 | /** 5 | * SendAuthorization allows the grantee to spend up to spend_limit coins from 6 | * the granter's account. 7 | */ 8 | export interface SendAuthorization { 9 | spendLimit: Coin[]; 10 | } 11 | export declare const SendAuthorization: { 12 | encode(message: SendAuthorization, writer?: Writer): Writer; 13 | decode(input: Reader | Uint8Array, length?: number): SendAuthorization; 14 | fromJSON(object: any): SendAuthorization; 15 | toJSON(message: SendAuthorization): unknown; 16 | fromPartial(object: DeepPartial): SendAuthorization; 17 | }; 18 | declare type Builtin = Date | Function | Uint8Array | string | number | undefined; 19 | export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { 20 | [K in keyof T]?: DeepPartial; 21 | } : Partial; 22 | export {}; 23 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/types/cosmos/evidence/v1beta1/evidence.d.ts: -------------------------------------------------------------------------------- 1 | import { Writer, Reader } from 'protobufjs/minimal'; 2 | export declare const protobufPackage = "cosmos.evidence.v1beta1"; 3 | /** 4 | * Equivocation implements the Evidence interface and defines evidence of double 5 | * signing misbehavior. 6 | */ 7 | export interface Equivocation { 8 | height: number; 9 | time: Date | undefined; 10 | power: number; 11 | consensusAddress: string; 12 | } 13 | export declare const Equivocation: { 14 | encode(message: Equivocation, writer?: Writer): Writer; 15 | decode(input: Reader | Uint8Array, length?: number): Equivocation; 16 | fromJSON(object: any): Equivocation; 17 | toJSON(message: Equivocation): unknown; 18 | fromPartial(object: DeepPartial): Equivocation; 19 | }; 20 | declare type Builtin = Date | Function | Uint8Array | string | number | undefined; 21 | export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { 22 | [K in keyof T]?: DeepPartial; 23 | } : Partial; 24 | export {}; 25 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/index.d.ts: -------------------------------------------------------------------------------- 1 | import { StdFee } from "@cosmjs/launchpad"; 2 | import { Registry, OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; 3 | import { Api } from "./rest"; 4 | import { MsgGrant } from "./types/cosmos/authz/v1beta1/tx"; 5 | import { MsgExec } from "./types/cosmos/authz/v1beta1/tx"; 6 | import { MsgRevoke } from "./types/cosmos/authz/v1beta1/tx"; 7 | export declare const MissingWalletError: Error; 8 | export declare const registry: Registry; 9 | interface TxClientOptions { 10 | addr: string; 11 | } 12 | interface SignAndBroadcastOptions { 13 | fee: StdFee; 14 | memo?: string; 15 | } 16 | declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ 17 | signAndBroadcast: (msgs: EncodeObject[], { fee, memo }?: SignAndBroadcastOptions) => any; 18 | msgGrant: (data: MsgGrant) => EncodeObject; 19 | msgExec: (data: MsgExec) => EncodeObject; 20 | msgRevoke: (data: MsgRevoke) => EncodeObject; 21 | }>; 22 | interface QueryClientOptions { 23 | addr: string; 24 | } 25 | declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; 26 | export { txClient, queryClient, }; 27 | -------------------------------------------------------------------------------- /x/claims/types/genesis.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | import ( 4 | sdk "github.com/cosmos/cosmos-sdk/types" 5 | ) 6 | 7 | // this line is used by starport scaffolding # genesis/types/import 8 | 9 | // DefaultIndex is the default capability global index 10 | const DefaultIndex uint64 = 1 11 | 12 | // DefaultGenesis returns the default Capability genesis state 13 | func DefaultGenesis() *GenesisState { 14 | return &GenesisState{ 15 | // this line is used by starport scaffolding # genesis/types/default 16 | ModuleAccountBalance: sdk.NewCoin(DefaultClaimDenom, sdk.ZeroInt()), 17 | Params: DefaultParams(), 18 | ClaimRecords: make([]ClaimRecord, 0), 19 | } 20 | } 21 | 22 | // Validate performs basic genesis state validation returning an error upon any 23 | // failure. 24 | func (gs GenesisState) Validate() error { 25 | // this line is used by starport scaffolding # genesis/types/validate 26 | totalClaimable := sdk.Coins{} 27 | for _, claimRecord := range gs.ClaimRecords { 28 | totalClaimable = totalClaimable.Add(claimRecord.InitialClaimableAmount...) 29 | } 30 | 31 | if !totalClaimable.IsEqual(sdk.NewCoins(gs.ModuleAccountBalance)) { 32 | return ErrIncorrectModuleAccountBalance 33 | } 34 | return nil 35 | } 36 | -------------------------------------------------------------------------------- /x/claims/types/message_initial_claim.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | import ( 4 | sdk "github.com/cosmos/cosmos-sdk/types" 5 | sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" 6 | ) 7 | 8 | var _ sdk.Msg = &MsgInitialClaim{} 9 | 10 | // msg types 11 | const ( 12 | TypeMsgInitialClaim = "initial_claim" 13 | ) 14 | 15 | func NewMsgInitialClaim(sender string) *MsgInitialClaim { 16 | return &MsgInitialClaim{ 17 | Sender: sender, 18 | } 19 | } 20 | 21 | func (msg MsgInitialClaim) Route() string { 22 | return RouterKey 23 | } 24 | 25 | func (msg MsgInitialClaim) Type() string { 26 | return TypeMsgInitialClaim 27 | } 28 | 29 | func (msg MsgInitialClaim) GetSigners() []sdk.AccAddress { 30 | sender, err := sdk.AccAddressFromBech32(msg.Sender) 31 | if err != nil { 32 | panic(err) 33 | } 34 | return []sdk.AccAddress{sender} 35 | } 36 | 37 | func (msg MsgInitialClaim) GetSignBytes() []byte { 38 | bz := ModuleCdc.MustMarshalJSON(&msg) 39 | return sdk.MustSortJSON(bz) 40 | } 41 | 42 | func (msg MsgInitialClaim) ValidateBasic() error { 43 | _, err := sdk.AccAddressFromBech32(msg.Sender) 44 | if err != nil { 45 | return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid sender address (%s)", err) 46 | } 47 | return nil 48 | } 49 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/types/ibc/applications/transfer/v1/genesis.d.ts: -------------------------------------------------------------------------------- 1 | import { DenomTrace, Params } from '../../../../ibc/applications/transfer/v1/transfer'; 2 | import { Writer, Reader } from 'protobufjs/minimal'; 3 | export declare const protobufPackage = "ibc.applications.transfer.v1"; 4 | /** GenesisState defines the ibc-transfer genesis state */ 5 | export interface GenesisState { 6 | portId: string; 7 | denomTraces: DenomTrace[]; 8 | params: Params | undefined; 9 | } 10 | export declare const GenesisState: { 11 | encode(message: GenesisState, writer?: Writer): Writer; 12 | decode(input: Reader | Uint8Array, length?: number): GenesisState; 13 | fromJSON(object: any): GenesisState; 14 | toJSON(message: GenesisState): unknown; 15 | fromPartial(object: DeepPartial): GenesisState; 16 | }; 17 | declare type Builtin = Date | Function | Uint8Array | string | number | undefined; 18 | export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { 19 | [K in keyof T]?: DeepPartial; 20 | } : Partial; 21 | export {}; 22 | -------------------------------------------------------------------------------- /vue/src/scss/app.scss: -------------------------------------------------------------------------------- 1 | //Your custom styles here 2 | $rich-blue:#4A68BC; 3 | $light-blue: #7C9AEE; 4 | $toxic-green: #77fa4c; 5 | $teal: #3B9189; 6 | 7 | 8 | .sp-sidebar { 9 | background-color: #000!important; 10 | color: #fff; 11 | } 12 | 13 | .sp-fill { 14 | background: #000; 15 | } 16 | 17 | h3 { 18 | color: $toxic-green; 19 | font-family: Helvetica, sans-serif; 20 | font-weight:100; 21 | text-transform: uppercase; 22 | } 23 | 24 | .sp-button { 25 | margin-right: 1rem; 26 | } 27 | 28 | .sp-button.sp-button-primary { 29 | background: $toxic-green; 30 | border: 0.2rem solid darken($toxic-green, 30%); 31 | color: #111; 32 | } 33 | 34 | .sp-sidebar a { 35 | color: $rich-blue; 36 | } 37 | .sp-sidebar .sp-link-icon { 38 | color: $rich-blue; 39 | } 40 | .sp-link-icon__text { color:$rich-blue!important;} 41 | .sp-link-icon a { 42 | color:$rich-blue; 43 | } 44 | .sp-icon { 45 | color:$rich-blue; 46 | } 47 | 48 | .sp-link-icon a:hover { 49 | color:$light-blue; 50 | .sp-icon { 51 | color:$light-blue; 52 | } 53 | } 54 | 55 | .logo { 56 | width:100%; 57 | } 58 | 59 | //.sp-fill { 60 | // color: white; 61 | // background: black; 62 | //} 63 | 64 | a { 65 | color: $rich-blue; 66 | } 67 | a:hover { 68 | color: $light-blue; 69 | } 70 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/types/cosmos/crisis/v1beta1/genesis.d.ts: -------------------------------------------------------------------------------- 1 | import { Coin } from '../../../cosmos/base/v1beta1/coin'; 2 | import { Writer, Reader } from 'protobufjs/minimal'; 3 | export declare const protobufPackage = "cosmos.crisis.v1beta1"; 4 | /** GenesisState defines the crisis module's genesis state. */ 5 | export interface GenesisState { 6 | /** 7 | * constant_fee is the fee used to verify the invariant in the crisis 8 | * module. 9 | */ 10 | constantFee: Coin | undefined; 11 | } 12 | export declare const GenesisState: { 13 | encode(message: GenesisState, writer?: Writer): Writer; 14 | decode(input: Reader | Uint8Array, length?: number): GenesisState; 15 | fromJSON(object: any): GenesisState; 16 | toJSON(message: GenesisState): unknown; 17 | fromPartial(object: DeepPartial): GenesisState; 18 | }; 19 | declare type Builtin = Date | Function | Uint8Array | string | number | undefined; 20 | export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { 21 | [K in keyof T]?: DeepPartial; 22 | } : Partial; 23 | export {}; 24 | -------------------------------------------------------------------------------- /x/claims/handler.go: -------------------------------------------------------------------------------- 1 | package claims 2 | 3 | import ( 4 | "fmt" 5 | 6 | sdk "github.com/cosmos/cosmos-sdk/types" 7 | sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" 8 | "github.com/notional-labs/anone/x/claims/keeper" 9 | "github.com/notional-labs/anone/x/claims/types" 10 | ) 11 | 12 | // NewHandler ... 13 | func NewHandler(k keeper.Keeper) sdk.Handler { 14 | // this line is used by starport scaffolding # handler/msgServer 15 | msgServer := keeper.NewMsgServerImpl(k) 16 | // this line is used by starport scaffolding # handler/msgServer 17 | 18 | return func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { 19 | ctx = ctx.WithEventManager(sdk.NewEventManager()) 20 | switch msg := msg.(type) { 21 | case *types.MsgInitialClaim: 22 | res, err := msgServer.InitialClaim(sdk.WrapSDKContext(ctx), msg) 23 | return sdk.WrapServiceResult(ctx, res, err) 24 | case *types.MsgClaimFor: 25 | res, err := msgServer.ClaimFor(sdk.WrapSDKContext(ctx), msg) 26 | return sdk.WrapServiceResult(ctx, res, err) 27 | // this line is used by starport scaffolding # 1 28 | default: 29 | errMsg := fmt.Sprintf("unrecognized %s message type: %T", types.ModuleName, msg) 30 | return nil, sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, errMsg) 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /x/claims/types/message_claim_for.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | import ( 4 | sdk "github.com/cosmos/cosmos-sdk/types" 5 | sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" 6 | ) 7 | 8 | var _ sdk.Msg = &MsgClaimFor{} 9 | 10 | // msg types 11 | const ( 12 | TypeMsgClaimFor = "claim_for" 13 | ) 14 | 15 | func NewMsgClaimFor(sender string, address string, action Action) *MsgClaimFor { 16 | return &MsgClaimFor{ 17 | Sender: sender, 18 | Address: address, 19 | Action: action, 20 | } 21 | } 22 | 23 | func (msg *MsgClaimFor) Route() string { 24 | return RouterKey 25 | } 26 | 27 | func (msg *MsgClaimFor) Type() string { 28 | return TypeMsgClaimFor 29 | } 30 | 31 | func (msg *MsgClaimFor) GetSigners() []sdk.AccAddress { 32 | sender, err := sdk.AccAddressFromBech32(msg.Sender) 33 | if err != nil { 34 | panic(err) 35 | } 36 | return []sdk.AccAddress{sender} 37 | } 38 | 39 | func (msg *MsgClaimFor) GetSignBytes() []byte { 40 | bz := ModuleCdc.MustMarshalJSON(msg) 41 | return sdk.MustSortJSON(bz) 42 | } 43 | 44 | func (msg *MsgClaimFor) ValidateBasic() error { 45 | _, err := sdk.AccAddressFromBech32(msg.Sender) 46 | if err != nil { 47 | return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid sender address (%s)", err) 48 | } 49 | return nil 50 | } 51 | -------------------------------------------------------------------------------- /lambda/src/preStart.ts: -------------------------------------------------------------------------------- 1 | import dotenv from 'dotenv'; 2 | import commandLineArgs from 'command-line-args'; 3 | import {Connection, Error} from "mongoose"; 4 | import mongoose from "mongoose"; 5 | 6 | // Setup command line options 7 | const options = commandLineArgs([ 8 | { 9 | name: 'env', 10 | alias: 'e', 11 | defaultValue: 'development', 12 | type: String, 13 | }, 14 | ]); 15 | 16 | // Set the env file 17 | dotenv.config(); 18 | 19 | let conn:Promise | Connection; 20 | let connection: Connection; 21 | // eslint-disable-next-line max-len 22 | const uri = process.env.MONGODB_URI as string; // 23 | if(!uri) { 24 | throw new Error("No mongo uri"); 25 | } 26 | mongoose.set('useFindAndModify', false); 27 | mongoose.set('useCreateIndex', true); 28 | mongoose.set('useNewUrlParser', true); 29 | mongoose.set('useUnifiedTopology', true); 30 | mongoose.connect(uri); 31 | mongoose.connection.on('connected', () => { 32 | console.log('Connected to mongo'); 33 | }); 34 | mongoose.connection.on('error', (err) => { 35 | console.error(err); 36 | console.log(process.env.MONGODB_URI); 37 | console.log('%s MongoDB connection error. Please make sure MongoDB is running.'); 38 | process.exit(); 39 | }); 40 | 41 | -------------------------------------------------------------------------------- /vue/src/components/Sidebar.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 36 | -------------------------------------------------------------------------------- /keplr_suggestion.txt: -------------------------------------------------------------------------------- 1 | window.keplr.experimentalSuggestChain({ 2 | chainId: "anoned-1", 3 | chainName: "Anone Test Net", 4 | rpc: "http://127.0.0.1:26657", 5 | rest: "http://127.0.0.1:1317", 6 | bip44: { 7 | coinType: 118, 8 | }, 9 | bech32Config: { 10 | bech32PrefixAccAddr: "one", 11 | bech32PrefixAccPub: "one" + "pub", 12 | bech32PrefixValAddr: "one" + "valoper", 13 | bech32PrefixValPub: "one" + "valoperpub", 14 | bech32PrefixConsAddr: "one" + "valcons", 15 | bech32PrefixConsPub: "one" + "valconspub", 16 | }, 17 | currencies: [ 18 | { 19 | coinDenom: "ONE", 20 | coinMinimalDenom: "uone", 21 | coinDecimals: 6, 22 | coinGeckoId: "fuck", 23 | }, 24 | ], 25 | feeCurrencies: [ 26 | { 27 | coinDenom: "ONE", 28 | coinMinimalDenom: "uone", 29 | coinDecimals: 6, 30 | coinGeckoId: "fuck", 31 | }, 32 | ], 33 | stakeCurrency: { 34 | coinDenom: "ONE", 35 | coinMinimalDenom: "uone", 36 | coinDecimals: 6, 37 | coinGeckoId: "fuck", 38 | }, 39 | coinType: 118, 40 | gasPriceStep: { 41 | low: 0.01, 42 | average: 0.025, 43 | high: 0.03, 44 | }, 45 | }); -------------------------------------------------------------------------------- /lambda/src/event-sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0", 3 | "routeKey": "ANY /nodejs-apig-function-1G3XMPLZXVXYI", 4 | "rawPath": "/default/nodejs-apig-function-1G3XMPLZXVXYI", 5 | "rawQueryString": "", 6 | "cookies": [ 7 | "s_fid=7AABXMPL1AFD9BBF-0643XMPL09956DE2", 8 | "regStatus=pre-register" 9 | ], 10 | "headers": { 11 | "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", 12 | "accept-encoding": "gzip, deflate, br" 13 | }, 14 | "requestContext": { 15 | "accountId": "123456789012", 16 | "apiId": "r3pmxmplak", 17 | "domainName": "r3pmxmplak.execute-api.us-east-2.amazonaws.com", 18 | "domainPrefix": "r3pmxmplak", 19 | "http": { 20 | "method": "GET", 21 | "path": "/default/nodejs-apig-function-1G3XMPLZXVXYI", 22 | "protocol": "HTTP/1.1", 23 | "sourceIp": "205.255.255.176", 24 | "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36" 25 | }, 26 | "requestId": "JKJaXmPLvHcESHA=", 27 | "routeKey": "ANY /nodejs-apig-function-1G3XMPLZXVXYI", 28 | "stage": "default", 29 | "time": "10/Mar/2020:05:16:23 +0000", 30 | "timeEpoch": 1583817383220 31 | }, 32 | "isBase64Encoded": true 33 | } 34 | -------------------------------------------------------------------------------- /x/claims/types/genesis_test.go: -------------------------------------------------------------------------------- 1 | package types_test 2 | 3 | import ( 4 | "testing" 5 | "time" 6 | 7 | sdk "github.com/cosmos/cosmos-sdk/types" 8 | 9 | "github.com/notional-labs/anone/x/claims/types" 10 | "github.com/stretchr/testify/require" 11 | ) 12 | 13 | func TestGenesisState_Validate(t *testing.T) { 14 | for _, tc := range []struct { 15 | desc string 16 | genState *types.GenesisState 17 | valid bool 18 | }{ 19 | { 20 | desc: "default is valid", 21 | genState: types.DefaultGenesis(), 22 | valid: true, 23 | }, 24 | { 25 | desc: "valid genesis state", 26 | genState: &types.GenesisState{ 27 | ModuleAccountBalance: sdk.NewCoin(sdk.DefaultBondDenom, sdk.ZeroInt()), 28 | Params: types.Params{ 29 | AirdropEnabled: true, 30 | AirdropStartTime: time.Time{}, 31 | DurationUntilDecay: time.Hour * 24 * 60, 32 | DurationOfDecay: time.Hour * 24 * 30 * 4, 33 | ClaimDenom: sdk.DefaultBondDenom, 34 | }, 35 | ClaimRecords: []types.ClaimRecord{}, 36 | }, 37 | valid: true, 38 | }, 39 | // this line is used by starport scaffolding # types/genesis/testcase 40 | } { 41 | t.Run(tc.desc, func(t *testing.T) { 42 | err := tc.genState.Validate() 43 | if tc.valid { 44 | require.NoError(t, err) 45 | } else { 46 | require.Error(t, err) 47 | } 48 | }) 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/index.d.ts: -------------------------------------------------------------------------------- 1 | import { StdFee } from "@cosmjs/launchpad"; 2 | import { Registry, OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; 3 | import { Api } from "./rest"; 4 | import { MsgVoteWeighted } from "./types/cosmos/gov/v1beta1/tx"; 5 | import { MsgDeposit } from "./types/cosmos/gov/v1beta1/tx"; 6 | import { MsgSubmitProposal } from "./types/cosmos/gov/v1beta1/tx"; 7 | import { MsgVote } from "./types/cosmos/gov/v1beta1/tx"; 8 | export declare const MissingWalletError: Error; 9 | export declare const registry: Registry; 10 | interface TxClientOptions { 11 | addr: string; 12 | } 13 | interface SignAndBroadcastOptions { 14 | fee: StdFee; 15 | memo?: string; 16 | } 17 | declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ 18 | signAndBroadcast: (msgs: EncodeObject[], { fee, memo }?: SignAndBroadcastOptions) => any; 19 | msgVoteWeighted: (data: MsgVoteWeighted) => EncodeObject; 20 | msgDeposit: (data: MsgDeposit) => EncodeObject; 21 | msgSubmitProposal: (data: MsgSubmitProposal) => EncodeObject; 22 | msgVote: (data: MsgVote) => EncodeObject; 23 | }>; 24 | interface QueryClientOptions { 25 | addr: string; 26 | } 27 | declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; 28 | export { txClient, queryClient, }; 29 | -------------------------------------------------------------------------------- /proto/claims/tx.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package notionallabs.anone.claims; 3 | 4 | import "gogoproto/gogo.proto"; 5 | import "cosmos/base/v1beta1/coin.proto"; 6 | import "claims/claim_record.proto"; 7 | 8 | option go_package = "github.com/notional-labs/anone/x/claims/types"; 9 | 10 | // Msg defines the Msg service. 11 | service Msg { 12 | rpc InitialClaim(MsgInitialClaim) returns (MsgInitialClaimResponse); 13 | // this line is used by starport scaffolding # proto/tx/rpc 14 | rpc ClaimFor(MsgClaimFor) returns (MsgClaimForResponse); 15 | } 16 | 17 | message MsgInitialClaim { string sender = 1; } 18 | 19 | message MsgInitialClaimResponse { 20 | // total initial claimable amount for the user 21 | repeated cosmos.base.v1beta1.Coin claimed_amount = 2 [ 22 | (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", 23 | (gogoproto.nullable) = false, 24 | (gogoproto.moretags) = "yaml:\"claimed_amount\"" 25 | ]; 26 | } 27 | 28 | message MsgClaimFor { 29 | string sender = 1; 30 | string address = 2; 31 | Action action = 3; 32 | } 33 | 34 | message MsgClaimForResponse { 35 | string address = 1; 36 | // total initial claimable amount for the user 37 | repeated cosmos.base.v1beta1.Coin claimed_amount = 2 [ 38 | (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", 39 | (gogoproto.nullable) = false, 40 | (gogoproto.moretags) = "yaml:\"claimed_amount\"" 41 | ]; 42 | } -------------------------------------------------------------------------------- /vue/src/components/AnOneWelcome/AnOneWelcome.vue: -------------------------------------------------------------------------------- 1 | 29 | 40 | -------------------------------------------------------------------------------- /docs/plan-timeline-outline.drawio: -------------------------------------------------------------------------------- 1 | 5VfbcpswEP0aZpIHd0Bgx3m03Vx7STvOTKePCghQrQsVwtj9+q64GAMmqds002kmGSxWuyvpnN0j23IXfHOlcBJ/kAFhFrKDjeW+tRByPIQs828H29IydezSECkaVE6NYUl/kMpYu2U0IGnLUUvJNE3aRl8KQXzdsmGlZN52CyVrr5rgiPQMSx+zvvULDXRcWZ3JeTNxTWgUV0tP0Vk5wXHtXJ0kjXEg8z2Te2G5CyWlLkd8syDMgFfjUsZdDszuNqaI0L8SsJ18Pb9bhbf84n6+yMPrd3PKR1WWNWZZfeA38P6eppqKCEZSwGOpsbrCQA2yZ0IK8/nx8t5CEwYrzx8UjCIzOpnLzCCB7JzC6ctA+LiXKyJO+/7DljTBZuFUbysiJt8zA9Tcl0wqy53BpIoeTtyJZY69gKfnNMOzUzM26YBxoUch5pRty7DSBTJinhQuruuZPTAqVhz76TbVhJuonstwcEoiaVDJ6BFBMWFroqmPj4jBimI27J9ikY5Somj4SIokYaToGIMksgmX347Z9v5ZHwluwE+LpjbQO16y2c09YH8VKZmJYNQhFY3Hu+U749OmEuqSQaZgb5Z38Dy5EVQXANnLuNjkXRgCGiIy9cBwJvy47vmq0KBfylqr6w+1yg4VGySmhcy285hqskywb2ZzUDxDo+YM3pxd9JooTTaDXerseh9Ek0hOtNqCSx0wqeRi23nPG/Vxa1u8LzyVDVeCF+1SN5oAg0oWjpAIdFgiaiGQuSjUTq2ITphBZkAcCp7gllhTbc47B7k3NNiUQz1ygAdrWqiNlqY66mksnMIGCtLP6ZqcHzAF7dd7DP9jHLqoz+HUfkkO3R6HPZCICGbmvoS3gtkWKG0Ey1gS9G7OJwHaA2B84Py1TREGxbBupz8ESrXCJ0mNXA/h73VxTWWmfFJF7V+ZTyRyUCcRXG8R0b1EBUe7Y/8+beNXRdsYPRNt3UQvTdukR9ttVmgl/PUZBJ3RbdpSrUDuFuWlWNMaUsY6JsxoJODVB/4I2OdGteD7BJtVE5wGgVnmoOYdKo4/kj3PG+Bvr3ycQ1eX97dk7+xV9c/5c8leN9FL98+0R9tn77/vnun05boHXpvfnSVrza939+In -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/index.js: -------------------------------------------------------------------------------- 1 | // THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. 2 | import { SigningStargateClient } from '@cosmjs/stargate' 3 | import { Registry } from '@cosmjs/proto-signing' 4 | import { Api } from './rest' 5 | import { MsgUnjail } from './types/cosmos/slashing/v1beta1/tx' 6 | const types = [['/cosmos.slashing.v1beta1.MsgUnjail', MsgUnjail]] 7 | export const MissingWalletError = new Error('wallet is required') 8 | export const registry = new Registry(types) 9 | const defaultFee = { 10 | amount: [], 11 | gas: '200000', 12 | } 13 | const txClient = async (wallet, { addr: addr } = { addr: 'http://localhost:26657' }) => { 14 | if (!wallet) throw MissingWalletError 15 | let client 16 | if (addr) { 17 | client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }) 18 | } else { 19 | client = await SigningStargateClient.offline(wallet, { registry }) 20 | } 21 | const { address } = (await wallet.getAccounts())[0] 22 | return { 23 | signAndBroadcast: (msgs, { fee, memo } = { fee: defaultFee, memo: '' }) => 24 | client.signAndBroadcast(address, msgs, fee, memo), 25 | msgUnjail: (data) => ({ typeUrl: '/cosmos.slashing.v1beta1.MsgUnjail', value: data }), 26 | } 27 | } 28 | const queryClient = async ({ addr: addr } = { addr: 'http://localhost:1317' }) => { 29 | return new Api({ baseUrl: addr }) 30 | } 31 | export { txClient, queryClient } 32 | -------------------------------------------------------------------------------- /cmd/anoned/genwasm.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/cosmos/cosmos-sdk/client" 5 | "github.com/notional-labs/anone/app" 6 | "github.com/spf13/cobra" 7 | "github.com/tendermint/spm/cosmoscmd" 8 | 9 | "github.com/CosmWasm/wasmd/x/wasm" 10 | wasmcli "github.com/CosmWasm/wasmd/x/wasm/client/cli" 11 | ) 12 | 13 | func AddGenesisWasmMsgCmd(defaultNodeHome string) *cobra.Command { 14 | txCmd := &cobra.Command{ 15 | Use: "add-wasm-genesis-message", 16 | Short: "Wasm genesis subcommands", 17 | DisableFlagParsing: true, 18 | SuggestionsMinimumDistance: 2, 19 | RunE: client.ValidateCmd, 20 | } 21 | genesisIO := wasmcli.NewDefaultGenesisIO() 22 | txCmd.AddCommand( 23 | wasmcli.GenesisStoreCodeCmd(defaultNodeHome, genesisIO), 24 | wasmcli.GenesisInstantiateContractCmd(defaultNodeHome, genesisIO), 25 | wasmcli.GenesisExecuteContractCmd(defaultNodeHome, genesisIO), 26 | wasmcli.GenesisListContractsCmd(defaultNodeHome, genesisIO), 27 | wasmcli.GenesisListCodesCmd(defaultNodeHome, genesisIO), 28 | ) 29 | 30 | return txCmd 31 | } 32 | 33 | func GetWasmCmdOptions() []cosmoscmd.Option { 34 | var options []cosmoscmd.Option 35 | 36 | options = append(options, 37 | cosmoscmd.CustomizeStartCmd(func(startCmd *cobra.Command) { 38 | wasm.AddModuleInitFlags(startCmd) 39 | }), 40 | cosmoscmd.AddSubCmd(AddGenesisWasmMsgCmd(app.DefaultNodeHome)), 41 | ) 42 | 43 | return options 44 | } 45 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/index.js: -------------------------------------------------------------------------------- 1 | // THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. 2 | import { SigningStargateClient } from '@cosmjs/stargate' 3 | import { Registry } from '@cosmjs/proto-signing' 4 | import { Api } from './rest' 5 | import { MsgTransfer } from './types/ibc/applications/transfer/v1/tx' 6 | const types = [['/ibc.applications.transfer.v1.MsgTransfer', MsgTransfer]] 7 | export const MissingWalletError = new Error('wallet is required') 8 | export const registry = new Registry(types) 9 | const defaultFee = { 10 | amount: [], 11 | gas: '200000', 12 | } 13 | const txClient = async (wallet, { addr: addr } = { addr: 'http://localhost:26657' }) => { 14 | if (!wallet) throw MissingWalletError 15 | let client 16 | if (addr) { 17 | client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }) 18 | } else { 19 | client = await SigningStargateClient.offline(wallet, { registry }) 20 | } 21 | const { address } = (await wallet.getAccounts())[0] 22 | return { 23 | signAndBroadcast: (msgs, { fee, memo } = { fee: defaultFee, memo: '' }) => 24 | client.signAndBroadcast(address, msgs, fee, memo), 25 | msgTransfer: (data) => ({ typeUrl: '/ibc.applications.transfer.v1.MsgTransfer', value: data }), 26 | } 27 | } 28 | const queryClient = async ({ addr: addr } = { addr: 'http://localhost:1317' }) => { 29 | return new Api({ baseUrl: addr }) 30 | } 31 | export { txClient, queryClient } 32 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/index.js: -------------------------------------------------------------------------------- 1 | // THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. 2 | import { SigningStargateClient } from '@cosmjs/stargate' 3 | import { Registry } from '@cosmjs/proto-signing' 4 | import { Api } from './rest' 5 | import { MsgVerifyInvariant } from './types/cosmos/crisis/v1beta1/tx' 6 | const types = [['/cosmos.crisis.v1beta1.MsgVerifyInvariant', MsgVerifyInvariant]] 7 | export const MissingWalletError = new Error('wallet is required') 8 | export const registry = new Registry(types) 9 | const defaultFee = { 10 | amount: [], 11 | gas: '200000', 12 | } 13 | const txClient = async (wallet, { addr: addr } = { addr: 'http://localhost:26657' }) => { 14 | if (!wallet) throw MissingWalletError 15 | let client 16 | if (addr) { 17 | client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }) 18 | } else { 19 | client = await SigningStargateClient.offline(wallet, { registry }) 20 | } 21 | const { address } = (await wallet.getAccounts())[0] 22 | return { 23 | signAndBroadcast: (msgs, { fee, memo } = { fee: defaultFee, memo: '' }) => 24 | client.signAndBroadcast(address, msgs, fee, memo), 25 | msgVerifyInvariant: (data) => ({ typeUrl: '/cosmos.crisis.v1beta1.MsgVerifyInvariant', value: data }), 26 | } 27 | } 28 | const queryClient = async ({ addr: addr } = { addr: 'http://localhost:1317' }) => { 29 | return new Api({ baseUrl: addr }) 30 | } 31 | export { txClient, queryClient } 32 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/index.js: -------------------------------------------------------------------------------- 1 | // THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. 2 | import { SigningStargateClient } from '@cosmjs/stargate' 3 | import { Registry } from '@cosmjs/proto-signing' 4 | import { Api } from './rest' 5 | import { MsgSubmitEvidence } from './types/cosmos/evidence/v1beta1/tx' 6 | const types = [['/cosmos.evidence.v1beta1.MsgSubmitEvidence', MsgSubmitEvidence]] 7 | export const MissingWalletError = new Error('wallet is required') 8 | export const registry = new Registry(types) 9 | const defaultFee = { 10 | amount: [], 11 | gas: '200000', 12 | } 13 | const txClient = async (wallet, { addr: addr } = { addr: 'http://localhost:26657' }) => { 14 | if (!wallet) throw MissingWalletError 15 | let client 16 | if (addr) { 17 | client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }) 18 | } else { 19 | client = await SigningStargateClient.offline(wallet, { registry }) 20 | } 21 | const { address } = (await wallet.getAccounts())[0] 22 | return { 23 | signAndBroadcast: (msgs, { fee, memo } = { fee: defaultFee, memo: '' }) => 24 | client.signAndBroadcast(address, msgs, fee, memo), 25 | msgSubmitEvidence: (data) => ({ typeUrl: '/cosmos.evidence.v1beta1.MsgSubmitEvidence', value: data }), 26 | } 27 | } 28 | const queryClient = async ({ addr: addr } = { addr: 'http://localhost:1317' }) => { 29 | return new Api({ baseUrl: addr }) 30 | } 31 | export { txClient, queryClient } 32 | -------------------------------------------------------------------------------- /gentx-instruction.md: -------------------------------------------------------------------------------- 1 | ## Clone the project 2 | ``` 3 | git clone https://github.com/notional-labs/anone 4 | ``` 5 | ## Build 6 | ``` 7 | cd anone 8 | git checkout testnet-1 9 | go install ./... 10 | ``` 11 | 12 | ## Set up 13 | If you get an error that genesis.json file already exists, use overwrite flag 14 | ``` 15 | anoned init -o moniker --chain-id anone-testnet-1 16 | ``` 17 | If you get an error that 'anoned not found' then your gopath is not setup properly. You can try: 18 | ``` 19 | export GOPATH=~/go 20 | export PATH=$PATH:~/go/bin 21 | ``` 22 | Assign yourself a balance, replace "" with the name of your keys above 23 | ``` 24 | anoned add-genesis-account 1000000000uan1 --keyring-backend os 25 | ``` 26 | Define the amount you want to stake, replace "" with the name of your keys from step 5 27 | ``` 28 | anoned gentx 1000000uan1 \ 29 | --chain-id anone-testnet-1 \ 30 | --moniker="" \ 31 | --commission-max-change-rate=0.01 \ 32 | --commission-max-rate=0.20 \ 33 | --commission-rate=0.05 \ 34 | --details="XXXXXXXX" \ 35 | --security-contact="XXXXXXXX" \ 36 | --website="XXXXXXXX" 37 | ``` 38 | You should now get an output like: 39 | ``` 40 | Genesis transaction written to "~/.anone/config/gentx/gentx-e4987c1bfc4c1135ddfd79ee0114e1212a747da3.json" 41 | ``` 42 | Copy the gentx file to your local anone repo, use the below command exactly as is 43 | ``` 44 | cp ~/.anone/config/gentx/* networks/anone-testnet-1/gentxs 45 | ``` 46 | Submit a Pull Request with your gentx file 47 | -------------------------------------------------------------------------------- /internal/wasm/distribution.go: -------------------------------------------------------------------------------- 1 | package wasm 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | 7 | wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" 8 | wasmvmtypes "github.com/CosmWasm/wasmvm/types" 9 | sdk "github.com/cosmos/cosmos-sdk/types" 10 | sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" 11 | distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" 12 | ) 13 | 14 | const ( 15 | DistributionRoute = "distribution" 16 | ) 17 | 18 | var _ Encoder = CustomDistributionEncoder 19 | 20 | type FundCommunityPool struct { 21 | Amount wasmvmtypes.Coins `json:"amount"` 22 | } 23 | 24 | func (fcp FundCommunityPool) Encode(contract sdk.AccAddress) ([]sdk.Msg, error) { 25 | amount, err := wasmkeeper.ConvertWasmCoinsToSdkCoins(fcp.Amount) 26 | if err != nil { 27 | return nil, err 28 | } 29 | msg := distributiontypes.NewMsgFundCommunityPool(amount, contract) 30 | return []sdk.Msg{msg}, nil 31 | } 32 | 33 | type DistributionMsg struct { 34 | FundCommunityPool *FundCommunityPool `json:"fund_community_pool,omitempty"` 35 | } 36 | 37 | func CustomDistributionEncoder(contract sdk.AccAddress, data json.RawMessage, version string) ([]sdk.Msg, error) { 38 | msg := &DistributionMsg{} 39 | err := json.Unmarshal(data, msg) 40 | if err != nil { 41 | return nil, sdkerrors.Wrap(sdkerrors.ErrJSONUnmarshal, err.Error()) 42 | } 43 | if msg.FundCommunityPool != nil { 44 | return msg.FundCommunityPool.Encode(contract) 45 | } 46 | return nil, fmt.Errorf("wasm: invalid custom distribution message") 47 | } -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/index.js: -------------------------------------------------------------------------------- 1 | // THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. 2 | import { SigningStargateClient } from '@cosmjs/stargate' 3 | import { Registry } from '@cosmjs/proto-signing' 4 | import { Api } from './rest' 5 | import { MsgCreateVestingAccount } from './types/cosmos/vesting/v1beta1/tx' 6 | const types = [['/cosmos.vesting.v1beta1.MsgCreateVestingAccount', MsgCreateVestingAccount]] 7 | export const MissingWalletError = new Error('wallet is required') 8 | export const registry = new Registry(types) 9 | const defaultFee = { 10 | amount: [], 11 | gas: '200000', 12 | } 13 | const txClient = async (wallet, { addr: addr } = { addr: 'http://localhost:26657' }) => { 14 | if (!wallet) throw MissingWalletError 15 | let client 16 | if (addr) { 17 | client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }) 18 | } else { 19 | client = await SigningStargateClient.offline(wallet, { registry }) 20 | } 21 | const { address } = (await wallet.getAccounts())[0] 22 | return { 23 | signAndBroadcast: (msgs, { fee, memo } = { fee: defaultFee, memo: '' }) => 24 | client.signAndBroadcast(address, msgs, fee, memo), 25 | msgCreateVestingAccount: (data) => ({ typeUrl: '/cosmos.vesting.v1beta1.MsgCreateVestingAccount', value: data }), 26 | } 27 | } 28 | const queryClient = async ({ addr: addr } = { addr: 'http://localhost:1317' }) => { 29 | return new Api({ baseUrl: addr }) 30 | } 31 | export { txClient, queryClient } 32 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.distribution.v1beta1/module/index.d.ts: -------------------------------------------------------------------------------- 1 | import { StdFee } from "@cosmjs/launchpad"; 2 | import { Registry, OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; 3 | import { Api } from "./rest"; 4 | import { MsgSetWithdrawAddress } from "./types/cosmos/distribution/v1beta1/tx"; 5 | import { MsgWithdrawValidatorCommission } from "./types/cosmos/distribution/v1beta1/tx"; 6 | import { MsgFundCommunityPool } from "./types/cosmos/distribution/v1beta1/tx"; 7 | import { MsgWithdrawDelegatorReward } from "./types/cosmos/distribution/v1beta1/tx"; 8 | export declare const MissingWalletError: Error; 9 | export declare const registry: Registry; 10 | interface TxClientOptions { 11 | addr: string; 12 | } 13 | interface SignAndBroadcastOptions { 14 | fee: StdFee; 15 | memo?: string; 16 | } 17 | declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ 18 | signAndBroadcast: (msgs: EncodeObject[], { fee, memo }?: SignAndBroadcastOptions) => any; 19 | msgSetWithdrawAddress: (data: MsgSetWithdrawAddress) => EncodeObject; 20 | msgWithdrawValidatorCommission: (data: MsgWithdrawValidatorCommission) => EncodeObject; 21 | msgFundCommunityPool: (data: MsgFundCommunityPool) => EncodeObject; 22 | msgWithdrawDelegatorReward: (data: MsgWithdrawDelegatorReward) => EncodeObject; 23 | }>; 24 | interface QueryClientOptions { 25 | addr: string; 26 | } 27 | declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; 28 | export { txClient, queryClient, }; 29 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/index.d.ts: -------------------------------------------------------------------------------- 1 | import { StdFee } from "@cosmjs/launchpad"; 2 | import { Registry, OfflineSigner, EncodeObject } from "@cosmjs/proto-signing"; 3 | import { Api } from "./rest"; 4 | import { MsgDelegate } from "./types/cosmos/staking/v1beta1/tx"; 5 | import { MsgUndelegate } from "./types/cosmos/staking/v1beta1/tx"; 6 | import { MsgEditValidator } from "./types/cosmos/staking/v1beta1/tx"; 7 | import { MsgBeginRedelegate } from "./types/cosmos/staking/v1beta1/tx"; 8 | import { MsgCreateValidator } from "./types/cosmos/staking/v1beta1/tx"; 9 | export declare const MissingWalletError: Error; 10 | export declare const registry: Registry; 11 | interface TxClientOptions { 12 | addr: string; 13 | } 14 | interface SignAndBroadcastOptions { 15 | fee: StdFee; 16 | memo?: string; 17 | } 18 | declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{ 19 | signAndBroadcast: (msgs: EncodeObject[], { fee, memo }?: SignAndBroadcastOptions) => any; 20 | msgDelegate: (data: MsgDelegate) => EncodeObject; 21 | msgUndelegate: (data: MsgUndelegate) => EncodeObject; 22 | msgEditValidator: (data: MsgEditValidator) => EncodeObject; 23 | msgBeginRedelegate: (data: MsgBeginRedelegate) => EncodeObject; 24 | msgCreateValidator: (data: MsgCreateValidator) => EncodeObject; 25 | }>; 26 | interface QueryClientOptions { 27 | addr: string; 28 | } 29 | declare const queryClient: ({ addr: addr }?: QueryClientOptions) => Promise>; 30 | export { txClient, queryClient, }; 31 | -------------------------------------------------------------------------------- /x/claims/wasm/encoder.go: -------------------------------------------------------------------------------- 1 | package wasm 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | 7 | sdk "github.com/cosmos/cosmos-sdk/types" 8 | sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" 9 | sgwasm "github.com/notional-labs/anone/internal/wasm" 10 | claimtypes "github.com/notional-labs/anone/x/claims/types" 11 | ) 12 | 13 | var _ sgwasm.Encoder = Encoder 14 | 15 | type ClaimAction string 16 | 17 | const ( 18 | ClaimActionMintNFT = "mint_nft" 19 | ) 20 | 21 | type ClaimFor struct { 22 | Address string `json:"address"` 23 | Action ClaimAction `json:"action"` 24 | } 25 | 26 | func (a ClaimAction) ToAction() (claimtypes.Action, error) { 27 | if a == ClaimActionMintNFT { 28 | return claimtypes.ActionMintNFT, nil 29 | } 30 | 31 | return 0, fmt.Errorf("invalid action") 32 | } 33 | 34 | type ClaimMsg struct { 35 | ClaimFor *ClaimFor `json:"claim_for,omitempty"` 36 | } 37 | 38 | func (c ClaimFor) Encode(contract sdk.AccAddress) ([]sdk.Msg, error) { 39 | action, err := c.Action.ToAction() 40 | if err != nil { 41 | return nil, err 42 | } 43 | msg := claimtypes.NewMsgClaimFor(contract.String(), c.Address, action) 44 | return []sdk.Msg{msg}, nil 45 | } 46 | 47 | func Encoder(contract sdk.AccAddress, data json.RawMessage, version string) ([]sdk.Msg, error) { 48 | msg := &ClaimMsg{} 49 | err := json.Unmarshal(data, msg) 50 | if err != nil { 51 | return nil, sdkerrors.Wrap(sdkerrors.ErrJSONUnmarshal, err.Error()) 52 | } 53 | if msg.ClaimFor != nil { 54 | return msg.ClaimFor.Encode(contract) 55 | } 56 | return nil, fmt.Errorf("wasm: invalid custom claim message") 57 | } -------------------------------------------------------------------------------- /.github/workflows/deploy.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | name: Deploy 4 | 5 | on: 6 | push: 7 | branches: [ master ] 8 | pull_request: 9 | branches: [ master ] 10 | 11 | jobs: 12 | deploy: 13 | runs-on: ubuntu-latest 14 | strategy: 15 | matrix: 16 | node-version: [17.x] 17 | 18 | steps: 19 | - name: Checkout 20 | uses: actions/checkout@v2 21 | 22 | - name: Use Node.js 23 | uses: actions/setup-node@v2 24 | with: 25 | node-version: ${{ matrix.node-version }} 26 | 27 | - name: Cache dependencies 28 | uses: actions/cache@v2 29 | with: 30 | path: ~/.npm 31 | key: npm-${{ hashFiles('package-lock.json') }} 32 | restore-keys: npm- 33 | 34 | - name: Build the web 35 | env: 36 | NODE_OPTIONS: --openssl-legacy-provider 37 | run: | 38 | echo ${{ secrets.WEB_SERVER }} 39 | cd vue 40 | npm ci --ignore-scripts 41 | npm run build 42 | 43 | - name: Transfer /dist folder to server 44 | uses: garygrossgarten/github-action-scp@release 45 | with: 46 | local: vue/dist 47 | remote: /root/anone.notional.ventures 48 | host: ${{ secrets.WEB_SERVER }} 49 | username: ${{ secrets.USERNAME }} 50 | privateKey: ${{ secrets.PRIV_KEY }} 51 | passphrase: ${{ secrets.PASSPHRASE }} 52 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.bank.v1beta1/module/index.js: -------------------------------------------------------------------------------- 1 | // THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. 2 | import { SigningStargateClient } from '@cosmjs/stargate' 3 | import { Registry } from '@cosmjs/proto-signing' 4 | import { Api } from './rest' 5 | import { MsgMultiSend } from './types/cosmos/bank/v1beta1/tx' 6 | import { MsgSend } from './types/cosmos/bank/v1beta1/tx' 7 | const types = [ 8 | ['/cosmos.bank.v1beta1.MsgMultiSend', MsgMultiSend], 9 | ['/cosmos.bank.v1beta1.MsgSend', MsgSend], 10 | ] 11 | export const MissingWalletError = new Error('wallet is required') 12 | export const registry = new Registry(types) 13 | const defaultFee = { 14 | amount: [], 15 | gas: '200000', 16 | } 17 | const txClient = async (wallet, { addr: addr } = { addr: 'http://localhost:26657' }) => { 18 | if (!wallet) throw MissingWalletError 19 | let client 20 | if (addr) { 21 | client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }) 22 | } else { 23 | client = await SigningStargateClient.offline(wallet, { registry }) 24 | } 25 | const { address } = (await wallet.getAccounts())[0] 26 | return { 27 | signAndBroadcast: (msgs, { fee, memo } = { fee: defaultFee, memo: '' }) => 28 | client.signAndBroadcast(address, msgs, fee, memo), 29 | msgMultiSend: (data) => ({ typeUrl: '/cosmos.bank.v1beta1.MsgMultiSend', value: data }), 30 | msgSend: (data) => ({ typeUrl: '/cosmos.bank.v1beta1.MsgSend', value: data }), 31 | } 32 | } 33 | const queryClient = async ({ addr: addr } = { addr: 'http://localhost:1317' }) => { 34 | return new Api({ baseUrl: addr }) 35 | } 36 | export { txClient, queryClient } 37 | -------------------------------------------------------------------------------- /lambda/index.js: -------------------------------------------------------------------------------- 1 | const AWS = require('aws-sdk'); 2 | const dynamo = new AWS.DynamoDB.DocumentClient(); 3 | 4 | 5 | const validateSignature = async (ethAddress, signedMessage) => { 6 | 7 | } 8 | 9 | const writeDB = async ({ethAddress, oneAddress, signature}) => { 10 | 11 | } 12 | 13 | /** 14 | * Demonstrates a simple HTTP endpoint using API Gateway. You have full 15 | * access to the request and response payload, including headers and 16 | * status code. 17 | * 18 | * To scan a DynamoDB table, make a GET request with the TableName as a 19 | * query string parameter. To put, update, or delete an item, make a POST, 20 | * PUT, or DELETE request respectively, passing in the payload to the 21 | * DynamoDB API as a JSON body. 22 | */ 23 | exports.handler = async (event, context) => { 24 | //console.log('Received event:', JSON.stringify(event, null, 2)); 25 | 26 | let body; 27 | let statusCode = '200'; 28 | const headers = { 29 | 'Content-Type': 'application/json', 30 | }; 31 | 32 | try { 33 | switch (event.httpMethod) { 34 | case 'POST': 35 | const {ethAddress, oneAddress, signature} = JSON.parse(event.body); 36 | body = await dynamo.put().promise(); 37 | break; 38 | default: 39 | throw new Error(`Unsupported method "${event.httpMethod}"`); 40 | } 41 | } catch (err) { 42 | console.log(err); 43 | statusCode = '400'; 44 | body = err.message; 45 | } finally { 46 | body = JSON.stringify(body); 47 | } 48 | 49 | return { 50 | statusCode, 51 | body, 52 | headers, 53 | }; 54 | }; 55 | -------------------------------------------------------------------------------- /anone-cw721/examples/schema.rs: -------------------------------------------------------------------------------- 1 | use std::env::current_dir; 2 | use std::fs::create_dir_all; 3 | 4 | use cosmwasm_schema::{export_schema, export_schema_with_title, remove_schemas, schema_for}; 5 | 6 | use cw721::{ 7 | AllNftInfoResponse, ApprovalResponse, ApprovalsResponse, ContractInfoResponse, NftInfoResponse, 8 | NumTokensResponse, OperatorsResponse, OwnerOfResponse, TokensResponse, 9 | }; 10 | use anone_cw721::contract::{ExecuteMsg, Extension, InstantiateMsg, MinterResponse, QueryMsg}; 11 | 12 | fn main() { 13 | let mut out_dir = current_dir().unwrap(); 14 | out_dir.push("schema"); 15 | create_dir_all(&out_dir).unwrap(); 16 | remove_schemas(&out_dir).unwrap(); 17 | 18 | export_schema(&schema_for!(InstantiateMsg), &out_dir); 19 | export_schema_with_title(&schema_for!(ExecuteMsg), &out_dir, "ExecuteMsg"); 20 | export_schema(&schema_for!(QueryMsg), &out_dir); 21 | export_schema_with_title( 22 | &schema_for!(AllNftInfoResponse), 23 | &out_dir, 24 | "AllNftInfoResponse", 25 | ); 26 | export_schema(&schema_for!(ApprovalResponse), &out_dir); 27 | export_schema(&schema_for!(ApprovalsResponse), &out_dir); 28 | export_schema(&schema_for!(OperatorsResponse), &out_dir); 29 | export_schema(&schema_for!(ContractInfoResponse), &out_dir); 30 | export_schema(&schema_for!(MinterResponse), &out_dir); 31 | export_schema_with_title( 32 | &schema_for!(NftInfoResponse), 33 | &out_dir, 34 | "NftInfoResponse", 35 | ); 36 | export_schema(&schema_for!(NumTokensResponse), &out_dir); 37 | export_schema(&schema_for!(OwnerOfResponse), &out_dir); 38 | export_schema(&schema_for!(TokensResponse), &out_dir); 39 | } -------------------------------------------------------------------------------- /vue/src/components/AnButton/AnButton.vue: -------------------------------------------------------------------------------- 1 | 40 | 67 | -------------------------------------------------------------------------------- /docs/one-pager-plan-outline.md: -------------------------------------------------------------------------------- 1 | # Anone engineering plan outline 2 | 3 | # Requirements: 4 | 1. Have to point out where we can collaborate with Marco's content creator team (what content?) 5 | 6 | # Phases outline 7 | 1. __Testnet 1__: super safe basic functional chain 8 | * __WHY?__: the tasks in this phase are very familiar with the team. We can still ICO on schedule in case test - net 2 fails to meet deadline. 9 | * __GOAL__: basic functionalities on cosmos eco-system 10 | * integrate one to keplr wallet. 11 | * website for adding keplr wallet + block explorer. 12 | * prepare an uniform https RPC and REST endpoint. 13 | * IPFS-based genesis hosting and download (for validators) 14 | * IBC testing (this is for later integration to major DEX on cosmos eco-system) 15 | * add airdrop for one1 address 16 | * custom configuration 17 | 18 | 2. __Testnet 2__: etherum and NFT integration 19 | * __WHY?__: this phase is for adding and testing new features 20 | * __GENERAL GOAL__: this chain version must resemble real mainnet 21 | * __ETHERUM GOAL__: add support for etherum 22 | * implement support for handling tx signed by metamask 23 | * prepare an uniform https JSON-RPC endpoint 24 | * add airdrop testing for eth-format address 25 | 26 | * __NFT GOAL__: add support for NFT functionality 27 | * (We can collaborate on this part?) 28 | * implement NFT functionality 29 | * NFT marketplace? 30 | 31 | 3. __Testnet 3__: for further change to test - net 2 if exists 32 | 33 | # Timeline estimation 34 | 35 | __Total time__: 3 months 36 | 37 | 1. __Testnet 1__: 1 month 38 | 2. __Testnet 2__: 1.5 month (1 month and 2 weeks) 39 | 3. __Reserve time__: 0.5 month (2 weeks) 40 | 41 | # Team member estimation 42 | 43 | # Budget estimation 44 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.feegrant.v1beta1/module/index.js: -------------------------------------------------------------------------------- 1 | // THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. 2 | import { SigningStargateClient } from '@cosmjs/stargate' 3 | import { Registry } from '@cosmjs/proto-signing' 4 | import { Api } from './rest' 5 | import { MsgGrantAllowance } from './types/cosmos/feegrant/v1beta1/tx' 6 | import { MsgRevokeAllowance } from './types/cosmos/feegrant/v1beta1/tx' 7 | const types = [ 8 | ['/cosmos.feegrant.v1beta1.MsgGrantAllowance', MsgGrantAllowance], 9 | ['/cosmos.feegrant.v1beta1.MsgRevokeAllowance', MsgRevokeAllowance], 10 | ] 11 | export const MissingWalletError = new Error('wallet is required') 12 | export const registry = new Registry(types) 13 | const defaultFee = { 14 | amount: [], 15 | gas: '200000', 16 | } 17 | const txClient = async (wallet, { addr: addr } = { addr: 'http://localhost:26657' }) => { 18 | if (!wallet) throw MissingWalletError 19 | let client 20 | if (addr) { 21 | client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }) 22 | } else { 23 | client = await SigningStargateClient.offline(wallet, { registry }) 24 | } 25 | const { address } = (await wallet.getAccounts())[0] 26 | return { 27 | signAndBroadcast: (msgs, { fee, memo } = { fee: defaultFee, memo: '' }) => 28 | client.signAndBroadcast(address, msgs, fee, memo), 29 | msgGrantAllowance: (data) => ({ typeUrl: '/cosmos.feegrant.v1beta1.MsgGrantAllowance', value: data }), 30 | msgRevokeAllowance: (data) => ({ typeUrl: '/cosmos.feegrant.v1beta1.MsgRevokeAllowance', value: data }), 31 | } 32 | } 33 | const queryClient = async ({ addr: addr } = { addr: 'http://localhost:1317' }) => { 34 | return new Api({ baseUrl: addr }) 35 | } 36 | export { txClient, queryClient } 37 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/genesis.d.ts: -------------------------------------------------------------------------------- 1 | import { Any } from '../../../google/protobuf/any'; 2 | import { Writer, Reader } from 'protobufjs/minimal'; 3 | export declare const protobufPackage = "cosmos.authz.v1beta1"; 4 | /** GenesisState defines the authz module's genesis state. */ 5 | export interface GenesisState { 6 | authorization: GrantAuthorization[]; 7 | } 8 | /** GrantAuthorization defines the GenesisState/GrantAuthorization type. */ 9 | export interface GrantAuthorization { 10 | granter: string; 11 | grantee: string; 12 | authorization: Any | undefined; 13 | expiration: Date | undefined; 14 | } 15 | export declare const GenesisState: { 16 | encode(message: GenesisState, writer?: Writer): Writer; 17 | decode(input: Reader | Uint8Array, length?: number): GenesisState; 18 | fromJSON(object: any): GenesisState; 19 | toJSON(message: GenesisState): unknown; 20 | fromPartial(object: DeepPartial): GenesisState; 21 | }; 22 | export declare const GrantAuthorization: { 23 | encode(message: GrantAuthorization, writer?: Writer): Writer; 24 | decode(input: Reader | Uint8Array, length?: number): GrantAuthorization; 25 | fromJSON(object: any): GrantAuthorization; 26 | toJSON(message: GrantAuthorization): unknown; 27 | fromPartial(object: DeepPartial): GrantAuthorization; 28 | }; 29 | declare type Builtin = Date | Function | Uint8Array | string | number | undefined; 30 | export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { 31 | [K in keyof T]?: DeepPartial; 32 | } : Partial; 33 | export {}; 34 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/tendermint/version/types.d.ts: -------------------------------------------------------------------------------- 1 | import { Writer, Reader } from 'protobufjs/minimal'; 2 | export declare const protobufPackage = "tendermint.version"; 3 | /** 4 | * App includes the protocol and software version for the application. 5 | * This information is included in ResponseInfo. The App.Protocol can be 6 | * updated in ResponseEndBlock. 7 | */ 8 | export interface App { 9 | protocol: number; 10 | software: string; 11 | } 12 | /** 13 | * Consensus captures the consensus rules for processing a block in the blockchain, 14 | * including all blockchain data structures and the rules of the application's 15 | * state transition machine. 16 | */ 17 | export interface Consensus { 18 | block: number; 19 | app: number; 20 | } 21 | export declare const App: { 22 | encode(message: App, writer?: Writer): Writer; 23 | decode(input: Reader | Uint8Array, length?: number): App; 24 | fromJSON(object: any): App; 25 | toJSON(message: App): unknown; 26 | fromPartial(object: DeepPartial): App; 27 | }; 28 | export declare const Consensus: { 29 | encode(message: Consensus, writer?: Writer): Writer; 30 | decode(input: Reader | Uint8Array, length?: number): Consensus; 31 | fromJSON(object: any): Consensus; 32 | toJSON(message: Consensus): unknown; 33 | fromPartial(object: DeepPartial): Consensus; 34 | }; 35 | declare type Builtin = Date | Function | Uint8Array | string | number | undefined; 36 | export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { 37 | [K in keyof T]?: DeepPartial; 38 | } : Partial; 39 | export {}; 40 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.staking.v1beta1/module/types/tendermint/version/types.d.ts: -------------------------------------------------------------------------------- 1 | import { Writer, Reader } from 'protobufjs/minimal'; 2 | export declare const protobufPackage = "tendermint.version"; 3 | /** 4 | * App includes the protocol and software version for the application. 5 | * This information is included in ResponseInfo. The App.Protocol can be 6 | * updated in ResponseEndBlock. 7 | */ 8 | export interface App { 9 | protocol: number; 10 | software: string; 11 | } 12 | /** 13 | * Consensus captures the consensus rules for processing a block in the blockchain, 14 | * including all blockchain data structures and the rules of the application's 15 | * state transition machine. 16 | */ 17 | export interface Consensus { 18 | block: number; 19 | app: number; 20 | } 21 | export declare const App: { 22 | encode(message: App, writer?: Writer): Writer; 23 | decode(input: Reader | Uint8Array, length?: number): App; 24 | fromJSON(object: any): App; 25 | toJSON(message: App): unknown; 26 | fromPartial(object: DeepPartial): App; 27 | }; 28 | export declare const Consensus: { 29 | encode(message: Consensus, writer?: Writer): Writer; 30 | decode(input: Reader | Uint8Array, length?: number): Consensus; 31 | fromJSON(object: any): Consensus; 32 | toJSON(message: Consensus): unknown; 33 | fromPartial(object: DeepPartial): Consensus; 34 | }; 35 | declare type Builtin = Date | Function | Uint8Array | string | number | undefined; 36 | export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { 37 | [K in keyof T]?: DeepPartial; 38 | } : Partial; 39 | export {}; 40 | -------------------------------------------------------------------------------- /testutil/simapp/simapp.go: -------------------------------------------------------------------------------- 1 | package simapp 2 | 3 | import ( 4 | "encoding/json" 5 | "time" 6 | 7 | "github.com/cosmos/cosmos-sdk/simapp" 8 | "github.com/tendermint/spm/cosmoscmd" 9 | abci "github.com/tendermint/tendermint/abci/types" 10 | "github.com/tendermint/tendermint/libs/log" 11 | tmproto "github.com/tendermint/tendermint/proto/tendermint/types" 12 | tmtypes "github.com/tendermint/tendermint/types" 13 | tmdb "github.com/tendermint/tm-db" 14 | 15 | "github.com/notional-labs/anone/app" 16 | ) 17 | 18 | // New creates application instance with in-memory database and disabled logging. 19 | func New(dir string) *app.App { 20 | db := tmdb.NewMemDB() 21 | logger := log.NewNopLogger() 22 | 23 | encoding := cosmoscmd.MakeEncodingConfig(app.ModuleBasics) 24 | 25 | a := app.New(logger, db, nil, true, map[int64]bool{}, dir, 0, encoding, 26 | simapp.EmptyAppOptions{}) 27 | // InitChain updates deliverState which is required when app.NewContext is called 28 | 29 | // Is this thing generate a default genesis for app? 30 | stateBytes, err := json.MarshalIndent(app.ModuleBasics.DefaultGenesis(encoding.Marshaler), "", " ") 31 | if err != nil { 32 | panic(err) 33 | } 34 | 35 | a.InitChain(abci.RequestInitChain{ 36 | ConsensusParams: defaultConsensusParams, 37 | AppStateBytes: stateBytes, 38 | }) 39 | return a.(*app.App) 40 | } 41 | 42 | var defaultConsensusParams = &abci.ConsensusParams{ 43 | Block: &abci.BlockParams{ 44 | MaxBytes: 200000, 45 | MaxGas: 2000000, 46 | }, 47 | Evidence: &tmproto.EvidenceParams{ 48 | MaxAgeNumBlocks: 302400, 49 | MaxAgeDuration: 504 * time.Hour, // 3 weeks is the max duration 50 | MaxBytes: 10000, 51 | }, 52 | Validator: &tmproto.ValidatorParams{ 53 | PubKeyTypes: []string{ 54 | tmtypes.ABCIPubKeyTypeEd25519, 55 | }, 56 | }, 57 | } 58 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/index.js: -------------------------------------------------------------------------------- 1 | // THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. 2 | import { SigningStargateClient } from '@cosmjs/stargate' 3 | import { Registry } from '@cosmjs/proto-signing' 4 | import { Api } from './rest' 5 | import { MsgGrant } from './types/cosmos/authz/v1beta1/tx' 6 | import { MsgExec } from './types/cosmos/authz/v1beta1/tx' 7 | import { MsgRevoke } from './types/cosmos/authz/v1beta1/tx' 8 | const types = [ 9 | ['/cosmos.authz.v1beta1.MsgGrant', MsgGrant], 10 | ['/cosmos.authz.v1beta1.MsgExec', MsgExec], 11 | ['/cosmos.authz.v1beta1.MsgRevoke', MsgRevoke], 12 | ] 13 | export const MissingWalletError = new Error('wallet is required') 14 | export const registry = new Registry(types) 15 | const defaultFee = { 16 | amount: [], 17 | gas: '200000', 18 | } 19 | const txClient = async (wallet, { addr: addr } = { addr: 'http://localhost:26657' }) => { 20 | if (!wallet) throw MissingWalletError 21 | let client 22 | if (addr) { 23 | client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }) 24 | } else { 25 | client = await SigningStargateClient.offline(wallet, { registry }) 26 | } 27 | const { address } = (await wallet.getAccounts())[0] 28 | return { 29 | signAndBroadcast: (msgs, { fee, memo } = { fee: defaultFee, memo: '' }) => 30 | client.signAndBroadcast(address, msgs, fee, memo), 31 | msgGrant: (data) => ({ typeUrl: '/cosmos.authz.v1beta1.MsgGrant', value: data }), 32 | msgExec: (data) => ({ typeUrl: '/cosmos.authz.v1beta1.MsgExec', value: data }), 33 | msgRevoke: (data) => ({ typeUrl: '/cosmos.authz.v1beta1.MsgRevoke', value: data }), 34 | } 35 | } 36 | const queryClient = async ({ addr: addr } = { addr: 'http://localhost:1317' }) => { 37 | return new Api({ baseUrl: addr }) 38 | } 39 | export { txClient, queryClient } 40 | -------------------------------------------------------------------------------- /x/claims/keeper/msg_server_claim_for.go: -------------------------------------------------------------------------------- 1 | package keeper 2 | 3 | import ( 4 | "context" 5 | 6 | sdk "github.com/cosmos/cosmos-sdk/types" 7 | "github.com/notional-labs/anone/x/claims/types" 8 | ) 9 | 10 | func (k msgServer) ClaimFor(goCtx context.Context, msg *types.MsgClaimFor) (*types.MsgClaimForResponse, error) { 11 | ctx := sdk.UnwrapSDKContext(goCtx) 12 | 13 | // check if sender address is valid 14 | _, err := sdk.AccAddressFromBech32(msg.Sender) 15 | if err != nil { 16 | return nil, err 17 | } 18 | 19 | // get wallet address 20 | address, err := sdk.AccAddressFromBech32(msg.Address) 21 | if err != nil { 22 | return nil, err 23 | } 24 | 25 | // get module params and check if airdrop is enabled 26 | params := k.GetParams(ctx) 27 | if !params.IsAirdropEnabled(ctx.BlockTime()) { 28 | return nil, types.ErrAirdropNotEnabled 29 | } 30 | 31 | // check if sender and sender's action is allowed 32 | allowed := false 33 | for _, authorization := range params.AllowedClaimers { 34 | if authorization.ContractAddress == msg.Sender && authorization.Action == msg.Action { 35 | allowed = true 36 | break 37 | } 38 | } 39 | if !allowed { 40 | return nil, types.ErrUnauthorizedClaimer 41 | } 42 | 43 | // with this address, for this action, claim a certain amount of coins 44 | coins, err := k.Keeper.ClaimCoinsForAction(ctx, address, msg.GetAction()) 45 | if err != nil { 46 | return nil, err 47 | } 48 | 49 | // emit a message event with attr {module, sender} 50 | ctx.EventManager().EmitEvents(sdk.Events{ 51 | sdk.NewEvent( 52 | sdk.EventTypeMessage, 53 | sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), 54 | sdk.NewAttribute(sdk.AttributeKeySender, msg.Sender), 55 | ), 56 | }) 57 | return &types.MsgClaimForResponse{ 58 | Address: msg.Address, 59 | ClaimedAmount: coins, 60 | }, nil 61 | } 62 | -------------------------------------------------------------------------------- /internal/wasm/encoder.go: -------------------------------------------------------------------------------- 1 | package wasm 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "github.com/CosmWasm/wasmd/x/wasm" 7 | sdk "github.com/cosmos/cosmos-sdk/types" 8 | sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" 9 | ) 10 | 11 | // Encoder describes behavior for Stargaze smart contract message encoding. 12 | // The contract address must ALWAYS be set as the Msg signer. 13 | type Encoder func(contract sdk.AccAddress, data json.RawMessage, version string) ([]sdk.Msg, error) 14 | 15 | // MessageEncoders provides stargaze custom encoder for contracts 16 | func MessageEncoders(registry *EncoderRegistry) *wasm.MessageEncoders { 17 | return &wasm.MessageEncoders{ 18 | Custom: customEncoders(registry), 19 | } 20 | } 21 | 22 | type MessageEncodeRequest struct { 23 | Route string `json:"route"` 24 | MsgData json.RawMessage `json:"msg_data"` 25 | Version string `json:"version"` 26 | } 27 | 28 | func customEncoders(registry *EncoderRegistry) wasm.CustomEncoder { 29 | return func(sender sdk.AccAddress, m json.RawMessage) ([]sdk.Msg, error) { 30 | encodeRequest := &MessageEncodeRequest{} 31 | err := json.Unmarshal(m, encodeRequest) 32 | if err != nil { 33 | return nil, sdkerrors.Wrap(sdkerrors.ErrJSONUnmarshal, err.Error()) 34 | } 35 | encode, exists := registry.encoders[encodeRequest.Route] 36 | if !exists { 37 | return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "encoder not found for route: %s", encodeRequest.Route) 38 | } 39 | 40 | msgs, err := encode(sender, encodeRequest.MsgData, encodeRequest.Version) 41 | if err != nil { 42 | return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, err.Error()) 43 | } 44 | for _, msg := range msgs { 45 | if err := msg.ValidateBasic(); err != nil { 46 | return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, err.Error()) 47 | } 48 | } 49 | return msgs, nil 50 | } 51 | } -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/event.d.ts: -------------------------------------------------------------------------------- 1 | import { Writer, Reader } from 'protobufjs/minimal'; 2 | export declare const protobufPackage = "cosmos.authz.v1beta1"; 3 | /** EventGrant is emitted on Msg/Grant */ 4 | export interface EventGrant { 5 | /** Msg type URL for which an autorization is granted */ 6 | msgTypeUrl: string; 7 | /** Granter account address */ 8 | granter: string; 9 | /** Grantee account address */ 10 | grantee: string; 11 | } 12 | /** EventRevoke is emitted on Msg/Revoke */ 13 | export interface EventRevoke { 14 | /** Msg type URL for which an autorization is revoked */ 15 | msgTypeUrl: string; 16 | /** Granter account address */ 17 | granter: string; 18 | /** Grantee account address */ 19 | grantee: string; 20 | } 21 | export declare const EventGrant: { 22 | encode(message: EventGrant, writer?: Writer): Writer; 23 | decode(input: Reader | Uint8Array, length?: number): EventGrant; 24 | fromJSON(object: any): EventGrant; 25 | toJSON(message: EventGrant): unknown; 26 | fromPartial(object: DeepPartial): EventGrant; 27 | }; 28 | export declare const EventRevoke: { 29 | encode(message: EventRevoke, writer?: Writer): Writer; 30 | decode(input: Reader | Uint8Array, length?: number): EventRevoke; 31 | fromJSON(object: any): EventRevoke; 32 | toJSON(message: EventRevoke): unknown; 33 | fromPartial(object: DeepPartial): EventRevoke; 34 | }; 35 | declare type Builtin = Date | Function | Uint8Array | string | number | undefined; 36 | export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { 37 | [K in keyof T]?: DeepPartial; 38 | } : Partial; 39 | export {}; 40 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/module/types/cosmos/authz/v1beta1/authz.d.ts: -------------------------------------------------------------------------------- 1 | import { Any } from '../../../google/protobuf/any'; 2 | import { Writer, Reader } from 'protobufjs/minimal'; 3 | export declare const protobufPackage = "cosmos.authz.v1beta1"; 4 | /** 5 | * GenericAuthorization gives the grantee unrestricted permissions to execute 6 | * the provided method on behalf of the granter's account. 7 | */ 8 | export interface GenericAuthorization { 9 | /** Msg, identified by it's type URL, to grant unrestricted permissions to execute */ 10 | msg: string; 11 | } 12 | /** 13 | * Grant gives permissions to execute 14 | * the provide method with expiration time. 15 | */ 16 | export interface Grant { 17 | authorization: Any | undefined; 18 | expiration: Date | undefined; 19 | } 20 | export declare const GenericAuthorization: { 21 | encode(message: GenericAuthorization, writer?: Writer): Writer; 22 | decode(input: Reader | Uint8Array, length?: number): GenericAuthorization; 23 | fromJSON(object: any): GenericAuthorization; 24 | toJSON(message: GenericAuthorization): unknown; 25 | fromPartial(object: DeepPartial): GenericAuthorization; 26 | }; 27 | export declare const Grant: { 28 | encode(message: Grant, writer?: Writer): Writer; 29 | decode(input: Reader | Uint8Array, length?: number): Grant; 30 | fromJSON(object: any): Grant; 31 | toJSON(message: Grant): unknown; 32 | fromPartial(object: DeepPartial): Grant; 33 | }; 34 | declare type Builtin = Date | Function | Uint8Array | string | number | undefined; 35 | export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { 36 | [K in keyof T]?: DeepPartial; 37 | } : Partial; 38 | export {}; 39 | -------------------------------------------------------------------------------- /scripts/protoc-gen-installer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ue 4 | 5 | DESTDIR=$HOME 6 | PREFIX=${PREFIX:-go} 7 | UNAME_S="$(uname -s 2>/dev/null)" 8 | UNAME_M="$(uname -m 2>/dev/null)" 9 | PROTOC_VERSION=3.13.0 10 | PROTOC_GRPC_GATEWAY_VERSION=1.14.7 11 | 12 | f_abort() { 13 | local l_rc=$1 14 | shift 15 | 16 | echo $@ >&2 17 | exit ${l_rc} 18 | } 19 | 20 | case "${UNAME_S}" in 21 | Linux) 22 | PROTOC_ZIP="protoc-${PROTOC_VERSION}-linux-x86_64.zip" 23 | PROTOC_GRPC_GATEWAY_BIN="protoc-gen-grpc-gateway-v${PROTOC_GRPC_GATEWAY_VERSION}-linux-x86_64" 24 | ;; 25 | Darwin) 26 | PROTOC_ZIP="protoc-${PROTOC_VERSION}-osx-x86_64.zip" 27 | PROTOC_GRPC_GATEWAY_BIN="protoc-gen-grpc-gateway-v${PROTOC_GRPC_GATEWAY_VERSION}-darwin-x86_64" 28 | ;; 29 | *) 30 | f_abort 1 "Unknown kernel name. Exiting." 31 | esac 32 | 33 | TEMPDIR="$(mktemp -d)" 34 | 35 | trap "rm -rvf ${TEMPDIR}" EXIT 36 | 37 | f_print_installing_with_padding() { 38 | printf "Installing %30s ..." "$1" >&2 39 | } 40 | 41 | f_print_done() { 42 | echo -e "\tDONE" >&2 43 | } 44 | 45 | f_ensure_tools() { 46 | ! which curl &>/dev/null && f_abort 2 "couldn't find curl, aborting" || true 47 | } 48 | 49 | f_ensure_dirs() { 50 | mkdir -p "${DESTDIR}/${PREFIX}/bin" 51 | } 52 | 53 | f_needs_install() { 54 | if [ -x $1 ]; then 55 | echo -e "\talready installed. Skipping." >&2 56 | return 1 57 | fi 58 | 59 | return 0 60 | } 61 | 62 | f_install_protoc_gen_grpc_gateway() { 63 | f_print_installing_with_padding protoc-gen-grpc-gateway 64 | f_needs_install "${DESTDIR}/${PREFIX}/bin/protoc-gen-grpc-gateway" || return 0 65 | 66 | curl -o "${DESTDIR}/${PREFIX}/bin/protoc-gen-grpc-gateway" -sSL "https://github.com/grpc-ecosystem/grpc-gateway/releases/download/v${PROTOC_GRPC_GATEWAY_VERSION}/${PROTOC_GRPC_GATEWAY_BIN}" 67 | f_print_done 68 | } 69 | 70 | f_ensure_tools 71 | f_ensure_dirs 72 | f_install_protoc_gen_grpc_gateway -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.gov.v1beta1/module/types/cosmos/gov/v1beta1/genesis.d.ts: -------------------------------------------------------------------------------- 1 | import { Writer, Reader } from 'protobufjs/minimal'; 2 | import { Deposit, Vote, Proposal, DepositParams, VotingParams, TallyParams } from '../../../cosmos/gov/v1beta1/gov'; 3 | export declare const protobufPackage = "cosmos.gov.v1beta1"; 4 | /** GenesisState defines the gov module's genesis state. */ 5 | export interface GenesisState { 6 | /** starting_proposal_id is the ID of the starting proposal. */ 7 | startingProposalId: number; 8 | /** deposits defines all the deposits present at genesis. */ 9 | deposits: Deposit[]; 10 | /** votes defines all the votes present at genesis. */ 11 | votes: Vote[]; 12 | /** proposals defines all the proposals present at genesis. */ 13 | proposals: Proposal[]; 14 | /** params defines all the paramaters of related to deposit. */ 15 | depositParams: DepositParams | undefined; 16 | /** params defines all the paramaters of related to voting. */ 17 | votingParams: VotingParams | undefined; 18 | /** params defines all the paramaters of related to tally. */ 19 | tallyParams: TallyParams | undefined; 20 | } 21 | export declare const GenesisState: { 22 | encode(message: GenesisState, writer?: Writer): Writer; 23 | decode(input: Reader | Uint8Array, length?: number): GenesisState; 24 | fromJSON(object: any): GenesisState; 25 | toJSON(message: GenesisState): unknown; 26 | fromPartial(object: DeepPartial): GenesisState; 27 | }; 28 | declare type Builtin = Date | Function | Uint8Array | string | number | undefined; 29 | export declare type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { 30 | [K in keyof T]?: DeepPartial; 31 | } : Partial; 32 | export {}; 33 | -------------------------------------------------------------------------------- /proto/claims/params.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package notionallabs.anone.claims; 3 | 4 | import "gogoproto/gogo.proto"; 5 | import "google/protobuf/duration.proto"; 6 | import "google/protobuf/timestamp.proto"; 7 | import "claims/claim_record.proto"; 8 | 9 | option go_package = "github.com/notional-labs/anone/x/claims/types"; 10 | 11 | message ClaimAuthorization { 12 | string contract_address = 1 13 | [ (gogoproto.moretags) = "yaml:\"contract_address\"" ]; 14 | Action action = 2 [ (gogoproto.moretags) = "yaml:\"action\"" ]; 15 | } 16 | 17 | // Params defines the parameters for the module. 18 | message Params { 19 | option (gogoproto.goproto_stringer) = false; 20 | bool airdrop_enabled = 1; 21 | 22 | google.protobuf.Timestamp airdrop_start_time = 2 [ 23 | (gogoproto.stdtime) = true, 24 | (gogoproto.nullable) = false, 25 | (gogoproto.moretags) = "yaml:\"airdrop_start_time\"" 26 | ]; 27 | 28 | google.protobuf.Duration duration_until_decay = 3 [ 29 | (gogoproto.nullable) = false, 30 | (gogoproto.stdduration) = true, 31 | (gogoproto.jsontag) = "duration_until_decay,omitempty", 32 | (gogoproto.moretags) = "yaml:\"duration_until_decay\"" 33 | ]; 34 | google.protobuf.Duration duration_of_decay = 4 [ 35 | (gogoproto.nullable) = false, 36 | (gogoproto.stdduration) = true, 37 | (gogoproto.jsontag) = "duration_of_decay,omitempty", 38 | (gogoproto.moretags) = "yaml:\"duration_of_decay\"" 39 | ]; 40 | 41 | // denom of claimable asset 42 | string claim_denom = 5; 43 | 44 | // list of contracts and their allowed claim actions 45 | repeated ClaimAuthorization allowed_claimers = 6 [ 46 | (gogoproto.nullable) = false, 47 | (gogoproto.jsontag) = "allowed_claimers", 48 | (gogoproto.moretags) = "yaml:\"allowed_claimers\"" 49 | ]; 50 | 51 | map action_percentage = 7 [ 52 | (gogoproto.nullable) = false, 53 | (gogoproto.moretags) = "yaml:\"action_percentage\"" 54 | ]; 55 | 56 | } -------------------------------------------------------------------------------- /vue/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@starport/template", 3 | "version": "0.1.55", 4 | "description": "A Vue 3 boilerplate project utilizing @starport/vue and @starport/vuex", 5 | "author": "Tendermint, Inc ", 6 | "private": true, 7 | "scripts": { 8 | "serve": "vue-cli-service serve --mode=production --fix", 9 | "dev": "vue-cli-service serve", 10 | "lint": "vue-cli-service lint", 11 | "build": "vue-cli-service build", 12 | "test:unit": "vue-cli-service test:unit" 13 | }, 14 | "dependencies": { 15 | "@cosmjs/launchpad": "^0.26.1", 16 | "@cosmjs/proto-signing": "^0.26.1", 17 | "@cosmjs/stargate": "^0.26.1", 18 | "@starport/vue": "^0.1.55", 19 | "@starport/vuex": "^0.1.55", 20 | "axios": "^0.25.0", 21 | "core-js": "^3.18.2", 22 | "ethers": "^5.5.2", 23 | "vue": "^3.2.6", 24 | "vue-router": "^4.0.3", 25 | "vuex": "^4.0.0" 26 | }, 27 | "devDependencies": { 28 | "@babel/core": "^7.15.5", 29 | "@babel/eslint-parser": "^7.15.7", 30 | "@babel/plugin-transform-runtime": "^7.16.0", 31 | "@vue/cli-plugin-babel": "~5.0.0-beta.4", 32 | "@vue/cli-plugin-eslint": "~5.0.0-beta.4", 33 | "@vue/cli-plugin-router": "~5.0.0-beta.4", 34 | "@vue/cli-plugin-unit-jest": "~5.0.0-beta.4", 35 | "@vue/cli-plugin-vuex": "~5.0.0-beta.4", 36 | "@vue/cli-service": "~5.0.0-beta.4", 37 | "@vue/compiler-sfc": "^3.2.19", 38 | "@vue/eslint-config-prettier": "^6.0.0", 39 | "@vue/test-utils": "^2.0.0-0", 40 | "@vue/vue3-jest": "^27.0.0-alpha.1", 41 | "babel-jest": "^27.2.4", 42 | "eslint": "^7.32.0", 43 | "eslint-plugin-prettier": "^3.4.1", 44 | "eslint-plugin-vue": "^7.19.1", 45 | "jest": "^27.2.4", 46 | "lint-staged": "^11.2.0", 47 | "node-polyfill-webpack-plugin": "^1.1.4", 48 | "prettier": "^2.4.1", 49 | "sass": "^1.42.1", 50 | "sass-loader": "^12.1.0" 51 | }, 52 | "gitHooks": { 53 | "pre-commit": "lint-staged" 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /anone-cw721/scripts/mint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #NODE="tcp://localhost:2281" 4 | NODE="http://65.108.128.139:2281" 5 | #OWNER="test" 6 | CHAINID="anone-testnet-1" 7 | SLEEP_TIME="15s" 8 | CONTRACT="one1nc5tatafv6eyq7llkr2gv50ff9e22mnf70qgjlv737ktmt4eswrq9jdqcm" 9 | 10 | LATEST=$(bash scripts/query_all.sh | jq -r ".data.tokens | last") 11 | TOKEN_ID=$(($LATEST+1)) 12 | 13 | # CHANGE ONLY THIS 14 | OWNER="Developer" 15 | TOKEN_URI="https://drive.google.com/file/d/1HpYCJaIB4nEu54V8cPAK1cCiIur9Ua0M/view?usp=sharing" 16 | 17 | # EXTENSION DATA 18 | youtube_url="https://www.youtube.com/watch?v=dQw4w9WgXcQ" 19 | animation_url="CHANGE HERE" 20 | background_color="CHANGE HERE" 21 | description="CHANGE HERE" 22 | external_url="CHANGE HERE" 23 | image="CHANGE HERE" 24 | image_data="CHANGE HERE" 25 | name="CHANGE HERE" 26 | EXTENSION="{ 27 | \"youtube_url\":\"$youtube_url\", 28 | \"animation_url\":\"$animation_url\", 29 | \"background_color\":\"$background_color\", 30 | \"description\":\"$description\", 31 | \"external_url\":\"$external_url\", 32 | \"image\":\"$image\", 33 | \"image_data\":\"$image_data\", 34 | \"name\":\"$name\" 35 | }" 36 | 37 | MINT="{\"mint\": {\"extension\":$EXTENSION, \"token_id\":\"$TOKEN_ID\", \"owner\": \"$(anoned keys show $OWNER -a)\", \"token_uri\": \"$TOKEN_URI\"}}" 38 | 39 | echo $MINT 40 | 41 | RES=$(anoned tx wasm execute "$CONTRACT" "$MINT" --from "$OWNER" -y --output json --chain-id "$CHAINID" --node "$NODE" --gas 35000000 --fees 875000uan1 -y --output json) 42 | echo $RES 43 | 44 | TXHASH=$(echo $RES | jq -r .txhash) 45 | 46 | echo $TXHASH 47 | 48 | # sleep for chain to update 49 | sleep "$SLEEP_TIME" 50 | 51 | RAW_LOG=$(anoned query tx "$TXHASH" --chain-id "$CHAINID" --node "$NODE" -o json | jq -r .raw_log) 52 | 53 | echo $RAW_LOG 54 | 55 | NAME_QUERY="{\"nft_info\": {\"token_id\": \"$TOKEN_ID\"}}" 56 | OWNER_OF=$(anoned query wasm contract-state smart "$CONTRACT" "$NAME_QUERY" --node "$NODE" --output json) 57 | echo $OWNER_OF 58 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.slashing.v1beta1/module/index.ts: -------------------------------------------------------------------------------- 1 | // THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. 2 | 3 | import { StdFee } from "@cosmjs/launchpad"; 4 | import { SigningStargateClient } from "@cosmjs/stargate"; 5 | import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; 6 | import { Api } from "./rest"; 7 | import { MsgUnjail } from "./types/cosmos/slashing/v1beta1/tx"; 8 | 9 | 10 | const types = [ 11 | ["/cosmos.slashing.v1beta1.MsgUnjail", MsgUnjail], 12 | 13 | ]; 14 | export const MissingWalletError = new Error("wallet is required"); 15 | 16 | export const registry = new Registry(types); 17 | 18 | const defaultFee = { 19 | amount: [], 20 | gas: "200000", 21 | }; 22 | 23 | interface TxClientOptions { 24 | addr: string 25 | } 26 | 27 | interface SignAndBroadcastOptions { 28 | fee: StdFee, 29 | memo?: string 30 | } 31 | 32 | const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { 33 | if (!wallet) throw MissingWalletError; 34 | let client; 35 | if (addr) { 36 | client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); 37 | }else{ 38 | client = await SigningStargateClient.offline( wallet, { registry }); 39 | } 40 | const { address } = (await wallet.getAccounts())[0]; 41 | 42 | return { 43 | signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), 44 | msgUnjail: (data: MsgUnjail): EncodeObject => ({ typeUrl: "/cosmos.slashing.v1beta1.MsgUnjail", value: data }), 45 | 46 | }; 47 | }; 48 | 49 | interface QueryClientOptions { 50 | addr: string 51 | } 52 | 53 | const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { 54 | return new Api({ baseUrl: addr }); 55 | }; 56 | 57 | export { 58 | txClient, 59 | queryClient, 60 | }; 61 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/ibc-go/ibc.applications.transfer.v1/module/index.ts: -------------------------------------------------------------------------------- 1 | // THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. 2 | 3 | import { StdFee } from "@cosmjs/launchpad"; 4 | import { SigningStargateClient } from "@cosmjs/stargate"; 5 | import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; 6 | import { Api } from "./rest"; 7 | import { MsgTransfer } from "./types/ibc/applications/transfer/v1/tx"; 8 | 9 | 10 | const types = [ 11 | ["/ibc.applications.transfer.v1.MsgTransfer", MsgTransfer], 12 | 13 | ]; 14 | export const MissingWalletError = new Error("wallet is required"); 15 | 16 | export const registry = new Registry(types); 17 | 18 | const defaultFee = { 19 | amount: [], 20 | gas: "200000", 21 | }; 22 | 23 | interface TxClientOptions { 24 | addr: string 25 | } 26 | 27 | interface SignAndBroadcastOptions { 28 | fee: StdFee, 29 | memo?: string 30 | } 31 | 32 | const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { 33 | if (!wallet) throw MissingWalletError; 34 | let client; 35 | if (addr) { 36 | client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); 37 | }else{ 38 | client = await SigningStargateClient.offline( wallet, { registry }); 39 | } 40 | const { address } = (await wallet.getAccounts())[0]; 41 | 42 | return { 43 | signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), 44 | msgTransfer: (data: MsgTransfer): EncodeObject => ({ typeUrl: "/ibc.applications.transfer.v1.MsgTransfer", value: data }), 45 | 46 | }; 47 | }; 48 | 49 | interface QueryClientOptions { 50 | addr: string 51 | } 52 | 53 | const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { 54 | return new Api({ baseUrl: addr }); 55 | }; 56 | 57 | export { 58 | txClient, 59 | queryClient, 60 | }; 61 | -------------------------------------------------------------------------------- /anone-cw721/scripts/deploy_contract.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #NODE="tcp://localhost:2281" 4 | NODE="http://65.108.128.139:2281" 5 | #ACCOUNT="test" 6 | ACCOUNT="Developer" 7 | CHAINID="anone-testnet-1" 8 | CONTRACT_DIR="artifacts/anone_cw721.wasm" 9 | SLEEP_TIME="15s" 10 | 11 | RES=$(anoned tx wasm store "$CONTRACT_DIR" --from "$ACCOUNT" -y --output json --chain-id "$CHAINID" --node "$NODE" --gas 35000000 --fees 875000uan1 -y --output json) 12 | echo $RES 13 | 14 | if [ "$(echo $RES | jq -r .raw_log)" != "[]" ]; then 15 | # exit 16 | echo "ERROR = $(echo $RES | jq .raw_log)" 17 | exit 1 18 | else 19 | echo "STORE SUCCESS" 20 | fi 21 | 22 | TXHASH=$(echo $RES | jq -r .txhash) 23 | 24 | echo $TXHASH 25 | 26 | # sleep for chain to update 27 | sleep "$SLEEP_TIME" 28 | 29 | RAW_LOG=$(anoned query tx "$TXHASH" --chain-id "$CHAINID" --node "$NODE" -o json | jq -r .raw_log) 30 | 31 | echo $RAW_LOG 32 | 33 | CODE_ID=$(echo $RAW_LOG | jq -r .[0].events[1].attributes[0].value) 34 | 35 | echo $CODE_ID 36 | 37 | INIT="{\"name\": \"Anone NFT Contract\", \"symbol\": \"ANONE_NFT\", \"minter\": \"$(anoned keys show $ACCOUNT -a)\"}" 38 | INIT_JSON=$(anoned tx wasm instantiate "$CODE_ID" "$INIT" --from "$ACCOUNT" --label "anone-cw721" -y --chain-id "$CHAINID" --node "$NODE" --gas 180000 --fees 100000uan1 -o json) 39 | 40 | echo "INIT_JSON = $INIT_JSON" 41 | 42 | if [ "$(echo $INIT_JSON | jq -r .raw_log)" != "[]" ]; then 43 | # exit 44 | echo "ERROR = $(echo $INIT_JSON | jq .raw_log)" 45 | exit 1 46 | else 47 | echo "INSTANTIATE SUCCESS" 48 | fi 49 | 50 | # sleep for chain to update 51 | sleep "$SLEEP_TIME" 52 | 53 | RAW_LOG=$(anoned query tx "$(echo $INIT_JSON | jq -r .txhash)" --chain-id "$CHAINID" --node "$NODE" --output json | jq -r .raw_log) 54 | 55 | echo "RAW_LOG = $RAW_LOG" 56 | 57 | CONTRACT_ADDRESS=$(echo $RAW_LOG | jq -r .[0].events[0].attributes[0].value) 58 | 59 | echo "CONTRACT ADDRESS = $CONTRACT_ADDRESS" 60 | 61 | # anoned query wasm contract-state smart "$CONTRACT_ADDRESS" '{"list_channels": {}}' --chain-id "$CHAINID" --node "$NODE" 62 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.crisis.v1beta1/module/index.ts: -------------------------------------------------------------------------------- 1 | // THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. 2 | 3 | import { StdFee } from "@cosmjs/launchpad"; 4 | import { SigningStargateClient } from "@cosmjs/stargate"; 5 | import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; 6 | import { Api } from "./rest"; 7 | import { MsgVerifyInvariant } from "./types/cosmos/crisis/v1beta1/tx"; 8 | 9 | 10 | const types = [ 11 | ["/cosmos.crisis.v1beta1.MsgVerifyInvariant", MsgVerifyInvariant], 12 | 13 | ]; 14 | export const MissingWalletError = new Error("wallet is required"); 15 | 16 | export const registry = new Registry(types); 17 | 18 | const defaultFee = { 19 | amount: [], 20 | gas: "200000", 21 | }; 22 | 23 | interface TxClientOptions { 24 | addr: string 25 | } 26 | 27 | interface SignAndBroadcastOptions { 28 | fee: StdFee, 29 | memo?: string 30 | } 31 | 32 | const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { 33 | if (!wallet) throw MissingWalletError; 34 | let client; 35 | if (addr) { 36 | client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); 37 | }else{ 38 | client = await SigningStargateClient.offline( wallet, { registry }); 39 | } 40 | const { address } = (await wallet.getAccounts())[0]; 41 | 42 | return { 43 | signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), 44 | msgVerifyInvariant: (data: MsgVerifyInvariant): EncodeObject => ({ typeUrl: "/cosmos.crisis.v1beta1.MsgVerifyInvariant", value: data }), 45 | 46 | }; 47 | }; 48 | 49 | interface QueryClientOptions { 50 | addr: string 51 | } 52 | 53 | const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { 54 | return new Api({ baseUrl: addr }); 55 | }; 56 | 57 | export { 58 | txClient, 59 | queryClient, 60 | }; 61 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.evidence.v1beta1/module/index.ts: -------------------------------------------------------------------------------- 1 | // THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. 2 | 3 | import { StdFee } from "@cosmjs/launchpad"; 4 | import { SigningStargateClient } from "@cosmjs/stargate"; 5 | import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; 6 | import { Api } from "./rest"; 7 | import { MsgSubmitEvidence } from "./types/cosmos/evidence/v1beta1/tx"; 8 | 9 | 10 | const types = [ 11 | ["/cosmos.evidence.v1beta1.MsgSubmitEvidence", MsgSubmitEvidence], 12 | 13 | ]; 14 | export const MissingWalletError = new Error("wallet is required"); 15 | 16 | export const registry = new Registry(types); 17 | 18 | const defaultFee = { 19 | amount: [], 20 | gas: "200000", 21 | }; 22 | 23 | interface TxClientOptions { 24 | addr: string 25 | } 26 | 27 | interface SignAndBroadcastOptions { 28 | fee: StdFee, 29 | memo?: string 30 | } 31 | 32 | const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { 33 | if (!wallet) throw MissingWalletError; 34 | let client; 35 | if (addr) { 36 | client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); 37 | }else{ 38 | client = await SigningStargateClient.offline( wallet, { registry }); 39 | } 40 | const { address } = (await wallet.getAccounts())[0]; 41 | 42 | return { 43 | signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), 44 | msgSubmitEvidence: (data: MsgSubmitEvidence): EncodeObject => ({ typeUrl: "/cosmos.evidence.v1beta1.MsgSubmitEvidence", value: data }), 45 | 46 | }; 47 | }; 48 | 49 | interface QueryClientOptions { 50 | addr: string 51 | } 52 | 53 | const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { 54 | return new Api({ baseUrl: addr }); 55 | }; 56 | 57 | export { 58 | txClient, 59 | queryClient, 60 | }; 61 | -------------------------------------------------------------------------------- /vue/src/store/generated/cosmos/cosmos-sdk/cosmos.vesting.v1beta1/module/index.ts: -------------------------------------------------------------------------------- 1 | // THIS FILE IS GENERATED AUTOMATICALLY. DO NOT MODIFY. 2 | 3 | import { StdFee } from "@cosmjs/launchpad"; 4 | import { SigningStargateClient } from "@cosmjs/stargate"; 5 | import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; 6 | import { Api } from "./rest"; 7 | import { MsgCreateVestingAccount } from "./types/cosmos/vesting/v1beta1/tx"; 8 | 9 | 10 | const types = [ 11 | ["/cosmos.vesting.v1beta1.MsgCreateVestingAccount", MsgCreateVestingAccount], 12 | 13 | ]; 14 | export const MissingWalletError = new Error("wallet is required"); 15 | 16 | export const registry = new Registry(types); 17 | 18 | const defaultFee = { 19 | amount: [], 20 | gas: "200000", 21 | }; 22 | 23 | interface TxClientOptions { 24 | addr: string 25 | } 26 | 27 | interface SignAndBroadcastOptions { 28 | fee: StdFee, 29 | memo?: string 30 | } 31 | 32 | const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions = { addr: "http://localhost:26657" }) => { 33 | if (!wallet) throw MissingWalletError; 34 | let client; 35 | if (addr) { 36 | client = await SigningStargateClient.connectWithSigner(addr, wallet, { registry }); 37 | }else{ 38 | client = await SigningStargateClient.offline( wallet, { registry }); 39 | } 40 | const { address } = (await wallet.getAccounts())[0]; 41 | 42 | return { 43 | signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo), 44 | msgCreateVestingAccount: (data: MsgCreateVestingAccount): EncodeObject => ({ typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccount", value: data }), 45 | 46 | }; 47 | }; 48 | 49 | interface QueryClientOptions { 50 | addr: string 51 | } 52 | 53 | const queryClient = async ({ addr: addr }: QueryClientOptions = { addr: "http://localhost:1317" }) => { 54 | return new Api({ baseUrl: addr }); 55 | }; 56 | 57 | export { 58 | txClient, 59 | queryClient, 60 | }; 61 | -------------------------------------------------------------------------------- /lambda/src/Server.ts: -------------------------------------------------------------------------------- 1 | import cookieParser from 'cookie-parser'; 2 | import morgan from 'morgan'; 3 | import path from 'path'; 4 | import helmet from 'helmet'; 5 | 6 | import express, { NextFunction, Request, Response } from 'express'; 7 | import StatusCodes from 'http-status-codes'; 8 | import 'express-async-errors'; 9 | 10 | import BaseRouter from './routes'; 11 | 12 | 13 | const app = express(); 14 | const { BAD_REQUEST } = StatusCodes; 15 | 16 | 17 | 18 | /************************************************************************************ 19 | * Set basic express settings 20 | ***********************************************************************************/ 21 | 22 | app.use(express.json()); 23 | app.use(express.urlencoded({extended: true})); 24 | app.use(cookieParser()); 25 | 26 | // Show routes called in console during development 27 | if (process.env.NODE_ENV === 'development') { 28 | app.use(morgan('dev')); 29 | } 30 | 31 | // Security 32 | if (process.env.NODE_ENV === 'production') { 33 | app.use(helmet()); 34 | } 35 | 36 | // Add APIs 37 | app.use('/api', BaseRouter); 38 | 39 | // Print API errors 40 | // eslint-disable-next-line @typescript-eslint/no-unused-vars 41 | app.use((err: Error, req: Request, res: Response, next: NextFunction) => { 42 | console.error(err, true); 43 | return res.status(BAD_REQUEST).json({ 44 | error: err.message, 45 | }); 46 | }); 47 | 48 | 49 | 50 | /************************************************************************************ 51 | * Serve front-end content 52 | ***********************************************************************************/ 53 | 54 | const viewsDir = path.join(__dirname, 'views'); 55 | app.set('views', viewsDir); 56 | const staticDir = path.join(__dirname, 'public'); 57 | app.use(express.static(staticDir)); 58 | app.get('*', (req: Request, res: Response) => { 59 | res.sendFile('index.html', {root: viewsDir}); 60 | }); 61 | 62 | // Export express instance 63 | export default app; 64 | -------------------------------------------------------------------------------- /lambda/src/routes/testing.ts: -------------------------------------------------------------------------------- 1 | import AWS from 'aws-sdk'; 2 | import { Router, Request, Response } from 'express'; 3 | 4 | 5 | const router = Router(); 6 | 7 | import {handler} from "../handler"; 8 | 9 | // eslint-disable-next-line @typescript-eslint/no-misused-promises 10 | router.post('/attest', async (req: Request, res: Response) => { 11 | const event = { 12 | "version": "2.0", 13 | "routeKey": "ANY /nodejs-apig-function-1G3XMPLZXVXYI", 14 | "rawPath": "/default/nodejs-apig-function-1G3XMPLZXVXYI", 15 | "rawQueryString": "", 16 | "cookies": [ 17 | "s_fid=7AABXMPL1AFD9BBF-0643XMPL09956DE2", 18 | "regStatus=pre-register" 19 | ], 20 | "headers": { 21 | "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", 22 | "accept-encoding": "gzip, deflate, br" 23 | }, 24 | "requestContext": { 25 | "accountId": "123456789012", 26 | "apiId": "r3pmxmplak", 27 | "domainName": "r3pmxmplak.execute-api.us-east-2.amazonaws.com", 28 | "domainPrefix": "r3pmxmplak", 29 | "http": { 30 | "method": "GET", 31 | "path": "/default/nodejs-apig-function-1G3XMPLZXVXYI", 32 | "protocol": "HTTP/1.1", 33 | "sourceIp": "205.255.255.176", 34 | "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36" 35 | }, 36 | "requestId": "JKJaXmPLvHcESHA=", 37 | "routeKey": "ANY /nodejs-apig-function-1G3XMPLZXVXYI", 38 | "stage": "default", 39 | "time": "10/Mar/2020:05:16:23 +0000", 40 | "timeEpoch": 1583817383220 41 | }, 42 | "isBase64Encoded": true, 43 | body: {} 44 | }; 45 | event.body = req.body; 46 | const output = await handler(event, {}) 47 | 48 | //res.json(output); 49 | res.send(output); 50 | 51 | }); 52 | 53 | export default router; 54 | --------------------------------------------------------------------------------