0

i am getting this error when trying to deploy an NFT to the zksync testnet. The full example can be found heretext. the following error comes up when i have enough funds in the wallet whose pvt key i gave in the .env file specified

,0,0,3,0,29,0,0,0,0,1,4,0,25,0,0,0,0,2,3,0,25,28,122,28,94,0,0,3,79,0,0,0,11,2,0,0,41,0,0,0,14,3,0,0,41,0,0,0,13,4,0,0,41,0,0,0,1,3,48,0,57,0,0,0,0,1,35,0,75,0,0,0,227,0,0,65,61,0,0,0,4,5,0,0,41,0,0,0,0,0,0,0,35,134,242,111,193,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,24,79,3,233,63,249,244,218,167,151,237,110,56,237,100,191,106,31,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,245,225,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,48,49,50,51,52,53,54,55,56,57,97,98,99,100,101,102,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,127,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]]}}],\"id\":50,\"jsonrpc\":\"2.0\"}", requestMethod="POST", url="https://zksync2-testnet.zksync.dev", code=SERVER_ERROR, version=web/5.7.1)
      at Logger.makeError (/Users/mark/zksync/zksync-minter/node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
      at Logger.throwError (/Users/mark/zksync/zksync-minter/node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
      at /Users/mark/zksync/zksync-minter/node_modules/@ethersproject/web/src.ts/index.ts:341:28
      at step (/Users/mark/zksync/zksync-minter/node_modules/@ethersproject/web/lib/index.js:33:23)
      at Object.next (/Users/mark/zksync/zksync-minter/node_modules/@ethersproject/web/lib/index.js:14:53)
      at fulfilled (/Users/mark/zksync/zksync-minter/node_modules/@ethersproject/web/lib/index.js:5:58)
      at processTicksAndRejections (node:internal/process/task_queues:95:5) {
    reason: 'processing response error',
    code: 'SERVER_ERROR',
    body: '{"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params: missing field `gasPerPubdata`."},"id":50}\n',
    error: Error: Invalid params: missing field `gasPerPubdata`.
        at getResult (/Users/mark/zksync/zksync-minter/node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:142:28)
        at processJsonFunc (/Users/mark/zksync/zksync-minter/node_modules/@ethersproject/web/src.ts/index.ts:383:22)
        at /Users/mark/zksync/zksync-minter/node_modules/@ethersproject/web/src.ts/index.ts:320:42
        at step (/Users/mark/zksync/zksync-minter/node_modules/@ethersproject/web/lib/index.js:33:23)
        at Object.next (/Users/mark/zksync/zksync-minter/node_modules/@ethersproject/web/lib/index.js:14:53)
        at fulfilled (/Users/mark/zksync/zksync-minter/node_modules/@ethersproject/web/lib/index.js:5:58)
        at processTicksAndRejections (node:internal/process/task_queues:95:5) {
      code: -32602,
      data: undefined
    },
    requestBody: '{"method":"eth_estimateGas","params":[{"type":"0x71","from":"0x408c9aaed4a6bed5b762dc9b77f82e91ac3fbca7","to":"0x0000000000000000000000000000000000008006","data":"0xe2e9718a0000000000000000000000000000000000000000000000000000000000000000078bb5f2e2f5abb897c964a0db0e227e129344189e0d4f491d8151843ac4bdf80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004962616679626569687766647a37766e68696f696d6278656d6b72716472716f3775636a6d6f79336364617a356372363565687665327578636374712f6d657461646174612e6a736f6e0000000000000000000000000000000000000000000000","eip712Meta":{"feeToken":"0x0000000000000000000000000000000000000000","ergsPerStorage":"0x0","ergsPerPubdata":"0x0","factoryDeps":[[0,0,7,32,1,16,1,151,0,0,7,33,4,0,0,65,0,0,0,0,0,20,3,118,0,0,7,34,1,0,0,65,0,0,0,0,0,33,3,118,0,0,0,0,1,48,0,76,0,0,0,8,0,0,97,61,28,122,0,9,0,0,3,79,28,122,5,234,0,0,3,79,0,36,0,0,0,0,0,2,0,0,0,128,7,0,0,57,0,0,0,64,8,0,0,57,0,0,0,0,0,120,3,118,0,0,0,0,1,0,3,87,0,0,0,0,1,16,0,76,0,0,4,100,0,0,193,61,0,0,7,34,1,0,0,65,0,0,0,0,9,1,3,117,0,0,0,159,1,144,0,57,0,0,0,32,2,0,0,138,0,3,0,0,0,2,0,29,0,0,0,0,1,33,1,111,0,0,0,128,2,16,0,138,0,0,7,35,2,32,0,156,0,0,4,102,0,0,129,61,0,0,0,0,0,24,3,118,0,0,7,34,1,0,0,65,0,0,0,0,1,1,3,117,0,0,0,0,1,16,0,76,0,5,0,0,0,8,0,29,0,0,0,41,0,0,193,61,0,0,0,128,1,0,0,57,0,0,0,0,2,0,0,25,0,0,0,0,3,9,0,25,0,14,0,0,0,7,0,29,0,13,0,0,0,9,0,29,28,122,28,107,0,0,3,79,0,0,0,13,9,0,0,41,0,0,0,14,7,0,0,41,0,0,0,5,8,0,0,41,0,0,0,72,0,0,1,61,0,0,0,31,1,144,1,143,0,0,7,33,2,0,0,65,0,0,0,0,2,2,3,117,0,0,0,5,3,144,2,112,0,0,0,0,4,48,0,76,0,0,0,56,0,0,97,61,0,0,0,0,4,0,0,25,0,0,0,5,5,64,2,16,0,0,0,0,6,82,0,25,0,0,0,0,6,6,3,119,0,0,0,128,5,80,0,57,0,0,0,0,0,101,3,118,0,0,0,1,4,64,0,57,0,0,0,0,5,52,0,75,0,0,0,48,0,0,65,61,0,0,0,0,3,16,0,76,0,0,0,72,0,0,97,61,0,0,0,3,3,0,0,41,0,0,0,0,3,57,1,111,0,0,0,0,2,50,0,25,0,0,0,3,1,16,2,16,0,0,0,128,3,48,0,57,0,0,0,0,4,3,3,117,0,0,0,0,4,20,1,207,0,0,0,0,4,20,2,47,0,0,0,0,2,2,3,119,0,0,1,0,1,16,0,137,0,0,0,0,2,18,2,47,0,0,0,0,1,18,1,207,0,0,0,0,1,65,1,159,0,0,0,0,0,19,3,118,0,0,7,36,1,0,0,65,0,0,0,31,2,144,0,140,0,0,0,0,2,0,0,25,0,0,0,0,2,1,32,25,0,0,7,36,3,144,1,151,0,0,0,0,4,48,0,76,0,0,0,0,1,0,128,25,0,0,7,36,3,48,0,156,0,0,0,0,1,2,192,25,0,34,0,32,0,0,0,61,0,0,0,0,1,16,0,76,0,0,4,109,0,0,97,61,0,0,0,0,1,7,3,117,0,0,7,37,2,16,0,156,0,0,4,111,0,0,129,61,0,0,0,128,2,144,0,57,0,0,0,159,3,16,0,57,0,0,7,36,4,0,0,65,0,0,0,0,5,35,0,75,0,0,0,0,5,0,0,25,0,0,0,0,5,4,64,25,0,0,7,36,6,32,1,151,0,0,7,36,3,48,1,151,0,0,0,0,7,99,0,75,0,0,0,0,4,0,160,25,0,0,0,0,3,99,1,63,0,0,7,36,3,48,0,156,0,0,0,0,3,5,0,25,0,0,0,0,3,4,96,25,0,0,0,0,3,48,0,76,0,0,4,113,0,0,97,61,0,0,0,128,3,16,0,57,0,0,0,0,1,3,3,117,0,0,7,37,4,16,0,156,0,0,4,115,0,0,129,61,0,0,0,63,4,16,0,57,0,0,0,3,5,0,0,41,0,0,0,0,4,84,1,111,0,0,0,0,7,8,3,117,0,0,0,0,4,71,0,25,0,0,0,0,5,116,0,75,0,0,0,0,5,0,0,25,0,0,0,1,5,0,64,57,0,0,7,38,6,64,0,156,0,0,4,122,0,0,33,61,0,0,0,1,5,80,1,143,0,0,0,0,5,80,0,76,0,0,4,122,0,0,193,61,0,0,0,0,0,72,3,118,0,0,0,0,0,23,3,118,0,0,0,34,4,0,0,41,0,0,0,0,3,52,0,25,0,0,0,0,5,19,0,25,0,0,0,0,2,37,0,75,0,0,4,129,0,0,33,61,0,0,0,0,2,116,0,25,0,0,0,0,4,16,0,76,0,0,0,138,0,0,97,61,0,0,0,0,4,0,0,25,0,0,0,0,5,36,0,25,0,0,0,0,6,67,0,25,0,0,0,0,6,6,3,117,0,0,0,0,0,101,3,118,0,0,0,32,4,64,0,57,0,0,0,0,5,20,0,75,0,0,0,131,0,0,65,61,0,0,0,0,1,18,0,25,0,0,0,0,0,1,3,118,0,0,0,0,5,8,3,117,0,0,0,65,1,0,0,138,0,0,0,0,2,21,0,75,0,0,4,131,0,0,33,61,0,0,0,64,2,80,0,57,0,0,7,37,3,32,0,156,0,0,4,131,0,0,129,61,0,0,0,0,0,40,3,118,0,0,0,14,2,0,0,57,0,0,0,0,0,37,3,118,0,0,0,34,3,80,0,41,0,0,7,39,4,0,0,65,0,0,0,0,0,67,3,118,0,0,0,0,4,8,3,117,0,0,0,0,1,20,0,75,0,0,4,138,0,0,33,61,0,0,0,64,1,64,0,57,0,0,7,37,3,16,0,156,0,0,4,138,0,0,129,61,0,10,0,0,0,7,0,29,0,0,0,0,0,24,3,118,0,0,0,0,0,36,3,118,0,8,0,0,0,4,0,29,0,0,0,34,1,64,0,41,0,0,7,40,2,0,0,65,0,0,0,0,0,33,3,118,0,7,0,0,0,5,0,29,0,0,0,0,1,5,3,117,0,4,0,0,0,1,0,29,0,0,7,37,1,16,0,156,0,0,4,145,0,0,129,61,0,33,0,0,0,0,0,29,0,0,0,0,1,0,0,25,28,122,28,96,0,0,3,79,0,0,0,1,2,16,1,143,0,0,0,1,1,16,2,112,0,0,0,127,3,16,1,143,0,0,0,0,4,32,0,76,0,0,0,0,3,1,192,25,0,0,0,34,1,0,0,41,0,12,0,0,0,1,0,29,0,0,0,0,1,19,0,75,0,0,0,0,1,0,0,25,0,0,0,1,1,0,128,57,0,0,0,1,1,16,1,143,0,0,0,0,2,32,0,76,0,0,0,0,2,0,0,25,0,0,0,1,2,0,192,57,0,0,0,1,2,32,1,143,0,0,0,0,1,18,0,75,0,0,4,152,0,0,193,61,0,0,0,32,1,48,0,140,0,0,0,0,4,0,0,25,0,0,0,237,0,0,65,61,0,14,0,0,0,3,0,29,0,0,0,0,0,0,3,118,0,0,0,12,1,0,0,41,0,0,0,64,2,16,2,16,0,0,128,16,1,0,0,57,0,0,0,0,3,0,3,86,0,0,0,32,3,48,0,138,0,0,0,32,3,48,0,201,28,122,28,42,0,0,3,79,0,0,0,32,2,0,0,41,0,0,7,38,1,32,1,151,0,0,0,255,3,0,0,57,0,0,0,31,3,48,2,79,0,0,0,0,3,48,0,76,0,0,5,114,0,0,97,61,0,0,0,4,3,0,0,41,0,0,0,31,2,48,0,57,0,0,0,5,2,32,2,112,0,0,0,34,4,0,0,41,0,12,0,0,0,4,0,29,0,0,0,0,3,67,0,75,0,0,0,0,2,0,64,25,0,0,0,0,1,1,3,120,0,0,0,0,3,18,0,25,0,0,0,14,2,0,0,41,0,0,0,31,2,32,0,57,0,0,0,5,2,32,2,112,0,0,0,0,2,33,0,25,0,0,0,33,4,0,0,41,0,0,0,0,1,35,0,75,0,0,0,237,0,0,129,61,0,13,0,0,0,4,0,29,0,11,0,0,0,2,0,29,0,14,0,0,0,3,0,29,0,0,0,0,1,4,0,25,0,0,0,0,2,3,0,25,28,122,28,94,0,0,3,79,0,0,0,11,2,0,0,41,0,0,0,14,3,0,0,41,0,0,0,13,4,0,0,41,0,0,0,1,3,48,0,57,0,0,0,0,1,35,0,75,0,0,0,227,0,0,65,61,0,0,0,4,5,0,0,41,0,0,0,31,1,80,0,140,0,0,1,49,0,0,161,61,0,0,0,0,0,68,3,118,0,0,0,5,1,0,0,41,0,0,0,34,1,16,1,239,0,0,0,33,2,16,0,41,0,0,128,16,1,0,0,57,0,0,0,0,3,0,3,86,0,0,0,30,3,48,0,138,0,0,0,32,3,48,0,201,28,122,28,42,0,0,3,79,0,0,0,30,2,0,0,41,0,0,7,38,1,32,1,151,0,0,0,255,3,0,0,57,0,0,0,29,3,48,2,79,0,0,0,1,3,48,0,140,0,0,5,144,0,0,193,61,0,0,0,3,2,0,0,41,0,0,0,4,3,0,0,41,0,0,0,0,4,35,1,111,0,0,0,34,5,0,0,41,0,0,0,0,2,1,3,120,0,0,0,33,1,0,0,41,0,13,0,0,0,1,0,29,0,0,0,0,1,65,0,75,0,0,0,7,3,0,0,41,0,0,0,12,6,0,0,41,0,14,0,0,0,5,0,29,0,0,1,30,0,0,129,61,0,0,0,13,7,0,0,41,0,6,0,0,0,4,0,29,0,9,0,0,0,7,0,29,0,11,0,0,0,2,0,29,0,12,0,0,0,6,0,29,0,0,0,0,1,54,0,25,0,0,0,0,1,1,3,117,28,122,28,94,0,0,3,79,0,0,0,9,7,0,0,41,0,0,0,14,5,0,0,41,0,0,0,6,4,0,0,41,0,0,0,11,2,0,0,41,0,0,0,12,6,0,0,41,0,0,0,7,3,0,0,41,0,0,0,0,6,101,0,25,0,0,0,0,7,117,0,25,0,0,0,1,2,32,0,57,0,0,0,0,1,71,0,75,0,0,1,13,0,0,65,61,0,0,0,1,7,0,0,57,0,0,0,4,5,0,0,41,0,0,0,0,1,84,0,75,0,0,0,13,4,0,0,41,0,0,1,62,0,0,129,61,0,0,0,3,1,80,2,16,0,0,0,248,1,16,1,143,0,0,0,1,4,0,0,138,0,0,0,0,1,20,2,47,0,0,0,0,1,65,1,63,0,0,0,0,3,54,0,25,0,0,0,0,3,3,3,117,0,0,0,0,1,19,1,111,0,12,0,0,0,7,0,29,28,122,28,94,0,0,3,79,0,0,0,12,7,0,0,41,0,0,0,4,5,0,0,41,0,0,0,13,4,0,0,41,0,0,1,62,0,0,1,61,0,0,0,0,1,80,0,76,0,0,0,0,1,4,0,25,0,0,0,12,6,0,0,41,0,0,1,56,0,0,97,61,0,0,0,7,1,0,0,41,0,0,0,0,1,22,0,25,0,0,0,0,1,1,3,117,0,0,0,3,2,80,2,16,0,0,0,1,3,0,0,138,0,0,0,0,2,35,2,47,0,0,0,0,2,50,1,63,0,0,0,0,7,33,1,111,0,14,0,0,0,6,0,29,0,0,0,1,1,80,2,16,0,0,0,0,1,113,1,159,0,13,0,0,0,4,0,29,0,0,0,0,2,4,0,25,28,122,28,94,0,0,3,79,0,0,0,8,1,0,0,41,0,0,0,0,1,1,3,117,0,6,0,0,0,1,0,29,0,0,7,38,1,16,0,156,0,0,4,159,0,0,33,61,0,0,0,1,1,0,0,57,0,4,0,0,0,1,0,29,28,122,28,96,0,0,3,79,0,0,0,1,2,16,1,143,0,0,0,1,1,16,2,112,0,0,0,127,3,16,1,143,0,0,0,0,4,32,0,76,0,0,0,0,3,1,192,25,0,0,0,14,1,0,0,41,0,0,0,0,1,19,0,75,0,0,0,0,1,0,0,25,0,0,0,1,1,0,128,57,0,0,0,1,1,16,1,143,0,0,0,0,2,32,0,76,0,0,0,0,2,0,0,25,0,0,0,1,2,0,192,57,0,0,0,1,2,32,1,143,0,0,0,0,1,33,0,75,0,0,4,169,0,0,193,61,0,0,0,32,1,48,0,140,0,0,0,13,1,0,0,41,0,0,1,138,0,0,65,61,0,12,0,0,0,3,0,29,0,0,0,1,2,0,0,57,0,0,0,0,0,33,3,118,0,0,0,5,1,0,0,41,0,0,0,34,1,16,1,239,0,0,0,33,2,16,0,41,0,0,128,16,1,0,0,57,0,0,0,0,3,0,3,86,0,0,0,28,3,48,0,138,0,0,0,32,3,48,0,201,28,122,28,42,0,0,3,79,0,0,0,28,2,0,0,41,0,0,7,38,1,32,1,151,0,0,0,255,3,0,0,57,0,0,0,27,3,48,2,79,0,0,0,0,3,48,0,76,0,0,5,174,0,0,97,61,0,0,0,6,4,0,0,41,0,0,0,31,2,64,0,57,0,0,0,5,2,32,2,112,0,0,0,34,3,0,0,41,0,14,0,0,0,3,0,29,0,0,0,0,3,52,0,75,0,0,0,0,2,0,64,25,0,0,0,0,1,1,3,120,0,0,0,0,3,18,0,25,0,0,0,12,2,0,0,41,0,0,0,31,2,32,0,57,0,0,0,5,2,32,2,112,0,0,0,0,4,18,0,25,0,0,0,33,1,0,0,41,0,0,0,0,2,67,0,75,0,0,1,138,0,0,129,61,0,13,0,0,0,1,0,29,0,11,0,0,0,4,0,29,0,12,0,0,0,3,0,29,0,0,0,0,2,3,0,25,28,122,28,94,0,0,3,79,0,0,0,11,4,0,0,41,0,0,0,12,3,0,0,41,0,0,0,13,1,0,0,41,0,0,0,1,3,48,0,57,0,0,0,0,2,67,0,75,0,0,1,129,0,0,65,61,0,0,0,6,5,0,0,41,0,0,0,31,2,80,0,140,0,0,1,204,0,0,161,61,0,0,0,4,2,0,0,41,0,0,0,0,0,33,3,118,0,0,0,5,1,0,0,41,0,0,0,34,1,16,1,239,0,0,0,33,2,16,0,41,0,0,128,16,1,0,0,57,0,0,0,0,3,0,3,86,0,0,0,26,3,48,0,138,0,0,0,32,3,48,0,201,28,122,28,42,0,0,3,79,0,0,0,26,2,0,0,41,0,0,7,38,1,32,1,151,0,0,0,255,3,0,0,57,0,0,0,25,3,48,2,79,0,0,0,1,3,48,0,140,0,0,5,204,0,0,193,61,0,0,0,3,2,0,0,41,0,0,0,6,3,0,0,41,0,0,0,0,6,35,1,111,0,0,0,34,2,0,0,41,0,9,0,0,0,2,0,29,0,0,0,0,2,1,3,120,0,0,0,33,1,0,0,41,0,13,0,0,0,1,0,29,0,0,0,0,1,97,0,75,0,0,0,8,3,0,0,41,0,0,0,14,4,0,0,41,0,0,1,188,0,0,129,61,0,0,0,13,5,0,0,41,0,7,0,0,0,6,0,29,0,11,0,0,0,5,0,29,0,12,0,0,0,2,0,29,0,14,0,0,0,4,0,29,0,0,0,0,1,52,0,25,0,0,0,0,1,1,3,117,28,122,28,94,0,0,3,79,0,0,0,11,5,0,0,41,0,0,0,7,6,0,0,41,0,0,0,12,2,0,0,41,0,0,0,9,1,0,0,41,0,0,0,14,4,0,0,41,0,0,0,8,3,0,0,41,0,0,0,0,4,65,0,25,0,0,0,0,5,81,0,25,0,0,0,1,2,32,0,57,0,0,0,0,1,101,0,75,0,0,1,171,0,0,65,61,0,0,0,6,5,0,0,41,0,0,0,0,1,86,0,75,0,0,1,201,0,0,129,61,0,0,0,3,1,80,2,16,0,0,0,248,1,16,1,143,0,0,0,1,5,0,0,138,0,0,0,0,1,21,2,47,0,0,0,0,1,81,1,63,0,0,0,0,3,52,0,25,0,0,0,0,3,3,3,117,0,0,0,0,1,19,1,111,28,122,28,94,0,0,3,79,0,0,0,6,5,0,0,41,0,0,0,1,1,80,2,16,0,0,0,4,2,0,0,41,0,0,1,218,0,0,1,61,0,0,0,0,2,80,0,76,0,13,0,0,0,1,0,29,0,0,0,14,4,0,0,41,0,0,1,211,0,0,97,61,0,0,0,8,1,0,0,41,0,0,0,0,1,20,0,25,0,0,0,0,1,1,3,117,0,0,0,3,2,80,2,16,0,0,0,1,3,0,0,138,0,0,0,0,2,35,2,47,0,0,0,0,2,50,1,63,0,0,0,0,1,33,1,111,0,0,0,1,2,80,2,16,0,9,0,0,0,4,0,29,0,0,0,0,1,33,1,159,0,0,0,1,2,0,0,57,0,6,0,0,0,2,0,29,28,122,28,94,0,0,3,79,0,0,0,7,1,0,0,57,0,12,0,0,0,1,0,29,28,122,28,96,0,0,3,79,0,14,0,0,0,1,0,29,0,0,0,0,3,0,3,81,0,7,0,0,0,3,0,29,0,0,7,42,2,16,1,151,0,0,0,0,1,35,1,159,0,0'... 136961 more characters,
    requestMethod: 'POST',
    url: 'https://zksync2-testnet.zksync.dev'
  },
  tx: {
    customData: {
      factoryDeps: [Array],
      feeToken: '0x0000000000000000000000000000000000000000'
    },
    data: '0xe2e9718a0000000000000000000000000000000000000000000000000000000000000000078bb5f2e2f5abb897c964a0db0e227e129344189e0d4f491d8151843ac4bdf80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004962616679626569687766647a37766e68696f696d6278656d6b72716472716f3775636a6d6f79336364617a356372363565687665327578636374712f6d657461646174612e6a736f6e0000000000000000000000000000000000000000000000',
    type: 113,
    to: Promise { '0x0000000000000000000000000000000000008006' },
    from: '0x408C9AAED4a6BED5b762dC9b77f82e91Ac3FbcA7',
    nonce: Promise { 2 },
    gasLimit: Promise { <rejected> [Circular *1] },
    chainId: Promise { 280 }
  }
}
error Command failed with exit code 1.

i tried setting the manual gaslimit in the hardhat.config.ts code for deployer:

"use"
import { utils, Wallet } from "zksync-web3";
import * as ethers from "ethers";
import { HardhatRuntimeEnvironment } from "hardhat/types";
import { Deployer } from "@matterlabs/hardhat-zksync-deploy";
import * as metadata from "../nft/metadata.json";
import * as dotenv from "dotenv";
import { Web3Storage, Blob, File } from "web3.storage";

export default async function (hre: HardhatRuntimeEnvironment) {
  dotenv.config();
  console.log(`Running deploy script for the Thistle contract`);

  // Initialize the wallet.
  const wallet = new Wallet(process.env.PRIVATE_KEY as any);



  const deployer = new Deployer(hre, wallet);
  const artifact = await deployer.loadArtifact("DarkDimensions");

  // // Deposit some funds to L2
  // const depositAmount = ethers.utils.parseEther("0.001");
  // const depositHandle = await deployer.zkWallet.deposit({
  //   to: deployer.zkWallet.address,
  //   token: utils.ETH_ADDRESS,
  //   amount: depositAmount,
  // });
  // await depositHandle.wait();

  function getAccessToken() {
    console.log("✅ getAccessToken");
    return process.env.WEB3STORAGE_TOKEN;
  }

  function makeStorageClient() {
    console.log("✅ makeStorageClient");
    return new Web3Storage({ token: getAccessToken() } as any);
  }

  function makeFileObjects() {
    console.log("✅ makeFileObjects");
thanks :)

    const blob = new Blob([JSON.stringify(metadata)], {
      type: "application/json",
    });

    const files = [
      new File(["contents-of-file-1"], "plain-utf8.txt"),
      new File([blob], "metadata.json"),
    ];
    return files;
  }

  async function storeFiles(files) {
    console.log("✅ storeFiles");
    const client = makeStorageClient();
    const cid = await client.put(files);
    console.log("✅ stored files with CID: ", cid, "");
    return cid;
  }

  console.log(" Hello! ");
  makeStorageClient();
  const uri = (await storeFiles(makeFileObjects())) + "/metadata.json";
  console.log("✅ uri: ", uri);

  // Deploy this contract. The returned object will be of a `Contract` type, similarly to ones in `ethers`.
  const thistleContract = await deployer.deploy(artifact, [uri]);
  await thistleContract.deployed();

  // Show the contract info.
  const contractAddress = thistleContract.address;
  console.log("");
  console.log(`${metadata.name} was deployed to ${contractAddress}  `);
  console.log("");

  console.log("uri from contract: ", await thistleContract.tokenURI(1));
}
type here

code for the hardhat config:

require("@matterlabs/hardhat-zksync-deploy");
require("@matterlabs/hardhat-zksync-solc");
import * as dotenv from 'dotenv';
dotenv.config();

module.exports = {
  zksolc: {
    version: "0.1.0",
    compilerSource: "docker",
    settings: {
      optimizer: {
        enabled: true,
        runs: 200, 
      },
      experimental: {
        dockerImage: "matterlabs/zksolc",
      },
    },
  },
  zkSyncDeploy: {
    zkSyncNetwork: "https://zksync2-testnet.zksync.dev",
    ethNetwork: "https://goerli.infura.io/v3/"+process.env.INFURA_PROJECT_ID,
  },
  networks: {
    // To compile with zksolc, this must be the default network.
    hardhat: {
      zksync: true,
      gas: 70000000000,
      gasPrice: 80000000000,
    },
  },
  solidity: {
    version: "0.8.4",
  },
};

2 Answers2

0

This worked for me.

import '@matterlabs/hardhat-zksync-deploy'
import '@matterlabs/hardhat-zksync-solc'

module.exports = {
  zksolc: {
    version: '1.3.8',
    compilerSource: 'binary',
    settings: {},
  },
  defaultNetwork: 'mainNet',

  networks: {
    zkSyncTestnet: {
      url: 'https://testnet.era.zksync.dev',
      ethNetwork: 'goerli', // RPC URL of the network (e.g. `https://goerli.infura.io/v3/<API_KEY>`)
      zksync: true,
    },
    mainNet: {
      url: 'https://zksync2-mainnet.zksync.io',
      ethNetwork: 'mainnet', // RPC URL of the network (e.g. `https://goerli.infura.io/v3/<API_KEY>`)
      zksync: true,
    },
  },
  solidity: {
    version: '0.8.8',
  },
}

Anyway, you can follow this guide. https://era.zksync.io/docs/dev/building-on-zksync/hello-world.html

Mixmaster
  • 1
  • 1
  • Remember that Stack Overflow isn't just intended to solve the immediate problem, but also to help future readers find solutions to similar problems, which requires understanding the underlying code. This is especially important for members of our community who are beginners, and not familiar with the syntax. Given that, **can you [edit] your answer to include an explanation of what you're doing** and why you believe it is the best approach? – Jeremy Caney Apr 18 '23 at 01:22
-1

I had this problem as well. I was able to fix it by using all of these packages/versions in my project.json.

"@ethersproject/hash": "^5.7.0",
"@ethersproject/web": "^5.7.1",
"@matterlabs/hardhat-zksync-deploy": "^0.6.3",
"@matterlabs/hardhat-zksync-solc": "^0.3.16",
"@types/node": "^18.15.11",
"ethers": "^5.7.2",
"hardhat": "^2.13.0",
"ts-node": "^10.9.1",
"typescript": "^5.0.4",
"zksync-web3": "^0.14.3"
Bob Baxley
  • 3,551
  • 1
  • 22
  • 28