onflow / kitty-items Goto Github PK
View Code? Open in Web Editor NEWKitty Items: CryptoKitties Sample App
Home Page: https://kitty-items.onflow.org
License: Apache License 2.0
Kitty Items: CryptoKitties Sample App
Home Page: https://kitty-items.onflow.org
License: Apache License 2.0
tsnd --respawn src/index.ts
[INFO] 01:47:07 ts-node-dev ver. 1.1.1 (using ts-node ver. 9.1.1, typescript ver. 4.1.2)
No Flow account configured.
Did you export FLOW_ADDRESS and FLOW_PRIVATE_KEY?
Hi There,
Thanks for the vast collection of learning resources and tutorials on Flow. Making my way though.
It seems that the node backend and the react web app are started on the same port. The web app runs fine on 3001, but Dapper staging auth is broken because of it.
I've been able authenticate and purchase an item by starting the node backend on 3001 and the web on 3000, but eventually ran into a CORS issue trying to list the same item. Perhaps that is a different issue, not sure.
Thanks
Sorry - I little of a flow/kitty items newbie here - but in following the instructions - got stuck in VSCode - not knowing where the .env file was. Do I need to create this file? Please fix the doc so that the user knows specifically what to do here on this step.
I believe we are to take .env.example and create a .env from this example placing our values for flow_address and flow_private_key into the file and save .env back to the api folder where .env.example is located - is that correct? If so - pls update the doc, if different- pls update the doc, instructions, etc.
[email protected] start:testnet /home/vaibhav/kitty-items
./scripts/run-testnet.sh
sh: 1: ./scripts/run-testnet.sh: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! [email protected] start:testnet: ./scripts/run-testnet.sh
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the [email protected] start:testnet script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vaibhav/.npm/_logs/2021-06-28T21_59_33_962Z-debug.log
PR #27 merges in updates that require the events worker to always been running.
The current Heroku deployment does not include a dyno for the events worker.
Create a Procfile
with the following entries (inspired by this comment):
web: node api/dist/index.js
worker: node api/dist/index.js --worker
This requires a change to the api
project to make the worker to be runnable as a separate process.
kitty-items/api
is updated to allow for separate API and worker processesProcfile
is created with web
and worker
entriesProcfile
Hi guys,
any forecast for integration with dapper?
I'm doing some tests and using the blocto, what would be the difference using the dapper?
On a clean Windows 10 "instance" / following the Kitty-Items install procedure / after successful steps 1 thru 3 - fails on step 4
Command Error: missing configuration, initialize it: flow init
Please resolve or change the documentation so windows users can have a successful deployment or at least point them to where an addition step(s) should be for this to complete successfully
Should be helpful having Svelte or Sveltekit front-end example other then React, new generation front-end devs won't use React anymore
Minter setup script
Run this script to set up the minter account and mint an initial supply of Kibble and Kitty Items:
./setup-minter.sh
Try it out!
✨ The API should now be available at http://localhost:3000.
The script ./setup-minter.sh results in cadence errors. Env vars are passed and values were verified.
Server is running and postgres instance/container is running.
Output
david@ttglt001 MINGW64 ~/kitty-items/api (master)
$ ./setup-minter.sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 73 100 73 0 0 7 0 0:00:10 0:00:09 0:00:01 17{"transaction":{"status":4,"statusCode":0,"errorMessage":"","events":[]}}
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 73 100 73 0 0 7 0 0:00:10 0:00:09 0:00:01 17{"transaction":{"status":4,"statusCode":0,"errorMessage":"","events":[]}}
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 75 100 75 0 0 7 0 0:00:10 0:00:09 0:00:01 17{"transactionId":{"status":4,"statusCode":0,"errorMessage":"","events":[]}}
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 547 100 502 100 45 67 6 0:00:07 0:00:07 --:--:-- 158<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>[Error Code: 1101] cadence runtime error Execution failed:<br>error: invalid argument at index 0: decodeing argument failed: [Error Code: 1052] transaction arguments are invalid: (argument is not json decodable: failed to decode value: runtime error: slice bounds out of range [:2] with length 0)<br>--> 56f938211cac921dccf4830a949510b19cab90521e610b8ad087351da91edd44<br></pre>
</body>
</html>
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 544 100 502 100 42 78 6 0:00:07 0:00:06 0:00:01 119<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>[Error Code: 1101] cadence runtime error Execution failed:<br>error: invalid argument at index 0: decodeing argument failed: [Error Code: 1052] transaction arguments are invalid: (argument is not json decodable: failed to decode value: runtime error: slice bounds out of range [:2] with length 0)<br>--> f15bae6de32c274dac7cfef583a8bfc84ed0212cad616981dfa2849c058525b4<br></pre>
</body>
</html>
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 834 100 795 100 39 123 6 0:00:06 0:00:06 --:--:-- 247<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>[Error Code: 1101] cadence runtime error Execution failed:<br>error: unexpectedly found nil while forcing an Optional value<br> --> c9248a39fe523324959c2f346f067ffad37cc8d8e8befc6575367f436c8aa646:34:83<br> |<br>34 | <br> | ^<br></pre>
</body>
</html>
When I run the script ./setup-minter.sh
, I get this error:
TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type object
at Function.from (buffer.js:207:11)
at /Users/benjamincherion/Desktop/kitty-items/api/node_modules/@onflow/send/src/send-transaction.js:8:39
at process._tickCallback (internal/process/next_tick.js:68:7)
It sounds it is related to Buffer.from (and according to my quick researches the argument that is passed must be stringified)
Hello !
I am currently following the tutorial for the installation of Kitty Items API I have not encountered any particular problem to launch my database or to launch the API server however when I execute the script Setup minter i get some error like this
it seems however that one of the commands seems to work
If you could help me to solve this problem ? I modified the setup minter file in order to take into account the flow address but still have the same error ...
Thank you in advance :)
After following the step 5. Start the Flow emulator
I get the running results of gRPC and HTTP on following ports 3569, 8080.
But when I try to hit the http url I get following error gRPC requires HTTP/2
c:\Users\david\kitty-items>flow project deploy --network=testnet
Deploying 3 contracts for accounts: testnet-account
←[32;1mKibble←[0m -> 0xae7561b4bab9bc61
←[32;1mKittyItems←[0m -> 0xae7561b4bab9bc61
←[32;1mKittyItemsMarket←[0m -> 0xae7561b4bab9bc61
✨ All contracts deployed successfully
When i use "flow project deploy --network=testnet" i get
Deploying 3 contracts for accounts: emulator-account,testnet-account
Kibble error
KittyItems error
KittyItemsMarket error
❌ Failed to deploy all contracts
The current README provides a good overview of the application, but it should provide more information about the core concepts of Flow.
For example:
cd api/
npm install
npm run start:dev
[ERROR] 18:12:36 Error: Cannot find module '@onflow/sdk-resolve'
Given there are multiple processes in this application, it might make sense to create a Procfile and use Forman.
A simple Procfile.dev would be:
web: cd web && npm run start:dev
worker: cd api && npm run start:dev
Then users could start the application (after having set up the necessary dependencies) by running nf start -j Procfile.dev
from the root of the repository.
I'd be happy to put out a PR making this change if the Flow team supports this idea.
Describe the bug
When I try to buy an item via button "Buy" it fails with some error in console.
To Reproduce
Steps to reproduce the behavior:
Login to shop on testnet with Blockto wallet.
Init account.
Mint.
Buy an item at Item Marketplace screen.
Expected behavior
Item should be acquired by me.
Environment (Optional - Version, OS, Browser, etc.)
Chrome, Version 93.0.4542.2 (Official Build) dev (64-bit)
Manjaro Linux
Error in console:
tx.js:5 TX[64ec98ec8f325688c9619a733e44e67bb6523aa057f396d19e52a42387efd942]: https://flow-view-source.com/testnet/tx/64ec98ec8f325688c9619a733e44e67bb6523aa057f396d19e52a42387efd942 [Error Code: 1101] cadence runtime error Execution failed:
error: unexpectedly found nil while forcing an Optional value
--> 64ec98ec8f325688c9619a733e44e67bb6523aa057f396d19e52a42387efd942:17:74
|
17 | let price = self.marketCollection.borrowSaleItem(itemID: itemID)!.price
| ^
Hi there,
I ran the current code and encountered the error:
Error: failed to execute the script on the execution node: rpc error: code = Internal desc = failed to execute script: failed to execute script at block (8b8117acdc3f29c123531ecd493a5248ad911977256c55fec16b60eb5ae785bb): Execution failed:
error: incorrect argument label
--> c8bea33ade24cd3394b73ba9dc7656c10e059d6f4b97358b1aa24c33a35df9c5:20:50
|
20 | if let item = collection.borrowSaleItem(itemID: id) {
| ^^^^^^ expected saleItemID
, got itemID
error: value of type &KittyItemsMarket.SaleOffer{KittyItemsMarket.SaleOfferPublicView}
has no member typeID
--> c8bea33ade24cd3394b73ba9dc7656c10e059d6f4b97358b1aa24c33a35df9c5:21:53
|
21 | return SaleItem(itemID: id, typeID: item.typeID, owner: address, price: item.price)
| ^^^^^^ unknown member
error: value of type &KittyItemsMarket.SaleOffer{KittyItemsMarket.SaleOfferPublicView}
has no member price
--> c8bea33ade24cd3394b73ba9dc7656c10e059d6f4b97358b1aa24c33a35df9c5:21:89
|
21 | return SaleItem(itemID: id, typeID: item.typeID, owner: address, price: item.price)
| ^^^^^ unknown member
onEnd
src/send/unary.js:11
8 | grpc.unary(method, {
9 | request: request,
10 | host: host,
11 | onEnd: ({status, statusMessage, message}) => {
| ^ 12 | if (status === grpc.Code.OK) {
13 | resolve(message)
14 | } else {
View compiled
▶ 4 stack frames were collapsed.
NodeHttp.responseCallback
src/index.ts:36
33 | _this.options.debug && console.log("NodeHttp.data", chunk);
34 | _this.options.onChunk(toArrayBuffer(chunk));
35 | });
36 | response.on("end", function () {
| ^ 37 | _this.options.debug && console.log("NodeHttp.end");
38 | _this.options.onEnd();
39 | });
View compiled
▶ 3 stack frames were collapsed.
Can you kindly advise how to fix the issue?
Thanks so much and have a good day!
Mio
hi
i try to request a api server. but it return error.
TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type object
at Function.from (buffer.js:206:11)
at /srv/blockchain/kitty-items/api/node_modules/@onflow/send/src/send-transaction.js:8:39
at process._tickCallback (internal/process/next_tick.js:68:7)
code.
TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type object
at Function.from (buffer.js:206:11)
at /srv/blockchain/kitty-items/api/node_modules/@onflow/send/src/send-transaction.js:8:39
this is the command what i used.
curl --request POST
--url http://localhost:3000/v1/kibbles/setup
--header 'Content-Type: application/json'
The current application only displays sale items for one account at a time. This allows users to purchase items from other users, but it is impossible to find items that are for sale without knowing an existing user's address.
The application should have a tab that shows a list of all items that are listed for sale.
It might be better to change git clone
command in the readme to use HTTPS as it doesn't require ssh keys and in some cases, users might not have one generated.
From
git clone [email protected]:onflow/kitty-items.git
To
git clone https://github.com/onflow/kitty-items.git
Read more: https://docs.github.com/en/github/using-git/which-remote-url-should-i-use
When running the Kitty Deployer, I keep getting the error below, which keeps the KittyItemsMarket contract from being created. Am I doing something wrong here? Have unsuccessfully tried a couple of things to make this work.
add contract name: KittyItemsMarket
error Execution failed:
error: cannot deploy invalid contract
--> d2b04695922cc6c53d535932b0dafcf61835596fb531669702cad72b0d723676:7:12
|
7 | self.signer.contracts.add(
| ^
error: unexpected token: identifier
--> 3e9a346a9ab99a73.KittyItemsMarket:1:22
|
1 | import Kibble from 0x0x3e9a346a9ab99a73
| ^
undefined
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start:dev: `tsnd src/index.ts`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start:dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.`
I couldn't find a license file for this repository. What is its license?
In web/src/flow
, all the transactions/scripts are inlined as strings. I think a better option is to save them as cdc files in the cadence/scripts
cadence/transactions
directories and then import them into the JS. The way I achieved this in the project I'm working on (which I forked off of kitty-items
) is via https://github.com/pveyes/raw.macro.
So instead of:
const CODE = fcl.cdc`
import FungibleToken from 0xFungibleToken
...
`
You'd have:
import raw from "raw.macro";;
const script = raw("../../../cadence/scripts/is_account_initialized.cdc");
const CODE = fcl.cdc`${script}`
The primary benefits are 1) testability (you can test your scripts/transactions in go) and 2) readability (the transactions/scripts are easier to read in cdc files than just long strings in JS files).
If the Flow team likes this idea and is willing to accept outside contributions to this repo, I'd be happy to put together a PR making this change.
There is an error in the README.md file in "./kitty-items-deployer". It instructs devs to install dependencies using "npm install", but the author forgot to mention first to cd into "./kitty-items-deployer" before doing so. People who are unfamiliar with npm commands and the package.json file will most likely get stuck here.
EDIT: On a related note, it might also be useful to describe in further detail how the .env file should be formatted. I made the mistake of first doing this: ACCOUNT_ADDRESS={0x6adc3ecc434e6afe}
. Then, I changed it to this: ACCOUNT_ADDRESS={6adc3ecc434e6afe}
. Finally, I figured out that it was this: ACCOUNT_ADDRESS=6adc3ecc434e6afe
. In my opinion, it's ok to add lots and lots of detail to a readme, even if, for most devs, that detail is superfluous. A bit of hand-holding never hurt anybody, after all.
When I clicked "List for 10 KIBBLE",the status of the item changed to "Unlist", but the item didn't show up in the "Items Shop". Any help is appreciated. Thanks.
I have clean repository and I am trying to run command go test
like this: kitty-items\cadence\lib\go\test> go test
But it throws this error:
{"level":"debug","address":"f8d6e0586b0a20c7","contract":"FlowServiceAccount","contract_len":5100,"time":"2021-03-23T08:56:54+02:00","message":"a contract returned for f8d6e0586b0a20c7.FlowServiceAccount"}
{"level":"debug","address":"f8d6e0586b0a20c7","contract":"FlowStorageFees","contract_len":4689,"time":"2021-03-23T08:56:54+02:00","message":"a contract returned for f8d6e0586b0a20c7.FlowStorageFees"}--- FAIL: TestKibbleDeployment (0.09s)
panic: open ../../../cadence/kibble/contracts/Kibble.cdc: The system cannot find the path specified. [recovered]
panic: open ../../../cadence/kibble/contracts/Kibble.cdc: The system cannot find the path specified.
goroutine 50 [running]:
testing.tRunner.func1.2(0x15b4d20, 0xc0002f7e90)
C:/Program Files/Go/src/testing/testing.go:1144 +0x345
testing.tRunner.func1(0xc000055500)
C:/Program Files/Go/src/testing/testing.go:1147 +0x4b6
panic(0x15b4d20, 0xc0002f7e90)
C:/Program Files/Go/src/runtime/panic.go:965 +0x1c7
github.com/onflow/kitty-items/lib/go/test.readFile(0x16db0b5, 0x2c, 0x0, 0x0, 0x0)
C:/Work/Rox/kitty-items/cadence/lib/go/test/test.go:101 +0x8d
github.com/onflow/kitty-items/lib/go/test.loadKibble(0x5054712f2f0ecf01, 0xc000209400, 0x18dc9c0, 0xc0001e5bc0)
C:/Work/Rox/kitty-items/cadence/lib/go/test/kibble_test.go:273 +0x4f
github.com/onflow/kitty-items/lib/go/test.KibbleDeployContracts(0xc0002b01a0, 0xc000055500, 0x0, 0x0, 0x0, 0x0)
C:/Work/Rox/kitty-items/cadence/lib/go/test/kibble_test.go:51 +0x23a
github.com/onflow/kitty-items/lib/go/test.TestKibbleDeployment(0xc000055500)
C:/Work/Rox/kitty-items/cadence/lib/go/test/kibble_test.go:116 +0x70
testing.tRunner(0xc000055500, 0x181f448)
C:/Program Files/Go/src/testing/testing.go:1194 +0xef
created by testing.(*T).Run
C:/Program Files/Go/src/testing/testing.go:1239 +0x2b3
exit status 2
FAIL github.com/onflow/kitty-items/lib/go/test 0.470s
Any suggestions how to fix it?
Currently, we don't have any usage of our JS testing library in this keystone example to demonstrate how the integration works.
Add the following basic tests:
Add documentation to the README explaining the testing and link out to remaining testing docs on the testing repo. https://github.com/onflow/flow-js-testing
After setting the flow environmental variables in a vscode project directory on windows 10
$env:FLOW_ADDRESS='0xae7561b4bab9bc61'
flow project deploy --network=testnet
generates the following error
Config Error: invalid project configuration: encoding/hex: invalid byte: U+0078 'x'
Once the new flow project
command is merged and released, we should update this repository to make use of the new flow.json
structure, including the automated contract deployment feature.
Here's what that should include:
flow.json
file committed to this repositoryflow.json
file includes paths to contracts in kitty-items-cadence
flow.json
file includes configuration for the Flow Emulatorflow project deploy
works with the configured emulatorkitty-items-deployer
is removed (no longer needed)When using the SHA2_256
hash algo on the faucet to create a Flow account, the config described in the readme does not work.
flow project deploy --network=testnet
❌ Kibble error: [Error Code: 1006] invalid proposal key: public key 0 on account e5c068f5a1155a3b does not have a valid signature: [Error Code: 1009] invalid envelope key: public key 0 on account e5c068f5a1155a3b does not have a valid signature: signature is not valid
❌ KittyItems error: [Error Code: 1006] invalid proposal key: public key 0 on account e5c068f5a1155a3b does not have a valid signature: [Error Code: 1009] invalid envelope key: public key 0 on account e5c068f5a1155a3b does not have a valid signature: signature is not valid
❌ KittyItemsMarket error: [Error Code: 1006] invalid proposal key: public key 0 on account e5c068f5a1155a3b does not have a valid signature: [Error Code: 1009] invalid envelope key: public key 0 on account e5c068f5a1155a3b does not have a valid signature: signature is not valid
✨ All contracts deployed successfully
TODO:
SHA3_256
SHA2_256
Hi there,
Thanks so much for the excellent framework!
After deploying the contracts and following the API steps here:
https://github.com/onflow/kitty-items/tree/master/api#readme
There seems be an error with regard to password authentication failed for user "kittyuser". Please see the error below:
npm run start:dev
[email protected] start:dev
tsnd --respawn src/index.ts
[INFO] 20:09:41 ts-nhttps://github.com/onflow/kitty-items/tree/master/api#readmeode-dev ver. 1.1.1 (using ts-node ver. 9.1.1, typescript ver. 4.1.2)
error: password authentication failed for user "kittyuser"
at Parser.parseErrorMessage (kitty-items/api/node_modules/pg-protocol/src/parser.ts:357:11)
at Parser.handlePacket (kitty-items/api/node_modules/pg-protocol/src/parser.ts:186:21)
at Parser.parse (kitty-items/api/node_modules/pg-protocol/src/parser.ts:101:30)
at Socket. (kitty-items/api/node_modules/pg-protocol/src/index.ts:7:48)
at Socket.emit (node:events:378:20)
at addChunk (node:internal/streams/readable:313:12)
at readableAddChunk (node:internal/streams/readable:288:9)
at Socket.Readable.push (node:internal/streams/readable:227:10)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
length: 105,
severity: 'FATAL',
code: '28P01',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'auth.c',
line: '329',
routine: 'auth_failed'
}
Can you kindly advise how to fix it?
Thanks!
Kitty Items demo page does not work (http://kitty-items-flow-testnet.herokuapp.com)
Just create a new account with Blocto and click "Initialize Account".
Yesterday the service timed out after clicking "Initialize Account" and today I got rejected. I used Chrome on Mac and Android.
Attempting Step 6 of in the kitty-items api.
In the terminal, after executing the command ./setup-minter.sh
, this is displayed repeatedly (six times):
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>TypeError: Cannot read property 'padStart' of null<br> at /Users/mac-user/Documents/kitty-items/api/node_modules/@onflow/sdk/src/send/send-get-account.js:8:19<br> at runMicrotasks (<anonymous>)<br> at processTicksAndRejections (internal/process/task_queues.js:93:5)</pre>
</body>
</html>
In the terminal window connected to flow testnet, the error is:
TypeError: Cannot read property 'padStart' of null
at /Users/mac-user/Documents/kitty-items/api/node_modules/@onflow/sdk/src/send/send-get-account.js:8:19
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
fromBlock=32442851 toBlock=32442853 latestBlock=32442853
If there are any more details that can help I'm happy to add in the comments -- thank you
Currently user has to run curl commands 1 at a time to bootstrap contracts, and int items and kibble.
There is some value for newcomers in learning how to bootstrap the marketplace stepwise.
We should provide stepwise instructions, but make the project 'bootstrappable' using a single npm command, as well.
Can Cadence source be separated out as files vs being hardcoded?
For example:
https://github.com/onflow/kitty-items/blob/master/web/src/flow/buy-market-item.tx.js
An empty Kibble vault
An empty KittyItems collection
An empty KittyItemsMarket collection
💡 Learn more about Vault and Collection resources in this tutorial.
Minter setup script
Run this script to set up the minter account and mint an initial supply of Kibble and Kitty Items:
Following the getting started step by step, after I run npm run start:dev, I receive this console output
> [email protected] start:dev /home/some/Projects/Personal/kitty-items/api
> tsnd --respawn src/index.ts --dev
[INFO] 18:39:54 ts-node-dev ver. 1.1.1 (using ts-node ver. 9.1.1, typescript ver. 4.1.2)
fetching latest block height
Listening on port 3000!
(node:18058) UnhandledPromiseRejectionWarning: Error: Response closed without headers
at Object.onEnd (/home/some/Projects/Personal/kitty-items/api/node_modules/@onflow/sdk/src/send/unary.js:15:18)
at /home/some/Projects/Personal/kitty-items/api/node_modules/@onflow/sdk/node_modules/@improbable-eng/grpc-web/dist/grpc-web-client.js:1:24140
at /home/some/Projects/Personal/kitty-items/api/node_modules/@onflow/sdk/node_modules/@improbable-eng/grpc-web/dist/grpc-web-client.js:1:11457
at Array.forEach (<anonymous>)
at e.rawOnError (/home/some/Projects/Personal/kitty-items/api/node_modules/@onflow/sdk/node_modules/@improbable-eng/grpc-web/dist/grpc-web-client.js:1:11419)
at e.onTransportEnd (/home/some/Projects/Personal/kitty-items/api/node_modules/@onflow/sdk/node_modules/@improbable-eng/grpc-web/dist/grpc-web-client.js:1:10289)
at ClientRequest.<anonymous> (/home/some/Projects/Personal/kitty-items/api/node_modules/@onflow/sdk/node_modules/@improbable-eng/grpc-web-node-http-transport/src/index.ts:70:20)
at ClientRequest.emit (events.js:315:20)
at Socket.socketErrorListener (_http_client.js:469:9)
at Socket.emit (events.js:315:20)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:18058) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:18058) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Only thing I did differently was running npm audit fix after npm install.
Possibly related to onflow/fcl-js#271
The current Kitty Items FE application (viewable here) contains all of the desired functionality but is still hard to understand without looking at the underlying code and contracts.
What minimal updates can we make to the application UI to better illustrate the logic of Kitty Items and the core concepts of Flow?
Hi there,
Thanks for the excellent example!
After listing the items from "Items Shop", are these items supposed to go back and show up under the "Items Shop" tab?
If so, the page has been loading forever ( a spinning circle by ID), although the items in "My Items" tab have been updated.
Thanks so much and have a good day!
@srinjoyc commented on Wed May 05 2021
Currently there are no instructions on how to develop locally on kitty-items. Since most devs will at some point need to run locally, we should provide easy setup instructions to start. Eventually, we should automate and couple parts together to make it more seamless and integrated into the CLI.
The following questions should be answered in the local instructions:
Directly add the instructions on the main README in a section called 'Running Locally'.
The dev wallet repo will need some updates and fixes to its documentation prior to doing this.
Is your feature request related to a problem? Please describe.
Developers want to start using FUSD in their applications, but lack a concrete example demonstrating how to do so.
Describe the solution you'd like
Ideally Kitty Items can be updated with the following:
KittyItemsMarket
, which is hard-coded to Kibble
) (issue: #9)Kibble
contract and minting functionality in the APIFUSD
or Kibble
Kibble
version if they are interested in creating their own fungible token.We've iterated on the design of the marketplace contract. We should update the Kitty Items example to reflect those changes.
In contract KittyItems , Is impssible mint the nft with given quantity?
pub fun mintNFT(recipient: &{NonFungibleToken.CollectionPublic}, typeID: UInt64) {
emit Minted(id: KittyItems.totalSupply, typeID: typeID)
deposit it in the recipient's account using their reference
recipient.deposit(token: <-create KittyItems.NFT(initID: KittyItems.totalSupply, initTypeID: typeID))
KittyItems.totalSupply = KittyItems.totalSupply + (1 as UInt64)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.