Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remaining Audit Fixes & Factory Pattern #750

Merged
merged 30 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5a85380
Start outlining factory pattern work
JakeHartnell Sep 13, 2023
d6ecac6
Add FactoryCallbacks, build out test-contract
Sep 13, 2023
ebd0757
Factory callback for NFT contracts
Sep 13, 2023
29f5781
Remove unneeded files, generate Schema
JakeHartnell Sep 14, 2023
5e64f30
Fix WASM build
JakeHartnell Sep 15, 2023
d936210
Move test-contracts to contracts/test
JakeHartnell Sep 15, 2023
d64fbeb
Clippy. : )
JakeHartnell Sep 15, 2023
5cb8a6a
Breakout sg-minter-factory contract
JakeHartnell Sep 15, 2023
201b6e2
# This is a combination of 2 commits.
JakeHartnell Sep 15, 2023
4244260
Simpler NFT factory test
JakeHartnell Sep 15, 2023
1511a9c
Remove sg-minter-factory (for now)
JakeHartnell Sep 15, 2023
05424d4
Implement factory pattern for NFTs
JakeHartnell Sep 16, 2023
86109f1
Better tests and token factory cleanup
JakeHartnell Sep 16, 2023
274635e
Remove Stargaze support (supported via factory now)
JakeHartnell Sep 16, 2023
9b9df6a
Docs and comments on factory pattern, clean up
JakeHartnell Sep 16, 2023
d0385e2
FactoryCallback -> TokenFactoryCallback
JakeHartnell Sep 16, 2023
01aed47
Fix NFT factory and tests
JakeHartnell Sep 16, 2023
39ec340
Fixup and tests for passthrough of funds
JakeHartnell Sep 16, 2023
5f509ed
Better test coverage for factory pattern
JakeHartnell Sep 17, 2023
36f5d33
Update InvalidActivePercentage error message for accuracy
JakeHartnell Sep 17, 2023
67af294
Reuse validation logic, and fix bug that slipped through audit : )
JakeHartnell Sep 17, 2023
8625e06
Fix possible to instantiate new collection with zero supply of NFTs, …
JakeHartnell Sep 19, 2023
f01cc59
Granular allowlisting of minters
JakeHartnell Sep 19, 2023
1763c90
Validate unstaking duration on instantiation and update config
JakeHartnell Sep 25, 2023
f13d8d4
TokenContract query should return optional type
JakeHartnell Sep 25, 2023
ac38d6e
ModuleInstantiateInfo callback to accept ownership of new NFT contract
JakeHartnell Sep 28, 2023
2209868
Audit fixups and improvements related to factories
JakeHartnell Sep 29, 2023
017b9d4
Use tagged cw-multi-test release
JakeHartnell Oct 3, 2023
6f40ceb
Add integration tests for dao-voting-cw721-staked
JakeHartnell Oct 3, 2023
ac1667c
Split up test tube and integration tests
JakeHartnell Oct 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,6 @@ jobs:
target: wasm32-unknown-unknown
override: true

- name: Clone libwasmv (needed for test-tube)
uses: actions/checkout@v2
with:
repository: CosmWasm/wasmvm
path: ./wasmvm
ref: v1.3.0

- name: Install libwasmv
run: cd ./wasmvm && make build-rust && cd ../

- name: Rust Dependencies Cache
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -70,9 +60,6 @@ jobs:
- name: Run Integration Tests
run: just integration-test

- name: Run Test Tube Integration Tests
run: just test-tube

- name: Combine Test Gas Reports
run: cd ci/integration-tests/ && jq -rs 'reduce .[] as $item ({}; . * $item)' gas_reports/*.json > gas_report.json

Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/test_tube.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Test Tube Tests

on:
pull_request:
push:
branches:
- main

jobs:
test:
name: Integration tests
runs-on: ubuntu-latest
env:
GAS_OUT_DIR: gas_reports
GAS_LIMIT: 100000000
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Install latest nightly toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2023-02-02
target: wasm32-unknown-unknown
override: true

- name: Clone libwasmv (needed for test-tube)
uses: actions/checkout@v2
with:
repository: CosmWasm/wasmvm
path: ./wasmvm
ref: v1.3.0

- name: Install libwasmv
run: cd ./wasmvm && make build-rust && cd ../

- name: Rust Dependencies Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
artifacts/
key: ${{ runner.os }}-cargo-with-artifacts-${{ hashFiles('**/Cargo.lock') }}

- name: Set latest just version
run: echo "JUST_VERSION=$(cargo search just -q | sed -n -e '/^just[[:space:]]/p' | cut -d '"' -f 2)" >> $GITHUB_ENV

- name: Get cached just
uses: actions/cache@v3
with:
path: ~/.cargo/bin/just
key: ${{ runner.os }}-just-${{ env.JUST_VERSION }}

- name: Install just
run: cargo install just || true

- name: Run download deps
run: just download-deps

- name: Run workspace optimize
run: just workspace-optimize

- name: Run Test Tube Integration Tests
run: just test-tube
Loading
Loading