From 07b66fce65c90af73c4aaba9479f0cc004c672fb Mon Sep 17 00:00:00 2001 From: Max Daunarovich Date: Sat, 29 Jul 2023 18:24:21 +0300 Subject: [PATCH 1/9] Update FIND address on testnet --- packages/flow-cadut-plugin-find/src/const.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flow-cadut-plugin-find/src/const.js b/packages/flow-cadut-plugin-find/src/const.js index 6667761..18fd2b3 100644 --- a/packages/flow-cadut-plugin-find/src/const.js +++ b/packages/flow-cadut-plugin-find/src/const.js @@ -1,5 +1,5 @@ export const contractHolder = { emulator: null, - testnet: "0xa16ab1d0abde3625", + testnet: "0x35717efbbce11c74", mainnet: "0x097bafa4e0b48eef", } From 01da3e6d0293d95b292317e52dbcc08386145c25 Mon Sep 17 00:00:00 2001 From: Max Daunarovich Date: Sat, 29 Jul 2023 18:24:49 +0300 Subject: [PATCH 2/9] Use existing name with long lease --- packages/flow-cadut-plugin-find/tests/index.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/flow-cadut-plugin-find/tests/index.test.js b/packages/flow-cadut-plugin-find/tests/index.test.js index 26a884d..1c01621 100644 --- a/packages/flow-cadut-plugin-find/tests/index.test.js +++ b/packages/flow-cadut-plugin-find/tests/index.test.js @@ -17,7 +17,7 @@ describe("FIND plugin", () => { return address } ` - const args = ["find:shiny"] + const args = ["find:bman"] return mapValuesToCode(code, args) }) @@ -27,7 +27,7 @@ describe("FIND plugin", () => { return address } ` - const args = ["shiny.find"] + const args = ["bman.find"] return mapValuesToCode(code, args) }) }) From 852cdf88d0220a72108d3e42c136fbf983775575 Mon Sep 17 00:00:00 2001 From: Max Daunarovich Date: Sat, 29 Jul 2023 18:27:01 +0300 Subject: [PATCH 3/9] Fix tests with existing name and expects --- packages/flow-cadut-plugin-find/tests/index.test.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/flow-cadut-plugin-find/tests/index.test.js b/packages/flow-cadut-plugin-find/tests/index.test.js index 1c01621..e6ff424 100644 --- a/packages/flow-cadut-plugin-find/tests/index.test.js +++ b/packages/flow-cadut-plugin-find/tests/index.test.js @@ -18,7 +18,8 @@ describe("FIND plugin", () => { } ` const args = ["find:bman"] - return mapValuesToCode(code, args) + const [result] = await mapValuesToCode(code, args) + expect(result.value).toBe("0x8bf9ecc3a2b8d7af") }) it("shall resolve name.find properly", async () => { @@ -28,6 +29,7 @@ describe("FIND plugin", () => { } ` const args = ["bman.find"] - return mapValuesToCode(code, args) + const [result] = await mapValuesToCode(code, args) + expect(result.value).toBe("0x8bf9ecc3a2b8d7af") }) }) From e670fea82510fdd3e13a04a93a40ae260693fc29 Mon Sep 17 00:00:00 2001 From: Max Daunarovich Date: Sun, 30 Jul 2023 01:14:52 +0300 Subject: [PATCH 4/9] Make tests run one after another --- packages/dev-test/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/dev-test/package.json b/packages/dev-test/package.json index 8bd65a4..849f79b 100644 --- a/packages/dev-test/package.json +++ b/packages/dev-test/package.json @@ -5,7 +5,7 @@ "description": "", "main": "index.js", "scripts": { - "test": "jest" + "test": "jest --runInBand" }, "keywords": [], "author": "", From 4227c6629fc98880aa148bd5804b37ab02157ba7 Mon Sep 17 00:00:00 2001 From: Max Daunarovich Date: Sun, 30 Jul 2023 01:15:24 +0300 Subject: [PATCH 5/9] Adjust test command to prevent running with the rest packages --- packages/generator-test/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/generator-test/package.json b/packages/generator-test/package.json index aa42be1..ba3c29c 100644 --- a/packages/generator-test/package.json +++ b/packages/generator-test/package.json @@ -6,7 +6,7 @@ "main": "index.js", "scripts": { "generate": "flow-generate ./cadence ./src/generated", - "test": "node index.js" + "test-generator": "node index.js" }, "author": "", "license": "ISC", From 019ae1136b0f3adb5b3c3f3945e5952d1dc28f8d Mon Sep 17 00:00:00 2001 From: Max Daunarovich Date: Sun, 30 Jul 2023 01:15:41 +0300 Subject: [PATCH 6/9] Use lerna runner --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0d9ec84..ee08b57 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "flow-cadut", "scripts": { "build": "lerna run build", - "test": "jest", + "test": "lerna run test", "lint": "eslint .", "lintfix": "eslint --fix .", "prerelease": "npm run build && npm run test", From b0b9d7ac5bf2b543486a73691229f365709c0ed1 Mon Sep 17 00:00:00 2001 From: Max Daunarovich Date: Sun, 30 Jul 2023 01:16:49 +0300 Subject: [PATCH 7/9] Remove MotoGP tests cause the contract was updated --- packages/flow-cadut-views/src/test/try-views.test.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/packages/flow-cadut-views/src/test/try-views.test.js b/packages/flow-cadut-views/src/test/try-views.test.js index c0d9097..190270b 100644 --- a/packages/flow-cadut-views/src/test/try-views.test.js +++ b/packages/flow-cadut-views/src/test/try-views.test.js @@ -25,14 +25,6 @@ describe("views", () => { expect(err).toBeNull() }) - it("fetch motogp", async () => { - await setEnvironment("mainnet") - const [cards, err] = await getView(MotoGP, "0x53f389d96fb4ce5e") - console.log(err) - expect(cards).toBeTruthy() - expect(err).toBeNull() - }) - it("fetch ballerz", async () => { await setEnvironment("mainnet") const [ballerz, err] = await getView(Ballerz, "0x4c342b6dafb5bcb1") From 9dd52111d7dd1ea2ad3e66920cfdfb972996fbde Mon Sep 17 00:00:00 2001 From: Max Daunarovich Date: Sun, 30 Jul 2023 01:17:05 +0300 Subject: [PATCH 8/9] Remove MotoGP tests cause the contract was updated --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index b33e7fd..ec33c6b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21994,7 +21994,7 @@ }, "packages/flow-cadut": { "name": "@onflow/flow-cadut", - "version": "0.2.0-alpha.8", + "version": "0.2.0-alpha.9", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.18.6", @@ -22018,11 +22018,11 @@ }, "packages/flow-cadut-generator": { "name": "@onflow/flow-cadut-generator", - "version": "0.0.1", + "version": "0.1.0-alpha.0", "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.18.6", - "@onflow/flow-cadut": "^0.2.0-alpha.8", + "@onflow/flow-cadut": "^0.2.0-alpha.9", "chokidar": "^3.5.3", "glob": "^8.0.3", "inquirer": "^8.2.4", @@ -23340,7 +23340,7 @@ }, "devDependencies": { "@onflow/fcl": "^0.0.73", - "@onflow/flow-cadut-generator": "^0.0.1", + "@onflow/flow-cadut-generator": "^0.1.0-alpha.0", "elliptic": "^6.5.4", "esm": "^3.2.25", "rlp": "^2.2.6", @@ -28217,7 +28217,7 @@ "requires": { "@babel/runtime": "^7.18.6", "@onflow/fcl-bundle": "^1.1.0", - "@onflow/flow-cadut": "^0.2.0-alpha.8", + "@onflow/flow-cadut": "^0.2.0-alpha.9", "chokidar": "^3.5.3", "glob": "^8.0.3", "inquirer": "^8.2.4", @@ -32143,7 +32143,7 @@ "requires": { "@onflow/fcl": "^0.0.73", "@onflow/fcl-config": "^0.0.1", - "@onflow/flow-cadut-generator": "^0.0.1", + "@onflow/flow-cadut-generator": "^0.1.0-alpha.0", "elliptic": "^6.5.4", "esm": "^3.2.25", "rlp": "^2.2.6", From 76c438eb2a4b87791216cf5308d01767e6879801 Mon Sep 17 00:00:00 2001 From: Max Daunarovich Date: Sun, 30 Jul 2023 01:19:15 +0300 Subject: [PATCH 9/9] Remove unused import --- packages/flow-cadut-views/src/test/try-views.test.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/flow-cadut-views/src/test/try-views.test.js b/packages/flow-cadut-views/src/test/try-views.test.js index 190270b..597fa83 100644 --- a/packages/flow-cadut-views/src/test/try-views.test.js +++ b/packages/flow-cadut-views/src/test/try-views.test.js @@ -2,7 +2,6 @@ import {setEnvironment} from "@onflow/flow-cadut" import { Flovatars, VersusArt, - MotoGP, Ballerz, GoatedGoats, GoatedTraits,