From fe6537e9ea4ee5d646a8e290c1644d0026454a70 Mon Sep 17 00:00:00 2001 From: Lea Lobanov Date: Sat, 21 Dec 2024 14:49:15 +0400 Subject: [PATCH] Simplify recipe fields --- README.md | 22 +--------------------- cadence/contract.cdc | 1 - cadence/transaction.cdc | 1 - index.js | 12 ------------ 4 files changed, 1 insertion(+), 35 deletions(-) delete mode 120000 cadence/contract.cdc delete mode 120000 cadence/transaction.cdc diff --git a/README.md b/README.md index 1918983..0de6471 100644 --- a/README.md +++ b/README.md @@ -57,12 +57,6 @@ recipe-name/ - `author`: contributor of the recipe - `playgroundLink`: a link to Flow Playground containing the deployed recipe code - `excerpt`: a brief description of the recipe contents -- `smartContractCode`: path to location of Cadence smart contract code example -- `smartContractExplanation`: path to location of smart contract code explanation -- `transactionCode`: path to location of Cadence transaction code example -- `transactionExplanation`: path to location of transaction code explanation -- `testsPath`: path to location of Cadence test cases code example -- `testsExplanationPath`: path to location of test cases code explanation - `filters`: the filters object is used to perform filtering on recipes in the cookbook - `difficulty`: the difficulty filter supports one of ['beginner', 'intermediate', 'advanced'] @@ -71,17 +65,7 @@ recipe-name/ // Pass the repo name const recipe = "sample-recipe-name"; -//Generate paths of each code file to render -const contractPath = `${recipe}/cadence/contract.cdc`; -const transactionPath = `${recipe}/cadence/transaction.cdc`; -const testsPath = `${recipe}/cadence/tests.cdc`; - -//Generate paths of each explanation file to render -const smartContractExplanationPath = `${recipe}/explanations/contract.txt`; -const transactionExplanationPath = `${recipe}/explanations/transaction.txt`; -const testsExplanationPath = `${recipe}/explanations/tests.txt`; - -export const sampleRecipe= { +export const sampleRecipe = { slug: recipe, title: "", featuredText: "", @@ -89,10 +73,6 @@ export const sampleRecipe= { author: "", playgroundLink: "", excerpt: "", - smartContractCode: contractPath, - smartContractExplanation: smartContractExplanationPath, - transactionCode: transactionPath, - transactionExplanation: transactionExplanationPath, }; ``` ## Deploying Recipe Contracts and Running Transactions Locally (Flow Emulator) diff --git a/cadence/contract.cdc b/cadence/contract.cdc deleted file mode 120000 index b64184f..0000000 --- a/cadence/contract.cdc +++ /dev/null @@ -1 +0,0 @@ -./cadence/contracts/Recipe.cdc \ No newline at end of file diff --git a/cadence/transaction.cdc b/cadence/transaction.cdc deleted file mode 120000 index 06714b4..0000000 --- a/cadence/transaction.cdc +++ /dev/null @@ -1 +0,0 @@ -./cadence/transactions/withdraw_token.cdc \ No newline at end of file diff --git a/index.js b/index.js index 7981ee8..00a0a86 100644 --- a/index.js +++ b/index.js @@ -1,14 +1,6 @@ // Pass the repo name const recipe = "withdrawing-tokens"; -//Generate paths of each code file to render -const contractPath = `${recipe}/cadence/contract.cdc`; -const transactionPath = `${recipe}/cadence/transaction.cdc`; - -//Generate paths of each explanation file to render -const smartContractExplanationPath = `${recipe}/explanations/contract.txt`; -const transactionExplanationPath = `${recipe}/explanations/transaction.txt`; - export const withdrawingTokens = { slug: recipe, title: "Withdrawing Tokens", @@ -18,10 +10,6 @@ export const withdrawingTokens = { "https://play.onflow.org/ef2fe054-148b-4c75-94f1-95bd33b6ce00?type=tx&id=e849d0d1-4196-432c-b9be-eab08c5595a9", excerpt: "This is included in your smart contract when you would like to implement token withdrawls. Also useful for transferring tokens between accounts.", - smartContractCode: contractPath, - smartContractExplanation: smartContractExplanationPath, - transactionCode: transactionPath, - transactionExplanation: transactionExplanationPath, filters: { difficulty: "beginner", },