From fe69b0964d2f99a4acc36b86bb354d3541a88c8b Mon Sep 17 00:00:00 2001 From: "zapaz.eth" Date: Fri, 17 May 2024 20:11:43 +0200 Subject: [PATCH] refacto templates and workflow --- .github/workflows/deploy-wp-plugin.yml | 15 ++++++----- .github/workflows/test-forge.yml | 25 +++++++---------- config/src/config.handlebars.json | 4 +-- contracts/package.json | 13 ++++----- package.json | 4 +-- .../Collection/CollectionTemplates.svelte | 15 ++++++----- wordpress/kredeum-nfts.handlebars.php | 4 --- wordpress/package.json | 6 ++--- wordpress/readme.handlebars.txt | 2 +- wordpress/scripts/{build.ts => config.ts} | 0 wordpress/turbo.json | 27 +++++++++++++------ 11 files changed, 61 insertions(+), 54 deletions(-) rename wordpress/scripts/{build.ts => config.ts} (100%) diff --git a/.github/workflows/deploy-wp-plugin.yml b/.github/workflows/deploy-wp-plugin.yml index a9e83d663..bfb13cc12 100644 --- a/.github/workflows/deploy-wp-plugin.yml +++ b/.github/workflows/deploy-wp-plugin.yml @@ -17,29 +17,30 @@ jobs: - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 - with: - version: nightly - name: Install node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 - name: Install pnpm - uses: pnpm/action-setup@v2.2.4 + uses: pnpm/action-setup@v4 with: - version: 8.5.1 + version: 8.15.7 - name: Build wp plugin - run: pnpm deploy-plugin + run: pnpm deploy:plugin env: ENVIR: PROD NODE_DEBUG: false + GIT_BRANCH: main INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }} ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }} ALCHEMY_API_KEY_POLYGON: ${{ secrets.ALCHEMY_API_KEY_POLYGON }} ALCHEMY_API_KEY_ARBITRUM: ${{ secrets.ALCHEMY_API_KEY_ARBITRUM }} ALCHEMY_API_KEY_OPTIMISM: ${{ secrets.ALCHEMY_API_KEY_OPTIMISM }} + ALCHEMY_API_KEY_BASE: ${{ secrets.ALCHEMY_API_KEY_BASE }} + ANKR_API_KEY: ${{ secrets.ANKR_API_KEY }} COVALENT_API_KEY: ${{ secrets.COVALENT_API_KEY }} NFT_STORAGE_KEY: ${{ secrets.NFT_STORAGE_KEY }} diff --git a/.github/workflows/test-forge.yml b/.github/workflows/test-forge.yml index 977c5d74b..81ee7a01b 100644 --- a/.github/workflows/test-forge.yml +++ b/.github/workflows/test-forge.yml @@ -1,28 +1,23 @@ -name: TEST forge +name: TEST Foundry Installation +on: + push: + branches: + - none -on: push jobs: check: - name: Test smartcontracts with forge - runs-on: ubuntu-22.04 - + name: Foundry project + runs-on: ubuntu-latest steps: - - name: CHECKOUT kredeum nfts - - uses: actions/checkout@v3 + - uses: actions/checkout@v3 with: submodules: recursive - - name: INSTALL foundry + - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 with: version: nightly - - name: BUILD forge - working-directory: contracts - run: forge build + - run: forge --version - - name: TEST forge - working-directory: contracts - run: forge test -vvv diff --git a/config/src/config.handlebars.json b/config/src/config.handlebars.json index 2c99e7bdc..78f690609 100644 --- a/config/src/config.handlebars.json +++ b/config/src/config.handlebars.json @@ -1,7 +1,7 @@ { "version": { - "latest": "1.6.0", - "stable": "1.6.0", + "latest": "1.6.2", + "stable": "1.6.2", "branch": "{{GIT_BRANCH}}", "commit": "{{GIT_COMMIT}}" }, diff --git a/contracts/package.json b/contracts/package.json index 38fef3857..bd072d660 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -22,10 +22,9 @@ "main": "index.js", "scripts": { "clean": "forge clean && rm -rf cache-forge out node_modules lib types artifacts broadcast .turbo && git restore lib", - "postinstall": "pnpm install:foundry && pnpm forge:update", - "install:foundry": "command -v forge >/dev/null 2>&1 || pnpm foundry:install", + "postinstall": "pnpm forge:install && pnpm forge:update", "build": "pnpm build:forge && pnpm build:typechain", - "build:forge": "$HOME/.foundry/bin/forge build", + "build:forge": "forge build", "build:typechain": "typechain --target ethers-v5 --out-dir types out/**/*.json", "check": "pnpm check:solidity", "check:solidity": "solhint src/**/*.sol", @@ -38,10 +37,12 @@ "deploy:all": "forge script scripts/DeployAllCurrent.s.sol", "validate:only": "pnpm deploy:all --sender $SENDER", "format": "pnpm format:solidity", - "format:solidity": "$HOME/.foundry/bin/forge fmt", - "foundry:install": "curl -L https://foundry.paradigm.xyz | bash && $HOME/.foundry/bin/foundryup", + "format:solidity": "forge fmt", + "foundryup:install": "command -v foundryup >/dev/null 2>&1 || curl -L https://foundry.paradigm.xyz | bash", + "forge:install": "command -v forge >/dev/null 2>&1 || (pnpm foundryup:install && PATH=$PATH:$HOME/.foundry/bin && foundryup)", "forge:update": "git submodule update --recursive", "tests": "pnpm tests:forge", "tests:forge": "forge test" } -} \ No newline at end of file +} + diff --git a/package.json b/package.json index ec25f3890..dcdf46789 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kredeum", - "version": "1.4.0", + "version": "1.6.2", "main": "index.js", "scripts": { "clean": "pnpm -r clean && rm -rf node_modules .turbo web/dapp", @@ -34,4 +34,4 @@ "turbo": "^1.13.3" }, "type": "module" -} +} \ No newline at end of file diff --git a/svelte/src/components/Collection/CollectionTemplates.svelte b/svelte/src/components/Collection/CollectionTemplates.svelte index 01545d0ef..29d6223fa 100644 --- a/svelte/src/components/Collection/CollectionTemplates.svelte +++ b/svelte/src/components/Collection/CollectionTemplates.svelte @@ -8,17 +8,19 @@ [ "OpenNFTsV4/generic", { - name: "OpenNFTs Generic", + name: "OpenNFTs", description: "OpenNFTs generic Collection: anyone can Mint NFTs in this collection!", - icon: "building" + icon: "building", + network: "all" } ], [ "OpenNFTsV4Skale/generic", { - name: "Skale OpenNFTs Generic", + name: "Skale OpenNFTs", description: "OpenNFTs generic Skale Collection: anyone can Mint NFTs in this collection!", - icon: "building" + icon: "building", + network: "skale" } ], [ @@ -27,7 +29,8 @@ name: "AutoMarket", description: "AutoMarket ownable OpenNFTs Collection: own your collection, mint and sell your NFTs with royalties", - icon: "dollar-sign" + icon: "dollar-sign", + network: "all" } ] ]); @@ -41,7 +44,7 @@
Choose your Collection type
{#each [...templates] as [templateKey, templateValue]} - {#if templateConfig(templateKey) === "ownable"} + {#if templateValue.network === "all"}