Skip to content

Commit

Permalink
Merge pull request #658 from public-awesome/serkan/factory-parameters…
Browse files Browse the repository at this point in the history
…-update

Add migration & update params logic for minter factories
  • Loading branch information
jhernandezb authored Feb 13, 2024
2 parents 3116321 + 97fd02e commit 59fa287
Show file tree
Hide file tree
Showing 50 changed files with 1,238 additions and 827 deletions.
90 changes: 45 additions & 45 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ workflows:
jobs:
contract_sg721_base:
docker:
- image: rust:1.73.0
- image: rust:1.74.0
working_directory: ~/project/contracts/collections/sg721-base
steps:
- checkout:
Expand All @@ -41,7 +41,7 @@ jobs:
command: rustc --version; cargo --version; rustup --version
- restore_cache:
keys:
- cargocache-sg721-rust:1.73.0-{{ checksum "~/project/Cargo.lock" }}
- cargocache-sg721-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Unit Tests
environment:
Expand All @@ -63,11 +63,11 @@ jobs:
paths:
- /usr/local/cargo/registry
- target
key: cargocache-sg721-rust:1.73.0-{{ checksum "~/project/Cargo.lock" }}
key: cargocache-sg721-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }}

contract_sg721_nt:
docker:
- image: rust:1.73.0
- image: rust:1.74.0
working_directory: ~/project/contracts/collections/sg721-nt
steps:
- checkout:
Expand All @@ -77,7 +77,7 @@ jobs:
command: rustc --version; cargo --version; rustup --version
- restore_cache:
keys:
- cargocache-sg721-nt-rust:1.73.0-{{ checksum "~/project/Cargo.lock" }}
- cargocache-sg721-nt-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Unit Tests
environment:
Expand All @@ -99,11 +99,11 @@ jobs:
paths:
- /usr/local/cargo/registry
- target
key: cargocache-sg721-nt-rust:1.73.0-{{ checksum "~/project/Cargo.lock" }}
key: cargocache-sg721-nt-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }}

contract_base_factory:
docker:
- image: rust:1.73.0
- image: rust:1.74.0
working_directory: ~/project/contracts/factories/base-factory
steps:
- checkout:
Expand All @@ -113,7 +113,7 @@ jobs:
command: rustc --version; cargo --version; rustup --version
- restore_cache:
keys:
- cargocache-base-factory-rust:1.73.0-{{ checksum "~/project/Cargo.lock" }}
- cargocache-base-factory-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Unit Tests
environment:
Expand All @@ -135,11 +135,11 @@ jobs:
paths:
- /usr/local/cargo/registry
- target
key: cargocache-base-factory-rust:1.73.0-{{ checksum "~/project/Cargo.lock" }}
key: cargocache-base-factory-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }}

contract_base_minter:
docker:
- image: rust:1.73.0
- image: rust:1.74.0
working_directory: ~/project/contracts/minters/base-minter
steps:
- checkout:
Expand All @@ -149,7 +149,7 @@ jobs:
command: rustc --version; cargo --version; rustup --version
- restore_cache:
keys:
- cargocache-base-minter-rust:1.73.0-{{ checksum "~/project/Cargo.lock" }}
- cargocache-base-minter-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Unit Tests
environment:
Expand All @@ -171,11 +171,11 @@ jobs:
paths:
- /usr/local/cargo/registry
- target
key: cargocache-base-minter-rust:1.73.0-{{ checksum "~/project/Cargo.lock" }}
key: cargocache-base-minter-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }}

contract_vending_factory:
docker:
- image: rust:1.73.0
- image: rust:1.74.0
working_directory: ~/project/contracts/factories/vending-factory
steps:
- checkout:
Expand All @@ -185,7 +185,7 @@ jobs:
command: rustc --version; cargo --version; rustup --version
- restore_cache:
keys:
- cargocache-vending-factory-rust:1.73.0-{{ checksum "~/project/Cargo.lock" }}
- cargocache-vending-factory-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Unit Tests
environment:
Expand All @@ -207,11 +207,11 @@ jobs:
paths:
- /usr/local/cargo/registry
- target
key: cargocache-vending-factory-rust:1.73.0-{{ checksum "~/project/Cargo.lock" }}
key: cargocache-vending-factory-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }}

contract_vending_minter:
docker:
- image: rust:1.73.0
- image: rust:1.74.0
working_directory: ~/project/contracts/minters/vending-minter
steps:
- checkout:
Expand All @@ -221,7 +221,7 @@ jobs:
command: rustc --version; cargo --version; rustup --version
- restore_cache:
keys:
- cargocache-vending-minter-rust:1.73.0-{{ checksum "~/project/Cargo.lock" }}
- cargocache-vending-minter-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Unit Tests
environment:
Expand All @@ -243,11 +243,11 @@ jobs:
paths:
- /usr/local/cargo/registry
- target
key: cargocache-vending-minter-rust:1.73.0-{{ checksum "~/project/Cargo.lock" }}
key: cargocache-vending-minter-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }}

contract_open_edition_factory:
docker:
- image: rust:1.73.0
- image: rust:1.74.0
working_directory: ~/project/contracts/factories/open-edition-factory
steps:
- checkout:
Expand All @@ -257,7 +257,7 @@ jobs:
command: rustc --version; cargo --version; rustup --version
- restore_cache:
keys:
- cargocache-open-edition-factory-rust:1.73.0-{{ checksum "~/project/Cargo.lock" }}
- cargocache-open-edition-factory-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Unit Tests
environment:
Expand All @@ -279,11 +279,11 @@ jobs:
paths:
- /usr/local/cargo/registry
- target
key: cargocache-open-edition-factory-rust:1.73.0-{{ checksum "~/project/Cargo.lock" }}
key: cargocache-open-edition-factory-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }}

contract_open_edition_minter:
docker:
- image: rust:1.73.0
- image: rust:1.74.0
working_directory: ~/project/contracts/minters/open-edition-minter
steps:
- checkout:
Expand All @@ -293,7 +293,7 @@ jobs:
command: rustc --version; cargo --version; rustup --version
- restore_cache:
keys:
- cargocache-open-edition-minter-rust:1.73.0-{{ checksum "~/project/Cargo.lock" }}
- cargocache-open-edition-minter-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Unit Tests
environment:
Expand All @@ -315,11 +315,11 @@ jobs:
paths:
- /usr/local/cargo/registry
- target
key: cargocache-open-edition-minter-rust:1.73.0-{{ checksum "~/project/Cargo.lock" }}
key: cargocache-open-edition-minter-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }}

contract_whitelist:
docker:
- image: rust:1.73.0
- image: rust:1.74.0
working_directory: ~/project/contracts/whitelists/whitelist
steps:
- checkout:
Expand All @@ -329,7 +329,7 @@ jobs:
command: rustc --version; cargo --version; rustup --version
- restore_cache:
keys:
- cargocache-whitelist-rust:1.73.0-{{ checksum "~/project/Cargo.lock" }}
- cargocache-whitelist-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Unit Tests
environment:
Expand All @@ -351,10 +351,10 @@ jobs:
paths:
- /usr/local/cargo/registry
- target
key: cargocache-whitelist-rust:1.73.0-{{ checksum "~/project/Cargo.lock" }}
key: cargocache-whitelist-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }}
test-suite:
docker:
- image: rust:1.73.0
- image: rust:1.74.0
working_directory: ~/project/test-suite
steps:
- checkout:
Expand All @@ -364,7 +364,7 @@ jobs:
command: rustc --version; cargo --version; rustup --version
- restore_cache:
keys:
- cargocache-test-suite-rust:1.73.0-{{ checksum "~/project/Cargo.lock" }}
- cargocache-test-suite-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Unit Tests
environment:
Expand All @@ -374,11 +374,11 @@ jobs:
paths:
- /usr/local/cargo/registry
- target
key: cargocache-test-suite-rust:1.73.0-{{ checksum "~/project/Cargo.lock" }}
key: cargocache-test-suite-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }}

package_sg_std:
docker:
- image: rust:1.73.0
- image: rust:1.74.0
working_directory: ~/project/package/sg-std
steps:
- checkout:
Expand All @@ -388,7 +388,7 @@ jobs:
command: rustc --version; cargo --version; rustup --version
- restore_cache:
keys:
- cargocache-sg-std-rust:1.73.0-{{ checksum "~/project/Cargo.lock" }}
- cargocache-sg-std-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Unit Tests
environment:
Expand All @@ -398,11 +398,11 @@ jobs:
paths:
- /usr/local/cargo/registry
- target
key: cargocache-sg-std-rust:1.73.0-{{ checksum "~/project/Cargo.lock" }}
key: cargocache-sg-std-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }}

package_sg_utils:
docker:
- image: rust:1.73.0
- image: rust:1.74.0
working_directory: ~/project/package/sg-utils
steps:
- checkout:
Expand All @@ -412,7 +412,7 @@ jobs:
command: rustc --version; cargo --version; rustup --version
- restore_cache:
keys:
- cargocache-sg-utils-rust:1.73.0-{{ checksum "~/project/Cargo.lock" }}
- cargocache-sg-utils-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Unit Tests
environment:
Expand All @@ -422,11 +422,11 @@ jobs:
paths:
- /usr/local/cargo/registry
- target
key: cargocache-sg-utils-rust:1.73.0-{{ checksum "~/project/Cargo.lock" }}
key: cargocache-sg-utils-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }}

sg-eth-airdrop:
docker:
- image: rust:1.73.0
- image: rust:1.74.0
working_directory: ~/project/contracts/sg-eth-airdrop
steps:
- checkout:
Expand All @@ -436,7 +436,7 @@ jobs:
command: rustc --version; cargo --version; rustup --version
- restore_cache:
keys:
- cargocache-sg-eth-airdrop-rust:1.73.0-{{ checksum "~/project/Cargo.lock" }}
- cargocache-sg-eth-airdrop-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Unit Tests
environment:
Expand All @@ -458,19 +458,19 @@ jobs:
paths:
- /usr/local/cargo/registry
- target
key: cargocache-sg-eth-airdrop-rust:1.73.0-{{ checksum "~/project/Cargo.lock" }}
key: cargocache-sg-eth-airdrop-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }}

lint:
docker:
- image: rust:1.73.0
- image: rust:1.74.0
steps:
- checkout
- run:
name: Version information
command: rustc --version; cargo --version; rustup --version; rustup target list --installed
- restore_cache:
keys:
- cargocache-v2-lint-rust:1.73.0-{{ checksum "Cargo.lock" }}
- cargocache-v2-lint-rust:1.74.0-{{ checksum "Cargo.lock" }}
- run:
name: Add rustfmt component
command: rustup component add rustfmt
Expand All @@ -489,15 +489,15 @@ jobs:
- target/debug/.fingerprint
- target/debug/build
- target/debug/deps
key: cargocache-v2-lint-rust:1.73.0-{{ checksum "Cargo.lock" }}
key: cargocache-v2-lint-rust:1.74.0-{{ checksum "Cargo.lock" }}

# This runs one time on the top level to ensure all contracts compile properly into wasm.
# We don't run the wasm build per contract build, and then reuse a lot of the same dependencies, so this speeds up CI time
# for all the other tests.
# We also sanity-check the resultant wasm files.
wasm-build:
docker:
- image: rust:1.73.0
- image: rust:1.74.0
steps:
- checkout:
path: ~/project
Expand All @@ -506,7 +506,7 @@ jobs:
command: rustc --version; cargo --version; rustup --version
- restore_cache:
keys:
- cargocache-wasm-rust-no-wasm:1.73.0-{{ checksum "~/project/Cargo.lock" }}
- cargocache-wasm-rust-no-wasm:1.74.0-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Add wasm32 target
command: rustup target add wasm32-unknown-unknown
Expand Down Expand Up @@ -553,7 +553,7 @@ jobs:
- /target/debug
- /target/release
- /target/tarpaulin
key: cargocache-wasm-rust-no-wasm:1.73.0-{{ checksum "~/project/Cargo.lock" }}
key: cargocache-wasm-rust-no-wasm:1.74.0-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Check wasm contracts
command: |
Expand Down
Loading

0 comments on commit 59fa287

Please sign in to comment.