-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from lealobanov/new
Cadence Cookbook Updates - Functional MVP
- Loading branch information
Showing
478 changed files
with
32,360 additions
and
16,550 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Run Cadence tests | ||
on: push | ||
|
||
jobs: | ||
get-recipe-repos: | ||
runs-on: macos-latest | ||
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Dynamically retrieve matrix | ||
id: set-matrix | ||
run: echo "::set-output name=matrix::$(ls -d src/data/recipes/* | jq -R -s -c 'split("\n")[:-1]' )" | ||
run-cadence-tests: | ||
needs: get-recipe-repos | ||
runs-on: macos-latest | ||
strategy: | ||
matrix: | ||
recipe: ${{ fromJson(needs.get-recipe-repos.outputs.matrix) }} | ||
steps: | ||
- name: Set env | ||
env: | ||
RECIPE_REPO: "${{ matrix.recipe }}" | ||
run: | | ||
RECIPE_REPO=${{ env.RECIPE_REPO }} | ||
RECIPE_REPO=${RECIPE_REPO//:} # replace all colons | ||
echo RECIPE_REPO=${RECIPE_REPO} >> $GITHUB_ENV # update GitHub ENV vars | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: 'true' | ||
- name: Install Flow CLI | ||
run: | | ||
if test -f ${{ env.RECIPE_REPO }}/cadence/tests.cdc; then | ||
brew update | ||
brew install flow-cli | ||
flow init --reset | ||
fi | ||
- name: Trigger recipe test | ||
run: | | ||
if test -f ${{ env.RECIPE_REPO }}/cadence/tests.cdc; then | ||
flow test ${{ env.RECIPE_REPO }}/cadence/tests.cdc | ||
fi | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: Run front-end Cypress tests | ||
on: push | ||
jobs: | ||
cypress-run: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
# Install npm dependencies, cache them correctly | ||
# and run all Cypress tests | ||
- name: Cypress run | ||
uses: cypress-io/github-action@v6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
[submodule "src/data/recipes/add-a-play-to-topshot-set"] | ||
path = src/data/recipes/add-a-play-to-topshot-set | ||
url = https://github.com/lealobanov/add-a-play-to-topshot-set | ||
[submodule "src/data/recipes/mint-nft"] | ||
path = src/data/recipes/mint-nft | ||
url = https://github.com/lealobanov/mint-nft | ||
[submodule "src/data/recipes/collection-for-holding-nfts"] | ||
path = src/data/recipes/collection-for-holding-nfts | ||
url = https://github.com/lealobanov/collection-for-holding-nfts | ||
[submodule "src/data/recipes/creating-collection-for-account"] | ||
path = src/data/recipes/creating-collection-for-account | ||
url = https://github.com/lealobanov/creating-collection-for-account | ||
[submodule "src/data/recipes/nft-with-metadata"] | ||
path = src/data/recipes/nft-with-metadata | ||
url = https://github.com/lealobanov/nft-with-metadata | ||
[submodule "src/data/recipes/metadata-views"] | ||
path = src/data/recipes/metadata-views | ||
url = https://github.com/lealobanov/metadata-views | ||
[submodule "src/data/recipes/multiple-metadata-views"] | ||
path = src/data/recipes/multiple-metadata-views | ||
url = https://github.com/lealobanov/multiple-metadata-views | ||
[submodule "src/data/recipes/token-vault"] | ||
path = src/data/recipes/token-vault | ||
url = https://github.com/lealobanov/token-vault | ||
[submodule "src/data/recipes/withdrawing-tokens"] | ||
path = src/data/recipes/withdrawing-tokens | ||
url = https://github.com/lealobanov/withdrawing-tokens | ||
[submodule "src/data/recipes/creating-a-vault"] | ||
path = src/data/recipes/creating-a-vault | ||
url = https://github.com/lealobanov/creating-a-vault | ||
[submodule "src/data/recipes/vault-minter"] | ||
path = src/data/recipes/vault-minter | ||
url = https://github.com/lealobanov/vault-minter | ||
[submodule "src/data/recipes/implementing-series-for-nfts"] | ||
path = src/data/recipes/implementing-series-for-nfts | ||
url = https://github.com/lealobanov/implementing-series-for-nfts | ||
[submodule "src/data/recipes/creating-a-set-in-series"] | ||
path = src/data/recipes/creating-a-set-in-series | ||
url = https://github.com/lealobanov/creating-a-set-in-series | ||
[submodule "src/data/recipes/minting-nfts-in-a-set"] | ||
path = src/data/recipes/minting-nfts-in-a-set | ||
url = https://github.com/lealobanov/minting-nfts-in-a-set | ||
[submodule "src/data/recipes/admin-resource"] | ||
path = src/data/recipes/admin-resource | ||
url = https://github.com/lealobanov/admin-resource | ||
[submodule "src/data/recipes/add-admin-resource-to-account"] | ||
path = src/data/recipes/add-admin-resource-to-account | ||
url = https://github.com/lealobanov/add-admin-resource-to-account | ||
[submodule "src/data/recipes/create-a-topshot-play"] | ||
path = src/data/recipes/create-a-topshot-play | ||
url = https://github.com/lealobanov/create-a-topshot-play | ||
[submodule "src/data/recipes/create-a-topshot-set"] | ||
path = src/data/recipes/create-a-topshot-set | ||
url = https://github.com/lealobanov/create-a-topshot-set | ||
[submodule "src/data/recipes/minting-a-moment-in-topshot-set"] | ||
path = src/data/recipes/minting-a-moment-in-topshot-set | ||
url = https://github.com/lealobanov/minting-a-moment-in-topshot-set | ||
[submodule "src/data/recipes/create-a-marketplace"] | ||
path = src/data/recipes/create-a-marketplace | ||
url = https://github.com/lealobanov/create-a-marketplace | ||
[submodule "src/data/recipes/create-an-nft-listing"] | ||
path = src/data/recipes/create-an-nft-listing | ||
url = https://github.com/lealobanov/create-an-nft-listing | ||
[submodule "src/data/recipes/purchase-nft-on-marketplace"] | ||
path = src/data/recipes/purchase-nft-on-marketplace | ||
url = https://github.com/lealobanov/purchase-nft-on-marketplace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
# Cadence Cookbook | ||
## NODE.JS | ||
|
||
Explore various Cadence smarts contracts & transaction scripts for different use cases. | ||
- Node 16.x || 18.x | ||
|
||
Build with confidence for your Web3 application | ||
|
||
# Contribute Recipes | ||
|
||
To contribute your own Cadence recipes and open them up to the community, checkout the [contribution page](contribute.md). | ||
## USING NPM | ||
|
||
- npm i OR npm i --legacy-peer-deps | ||
- npm run dev |
Oops, something went wrong.
eee7ace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
cadence-cookbook – ./
cadence-cookbook-git-main-onflow.vercel.app
cadence-cookbook.vercel.app
cadence-cookbook-onflow.vercel.app
cookbook.onflow.org
cookbook.flow.com
open-cadence.onflow.org