Skip to content

Conversation

@kumargaurav
Copy link

Hi, Added MyNFT smart contract changes for alchemy api. Please review and update the changes. Thanks

Hi, Added MyNFT smart contract changes for alchemy api. Please review and update the changes. Thanks
.borrow<&{MyNFT.CollectionPublic}>()
if col == nil { return nil }

let nft = col!.borrowReward(id: id)
Copy link
Contributor

Choose a reason for hiding this comment

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

Seeing this error on running the test:
258 | case "MyNFT": d = getSkyhorborNFT(owner: owner, id: id)
| ^^^^^^^^^^^^^^^ not found in this scope

Copy link
Author

Choose a reason for hiding this comment

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

Applied the fix and updated files on my repo.

Please review it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Still seeing errors, can you please run tests before submitting the PR:
--> d247108fdcd05636060b63a02b5c1758fbdbaee8f5ef948c1cfa34850c7f7233:3854:14
|
3854 | let nft = col!.borrowEntireNFT(id: id)
| ^^^^

error: value of type &MyNFT.NFT has no member name
--> d247108fdcd05636060b63a02b5c1758fbdbaee8f5ef948c1cfa34850c7f7233:3861:20
|
3861 | title: nft!.name,
| ^^^^ unknown member

error: value of type &MyNFT.NFT has no member editionNumber
--> d247108fdcd05636060b63a02b5c1758fbdbaee8f5ef948c1cfa34850c7f7233:3867:23
|
3867 | "editionNumber": nft.editionNumber,
| ^^^^^^^^^^^^^ unknown member

Copy link
Author

Choose a reason for hiding this comment

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

Hi,

I have fixed the name attribute issue getting in getNfts.cdc file.

But while running below test case command I'm getting error like ==> Command Error: error parsing script arguments: invalid character 't' looking for beginning of object key string

Am I passing something wrong in these command. I have tried with below 2 commands Please suggest on this. Thanks

MyNFT command:
flow scripts execute getNFTs.cdc --args-json '[{ "type": "Address", "value": "0x5affd8c030ae5761" }, { "type": "Dictionary", "value": [{ "key": { "type": "String", "value": "MyNFT" }, "value": { "type": "Array", "value": [{ "type": "UInt64", "value": "128" }] } }] }]' --network mainnet

PS_Scripts

Sample command provided in the repo note:
flow scripts execute getNFTs.cdc --args-json '[{ "type": "Address", "value": "0x9eef2e4511390ce4" }, { "type": "Dictionary", "value": [{ "key": { "type": "String", "value": "Gaia" }, "value": { "type": "Array", "value": [{ "type": "UInt64", "value": "1129" }] } }] }]' --network mainnet

Copy link
Author

Choose a reason for hiding this comment

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

Hi,

Please review it once and suggest.

Copy link
Author

Choose a reason for hiding this comment

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

Hi, Please check it once on the test case execution issue and suggest. So we can proceed further and complete it. Thanks in advance.

@niveda-krish
Copy link
Contributor

Seeing this error on running the test

258 | case "MyNFT": d = getSkyhorborNFT(owner: owner, id: id)
| ^^^^^^^^^^^^^^^ not found in this scope

@kumargaurav
Copy link
Author

Applied the fix and updated files on my repo used in the pull request.

Please review it.

Merged skyharbor changes with new updated code present on alchemy repo
@kumargaurav kumargaurav requested a review from prpatel05 as a code owner June 16, 2022 11:15
@kumargaurav
Copy link
Author

Hi,

We have updated changes on latest code repo. Please review it and update. Thanks

Added support to metadataviews in our new smart contract
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants