Skip to content

Commit

Permalink
Merge pull request #16 from lealobanov/new
Browse files Browse the repository at this point in the history
Cadence Cookbook Updates - Functional MVP
  • Loading branch information
franklywatson authored Dec 6, 2023
2 parents b0d531b + bc2465f commit eee7ace
Show file tree
Hide file tree
Showing 478 changed files with 32,360 additions and 16,550 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/cadence.yml
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
12 changes: 12 additions & 0 deletions .github/workflows/cypress.yml
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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

/.next
.next

# dependencies
/node_modules
/.pnp
Expand All @@ -20,4 +23,4 @@

npm-debug.log*
yarn-debug.log*
yarn-error.log*
yarn-error.log*
66 changes: 66 additions & 0 deletions .gitmodules
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
12 changes: 5 additions & 7 deletions README.md
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
Loading

1 comment on commit eee7ace

@vercel
Copy link

@vercel vercel bot commented on eee7ace Dec 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.