├── .github └── workflows │ ├── doctest.yml │ ├── lint.yml │ └── test.yml ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── LICENSE-Apache ├── LICENSE-MIT ├── MIGRATION.md ├── README.md ├── assets └── beaker.png ├── beaker.code-workspace ├── docs ├── commands │ ├── README.md │ ├── beaker_key.md │ ├── beaker_task.md │ ├── beaker_wasm.md │ ├── beaker_wasm_proposal.md │ └── beaker_wasm_proposal_query.md └── config │ ├── README.md │ ├── console.md │ ├── global.md │ ├── wasm.md │ └── workspace.md ├── examples └── scripting-cookbook │ ├── .beaker │ └── state.json │ ├── .cargo │ └── config │ ├── .gitignore │ ├── Beaker.toml │ ├── Cargo.toml │ ├── contracts │ ├── .gitkeep │ ├── calculator │ │ ├── .cargo │ │ │ └── config │ │ ├── .editorconfig │ │ ├── .github │ │ │ └── workflows │ │ │ │ ├── Basic.yml │ │ │ │ └── Release.yml │ │ ├── .gitignore │ │ ├── Cargo.toml │ │ ├── LICENSE │ │ ├── NOTICE │ │ ├── README.md │ │ └── src │ │ │ ├── bin │ │ │ └── schema.rs │ │ │ ├── contract.rs │ │ │ ├── error.rs │ │ │ ├── lib.rs │ │ │ ├── msg.rs │ │ │ └── state.rs │ ├── op-add │ │ ├── .cargo │ │ │ └── config │ │ ├── .editorconfig │ │ ├── .github │ │ │ └── workflows │ │ │ │ ├── Basic.yml │ │ │ │ └── Release.yml │ │ ├── .gitignore │ │ ├── Cargo.toml │ │ ├── LICENSE │ │ ├── NOTICE │ │ ├── README.md │ │ └── src │ │ │ ├── bin │ │ │ └── schema.rs │ │ │ ├── contract.rs │ │ │ ├── error.rs │ │ │ ├── lib.rs │ │ │ ├── msg.rs │ │ │ └── state.rs │ └── op-mul │ │ ├── .cargo │ │ └── config │ │ ├── .editorconfig │ │ ├── .github │ │ └── workflows │ │ │ ├── Basic.yml │ │ │ └── Release.yml │ │ ├── .gitignore │ │ ├── Cargo.toml │ │ ├── LICENSE │ │ ├── NOTICE │ │ ├── README.md │ │ └── src │ │ ├── bin │ │ └── schema.rs │ │ ├── contract.rs │ │ ├── error.rs │ │ ├── lib.rs │ │ ├── msg.rs │ │ └── state.rs │ ├── tasks │ ├── deploy.rhai │ ├── lib │ │ └── shared_args.rhai │ └── register_ops.rhai │ └── ts │ └── sdk │ ├── .gitattributes │ ├── .gitignore │ ├── LICENSE │ ├── README.md │ ├── jest.config.js │ ├── package.json │ ├── rollup.config.js │ ├── scripts │ └── codegen.js │ ├── src │ └── index.ts │ ├── tsconfig.bundle.json │ ├── tsconfig.json │ └── typedoc.json ├── packages ├── cli │ ├── .gitignore │ ├── Cargo.toml │ ├── README.md │ ├── docs │ │ ├── commands │ │ │ ├── README.md │ │ │ ├── beaker_key.md │ │ │ ├── beaker_task.md │ │ │ ├── beaker_wasm.md │ │ │ ├── beaker_wasm_proposal.md │ │ │ └── beaker_wasm_proposal_query.md │ │ └── config │ │ │ ├── README.md │ │ │ ├── console.md │ │ │ ├── global.md │ │ │ ├── wasm.md │ │ │ └── workspace.md │ └── src │ │ ├── framework │ │ ├── config.rs │ │ ├── context.rs │ │ ├── macros.rs │ │ ├── mod.rs │ │ └── module.rs │ │ ├── lib.rs │ │ ├── main.rs │ │ ├── modules │ │ ├── key │ │ │ ├── config.rs │ │ │ ├── entrypoint.rs │ │ │ └── mod.rs │ │ ├── mod.rs │ │ ├── task │ │ │ ├── config.rs │ │ │ ├── entrypoint.rs │ │ │ ├── mod.rs │ │ │ └── script_mod │ │ │ │ ├── mod.rs │ │ │ │ ├── wasm.rs │ │ │ │ └── wasm_proposal.rs │ │ ├── wasm │ │ │ ├── args.rs │ │ │ ├── config.rs │ │ │ ├── entrypoint.rs │ │ │ ├── mod.rs │ │ │ ├── ops │ │ │ │ ├── build.rs │ │ │ │ ├── clear_admin.rs │ │ │ │ ├── deploy.rs │ │ │ │ ├── execute.rs │ │ │ │ ├── instantiate.rs │ │ │ │ ├── migrate.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── new.rs │ │ │ │ ├── query.rs │ │ │ │ ├── store_code.rs │ │ │ │ ├── update_admin.rs │ │ │ │ └── upgrade.rs │ │ │ └── proposal │ │ │ │ ├── entrypoint.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── ops │ │ │ │ ├── mod.rs │ │ │ │ ├── propose.rs │ │ │ │ ├── query.rs │ │ │ │ └── vote.rs │ │ │ │ └── proposal_struct.rs │ │ └── workspace │ │ │ ├── config.rs │ │ │ ├── entrypoint.rs │ │ │ ├── mod.rs │ │ │ └── ops.rs │ │ └── support │ │ ├── coin.rs │ │ ├── command.rs │ │ ├── cosmos.rs │ │ ├── future.rs │ │ ├── gas.rs │ │ ├── hooks.rs │ │ ├── mod.rs │ │ ├── node.rs │ │ ├── ops_response.rs │ │ ├── permission.rs │ │ ├── proto.rs │ │ ├── signer.rs │ │ ├── state.rs │ │ ├── string.rs │ │ ├── template.rs │ │ └── wasm.rs ├── data_doc │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── data_doc_derive │ ├── Cargo.toml │ ├── src │ │ └── lib.rs │ └── tests │ │ ├── enum.rs │ │ ├── nested.rs │ │ ├── simple.rs │ │ └── simple_with_map.rs └── gen_docs │ ├── Cargo.toml │ └── src │ ├── cmark.rs │ ├── command.rs │ ├── config.rs │ ├── document.rs │ ├── lib.rs │ └── main.rs ├── templates └── project │ ├── .beaker │ ├── state.json │ └── state.local.json │ ├── .cargo │ └── config │ ├── .gitignore │ ├── Beaker.toml │ ├── Cargo.toml │ ├── cargo-generate.toml │ ├── contracts │ ├── .gitkeep │ └── counter │ │ ├── .cargo │ │ └── config │ │ ├── .circleci │ │ └── config.yml │ │ ├── .editorconfig │ │ ├── .github │ │ └── workflows │ │ │ ├── Basic.yml │ │ │ └── Release.yml │ │ ├── .gitignore │ │ ├── .gitpod.Dockerfile │ │ ├── .gitpod.yml │ │ ├── Cargo.toml │ │ ├── Developing.md │ │ ├── Importing.md │ │ ├── LICENSE │ │ ├── NOTICE │ │ ├── Publishing.md │ │ ├── README.md │ │ └── src │ │ ├── bin │ │ └── schema.rs │ │ ├── contract.rs │ │ ├── error.rs │ │ ├── helpers.rs │ │ ├── integration_tests.rs │ │ ├── lib.rs │ │ ├── msg.rs │ │ └── state.rs │ ├── frontend │ ├── .beaker │ ├── .env.local.example │ ├── .env.production │ ├── .env.test │ ├── .eslintrc.json │ ├── .gitignore │ ├── README.md │ ├── api │ │ └── counter.ts │ ├── lib │ │ ├── client.ts │ │ ├── conf.ts │ │ ├── state.ts │ │ └── window.d.ts │ ├── next-env.d.ts │ ├── next.config.js │ ├── package.json │ ├── pages │ │ ├── _app.tsx │ │ └── index.tsx │ ├── public │ │ └── favicon.ico │ ├── styles │ │ ├── Home.module.css │ │ └── globals.css │ └── tsconfig.json │ ├── pre-script.rhai │ └── ts │ └── sdk │ ├── .gitattributes │ ├── .gitignore │ ├── LICENSE │ ├── README.md │ ├── jest.config.js │ ├── package.json │ ├── rollup.config.js │ ├── scripts │ └── codegen.js │ ├── src │ └── index.ts │ ├── tsconfig.bundle.json │ ├── tsconfig.json │ └── typedoc.json └── ts └── beaker-console ├── .editorconfig ├── .eslintignore ├── .eslintrc.js ├── .gitattributes ├── .github ├── actions │ └── setup │ │ └── action.yaml └── workflows │ └── continuous-integrations.yaml ├── .gitignore ├── .prettierignore ├── LICENSE ├── README.md ├── dist ├── index.cjs ├── index.cjs.map ├── index.esm.js ├── index.esm.js.map ├── index.js ├── index.js.map ├── index.mjs ├── index.mjs.map ├── index.umd.js ├── index.umd.js.map ├── index.umd.min.js └── index.umd.min.js.map ├── docs ├── .nojekyll ├── README.md └── classes │ ├── Account.md │ └── Contract.md ├── jest.config.js ├── package-lock.json ├── package.json ├── prettier.config.js ├── rollup.config.js ├── src ├── account.ts ├── console.js ├── contract.ts ├── index.ts └── utils.ts ├── tsconfig.bundle.json ├── tsconfig.json ├── typedoc.json └── types ├── account.d.ts ├── account.d.ts.map ├── client.d.ts ├── client.d.ts.map ├── contract.d.ts ├── contract.d.ts.map ├── index.d.ts ├── index.d.ts.map ├── utils.d.ts └── utils.d.ts.map /.github/workflows/doctest.yml: -------------------------------------------------------------------------------- 1 | name: Docs 2 | on: 3 | pull_request: 4 | push: 5 | branches: 6 | - main 7 | env: 8 | RUST_BACKTRACE: 1 9 | 10 | jobs: 11 | docs: 12 | name: Check Documentation 13 | runs-on: ubuntu-latest 14 | steps: 15 | 16 | - name: Checkout 17 | uses: actions/checkout@v1 18 | - name: Install Rust 19 | uses: actions-rs/toolchain@v1 20 | with: 21 | profile: minimal 22 | toolchain: stable 23 | override: true 24 | components: rustfmt 25 | 26 | - name: cargo doc --all --no-deps --document-private-items --all-features 27 | uses: actions-rs/cargo@v1 28 | with: 29 | command: doc 30 | args: --all --no-deps --document-private-items --all-features -------------------------------------------------------------------------------- /.github/workflows/lint.yml: -------------------------------------------------------------------------------- 1 | name: Lint 2 | on: 3 | pull_request: 4 | push: 5 | branches: 6 | - main 7 | env: 8 | RUST_BACKTRACE: 1 9 | 10 | jobs: 11 | style: 12 | name: Lint 13 | runs-on: ubuntu-latest 14 | steps: 15 | 16 | - name: Checkout 17 | uses: actions/checkout@v1 18 | - name: Install Rust 19 | uses: actions-rs/toolchain@v1 20 | with: 21 | profile: minimal 22 | toolchain: stable 23 | override: true 24 | components: rustfmt 25 | 26 | - name: cargo fmt --check 27 | uses: actions-rs/cargo@v1 28 | with: 29 | command: fmt 30 | args: --all -- --check -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Test 2 | on: 3 | pull_request: 4 | push: 5 | branches: 6 | - main 7 | env: 8 | RUST_BACKTRACE: 1 9 | 10 | jobs: 11 | test: 12 | runs-on: ubuntu-latest 13 | strategy: 14 | matrix: 15 | rust: 16 | - 1.65.0 # MSRV 17 | - stable 18 | steps: 19 | - uses: actions/checkout@v1 20 | - uses: actions-rs/toolchain@v1 21 | with: 22 | profile: minimal 23 | toolchain: ${{ matrix.rust }} 24 | override: true 25 | - run: cargo test --release --no-default-features 26 | - run: cargo test --release 27 | - run: cargo test --release --all-features 28 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | 1 3 | target 4 | .DS_Store 5 | .idea 6 | *.iml 7 | *.ipynb_checkpoints 8 | *.pyc 9 | *.sage.py 10 | params 11 | *.swp 12 | *.swo 13 | .vscode -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | 3 | members = [ 4 | "packages/*", 5 | ] 6 | -------------------------------------------------------------------------------- /LICENSE-MIT: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /MIGRATION.md: -------------------------------------------------------------------------------- 1 | # Migration 2 | 3 | ## v0.0.x -> v0.1.x 4 | 5 | 0.1.0 makes additional template assumptions: 6 | 7 | 1. use programmatic approach for fo `ts-codegen` so it expects [`ts/sdk/scripts/codegen.js`](https://github.com/osmosis-labs/beaker/blob/v0.1.0/templates/project/ts/sdk/scripts/codegen.js) to exist in the project directory 8 | 2. [add `codegen` script](https://github.com/osmosis-labs/beaker/blob/75e11a4943af7ecc4169c1e5f800f5aa6978855c/templates/project/ts/sdk/package.json#L53) to `package.json` 9 | 3. since 1. use `@cosmwasm/ts-codegen`, you need to [add it as dev dependency](https://github.com/osmosis-labs/beaker/blob/v0.1.0/templates/project/ts/sdk/package.json#L23) 10 | 4. make sure `ts/sdk/index.ts` exports contracts as the following 11 | ```ts 12 | export * from "./contracts"; 13 | ``` 14 | -------------------------------------------------------------------------------- /assets/beaker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/osmosis-labs/beaker/fc046f8fe9d8baecdd76404b57b31f5a4e100301/assets/beaker.png -------------------------------------------------------------------------------- /beaker.code-workspace: -------------------------------------------------------------------------------- 1 | { 2 | "folders": [ 3 | { 4 | "path": "." 5 | }, 6 | { 7 | "path": "./examples/scripting-cookbook" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /docs/commands/README.md: -------------------------------------------------------------------------------- 1 | # `beaker` 2 | 3 | CosmWasm swiss-army knife configured for Osmosis by default, but trivial to make it work for other CosmWasm enabled chain. 4 | 5 | Version: 0.1.8 6 | 7 | ## Subcommands 8 | 9 | --- 10 | 11 | ### `beaker new` 12 | 13 | Create new workspace from boilerplate 14 | 15 | Arguments: 16 | 17 | * `` Workspace name 18 | 19 | * `-t / --target-dir `: Path to store generated workspace 20 | 21 | * `-b / --branch `: Template's branch, using main if not specified 22 | 23 | --- 24 | 25 | ### `beaker wasm` 26 | 27 | Manipulating and interacting with CosmWasm contract 28 | 29 | [\> `beaker wasm`'s subcommands](./beaker_wasm.md) 30 | 31 | --- 32 | 33 | ### `beaker key` 34 | 35 | Managing key backed by system's secret store 36 | 37 | [\> `beaker key`'s subcommands](./beaker_key.md) 38 | 39 | --- 40 | 41 | ### `beaker console` 42 | 43 | Launch interactive console for interacting with the project 44 | 45 | Arguments: 46 | 47 | * `-n / --network ` (default: `local`) 48 | 49 | --- 50 | 51 | ### `beaker task` 52 | 53 | Managing tasks for the project 54 | 55 | [\> `beaker task`'s subcommands](./beaker_task.md) -------------------------------------------------------------------------------- /docs/commands/beaker_key.md: -------------------------------------------------------------------------------- 1 | # `beaker key` 2 | 3 | Managing key backed by system's secret store 4 | 5 | ## Subcommands 6 | 7 | --- 8 | 9 | ### `beaker key set` 10 | 11 | Create new key or update existing key 12 | 13 | Arguments: 14 | 15 | * `` Name of the key to create or update 16 | 17 | * `` Mnemonic string to store as an entry 18 | 19 | * `-y / --yes `: Agree to all prompts 20 | 21 | --- 22 | 23 | ### `beaker key delete` 24 | 25 | Delete existing key 26 | 27 | Arguments: 28 | 29 | * `` Name of the key to create or update 30 | 31 | * `-y / --yes `: Agree to all prompts 32 | 33 | --- 34 | 35 | ### `beaker key address` 36 | 37 | Get address from keyring's stored key 38 | 39 | Arguments: 40 | 41 | * `` Name of the key to create or update 42 | 43 | --- 44 | 45 | ### `beaker key generate` 46 | 47 | Generate new mnemonic 48 | 49 | Arguments: 50 | 51 | * `` Name of the key to create or update 52 | 53 | * `--show `: Show mnemonic in the console if set, keep it secret otherwise 54 | 55 | * `-y / --yes `: Agree to all prompts -------------------------------------------------------------------------------- /docs/commands/beaker_task.md: -------------------------------------------------------------------------------- 1 | # `beaker task` 2 | 3 | Managing tasks for the project 4 | 5 | ## Subcommands 6 | 7 | --- 8 | 9 | ### `beaker task new` 10 | 11 | Create a new task 12 | 13 | Arguments: 14 | 15 | * `` Name of the task 16 | 17 | --- 18 | 19 | ### `beaker task run` 20 | 21 | Run a task 22 | 23 | Arguments: 24 | 25 | * `