GraphemeNFT / rarible-scaffold

MIT License
0 stars 0 forks source link

server / client mint #14

Closed dcsan closed 3 years ago

dcsan commented 3 years ago

seems to use a different contract address ie the actual local contract, not the deployed contract...

tried to update and use deployed address the yarn mint tx will go through

but the items still don't show up in the client user's wallet.

dcsan commented 3 years ago

yarn mint output

🎫 Minting to 0xcF2ab8d5d15A4B58fb5c263fFA88Ba2Cb930038a contractAddress 0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82

creates tx

eth_blockNumber (194)
web3_clientVersion
eth_chainId
eth_accounts
eth_blockNumber
eth_chainId
eth_estimateGas
eth_gasPrice
eth_sendTransaction
  Contract call:       YourCollectible#mintItem
  Transaction:         0xaa704f01e4692577ddb4fd09a0b2e35e786327ea5cd5bfb5680b528bda4625c4
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0x0dcd1bf9a1b36ce34237eeafef220932846bcd82
  Value:               0 ETH
  Gas used:            211122 of 211122
  Block #24:           0x903f0ab5b933b93713d0f560b9a5c833de727d138f61921bcf845e5005599178

eth_chainId
eth_getTransactionByHash
eth_blockNumber
eth_chainId
eth_blockNumber
eth_getLogs
eth_getBalance (2)
eth_accounts (2)
eth_call
  Contract call:       YourCollectible#balanceOf
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_blockNumber
eth_getBlockByNumber
eth_blockNumber (10)
web3_clientVersion
eth_chainId (3)
eth_getBalance
eth_chainId
eth_getTransactionCount
eth_chainId (2)
eth_getBalance
eth_chainId
eth_getTransactionCount
eth_blockNumber (50)
dcsan commented 3 years ago

deployer 0x4519d570f9bee8adbe0d84ec536ed325f4ba3dd6 client wallet 0xcF2ab8d5d15A4B58fb5c263fFA88Ba2Cb930038a deployed contractAddress 0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82 local contract address 0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9

(how to find out deployed address after deploying?)

dcsan commented 3 years ago

client mint works but chain tx log is a LOT noisier

eth_blockNumber (102)
eth_estimateGas
eth_getCode
eth_gasPrice
eth_blockNumber
eth_getBalance (2)
eth_call
  WARNING: Calling an account which is not a contract
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0x44691b39d1a75dc4e0a0346cbb15e310e6ed1e86

eth_getTransactionCount
eth_blockNumber
eth_sendRawTransaction
  Contract call:       YourCollectible#mintItem
  Transaction:         0xde35f55c1f25b0ba8f8063790098dcfec16f3342b1bc590b97b768152f168f34
  From:                0xcf2ab8d5d15a4b58fb5c263ffa88ba2cb930038a
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9
  Value:               0 ETH
  Gas used:            211122 of 211122
  Block #28:           0xeea6c035532d2a067d286855b5dc604cffd2cbc3781a1cfcb2d6b3ee599cca2c

eth_blockNumber
eth_getLogs
eth_getBalance (2)
eth_accounts (2)
eth_call
  Contract call:       YourCollectible#balanceOf
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenOfOwnerByIndex
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenURI
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenOfOwnerByIndex
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenURI
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenOfOwnerByIndex
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenURI
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenOfOwnerByIndex
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenURI
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenOfOwnerByIndex
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenURI
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenOfOwnerByIndex
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenURI
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenOfOwnerByIndex
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenURI
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenOfOwnerByIndex
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenURI
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenOfOwnerByIndex
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenURI
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenOfOwnerByIndex
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenURI
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenOfOwnerByIndex
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenURI
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenOfOwnerByIndex
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenURI
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenOfOwnerByIndex
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenURI
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenOfOwnerByIndex
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenURI
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_blockNumber
eth_getBlockByNumber
eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenOfOwnerByIndex
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenURI
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenOfOwnerByIndex
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenURI
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenOfOwnerByIndex
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_accounts (2)
eth_call
  Contract call:       YourCollectible#tokenURI
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9

eth_blockNumber (3)
dcsan commented 3 years ago

comparing

deployer 0x4519d570f9bee8adbe0d84ec536ed325f4ba3dd6 client wallet 0xcF2ab8d5d15A4B58fb5c263fFA88Ba2Cb930038a deployed contractAddress 0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82 local contract address 0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9

client mint

eth_call
  WARNING: Calling an account which is not a contract
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0x44691b39d1a75dc4e0a0346cbb15e310e6ed1e86

eth_getTransactionCount
eth_blockNumber
eth_sendRawTransaction
  Contract call:       YourCollectible#mintItem
  Transaction:         0xde35f55c1f25b0ba8f8063790098dcfec16f3342b1bc590b97b768152f168f34
  From:                0xcf2ab8d5d15a4b58fb5c263ffa88ba2cb930038a
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9
  Value:               0 ETH
  Gas used:            211122 of 211122
  Block #28:           0xeea6c035532d2a067d286855b5dc604cffd2cbc3781a1cfcb2d6b3ee599cca2c

server mint

eth_sendTransaction
  Contract call:       YourCollectible#mintItem
  Transaction:         0xaa704f01e4692577ddb4fd09a0b2e35e786327ea5cd5bfb5680b528bda4625c4
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0x0dcd1bf9a1b36ce34237eeafef220932846bcd82
  Value:               0 ETH
  Gas used:            211122 of 211122
  Block #24:           0x903f0ab5b933b93713d0f560b9a5c833de727d138f61921bcf845e5005599178

eth_chainId
eth_getTransactionByHash
eth_blockNumber
eth_chainId
eth_blockNumber
eth_getLogs
eth_getBalance (2)
eth_accounts (2)
eth_call
  Contract call:       YourCollectible#balanceOf
  From:                0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
  To:                  0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9
dcsan commented 3 years ago

I wonder if the server mint is still minting to a remote chain? Any idea what other config vars might need setting @tomosaigon

tomosaigon commented 3 years ago

Running "yarn mint" mints 1 token to my local address (after configuring that).

dcsan commented 3 years ago

to configure it what steps did you go through? maybe I'm missing something.

pretty sure i did it correctly since it works via web UI. I think server UI has even more access like a way to access all the /artifacts data.

tomosaigon commented 3 years ago
index f4e446a..f7d5104 100644
--- a/packages/hardhat/scripts/AppConfig.js
+++ b/packages/hardhat/scripts/AppConfig.js
@@ -3,7 +3,8 @@ const AppConfig = {
     // ADDRESS TO MINT TO / browser wallet address

     // DC local
-    toAddress: "0xcF2ab8d5d15A4B58fb5c263fFA88Ba2Cb930038a"
+    //toAddress: "0xcF2ab8d5d15A4B58fb5c263fFA88Ba2Cb930038a"
+    toAddress: "0x8bD1623AcD817B63df28134fe47515373c4Ade7D"

     // add a comment here in case we overwrite each others wallet addresses

diff --git a/packages/react-app/src/contracts/YourCollectible.address.js b/packages/react-app/src/contracts/YourCollectible.address.js
index 5f9ff4b..2656cd1 100644
--- a/packages/react-app/src/contracts/YourCollectible.address.js
+++ b/packages/react-app/src/contracts/YourCollectible.address.js
@@ -5,7 +5,7 @@
 // yarn deploy => contract address
 // module.exports = "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9"

-module.exports = "0x67d269191c92Caf3cD7723F116c85e6E9bf55933"
+module.exports = "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853";//"0x67d269191c92Caf3cD7723F116c85e6E9bf55933"

 // DC rarible
 // module.exports = "0xfBeab5c1de66515877A51e6aAB22f8F33861e65F";
diff --git a/packages/react-app/src/helpers/grapheme.js b/packages/react-app/src/helpers/grapheme.js`

That's all I had to configure.

dcsan commented 3 years ago

now workign for me, i think the publish step we added has fixed something.