thirdweb-dev / js

Best in class web3 SDKs for Browser, Node and Mobile apps
https://thirdweb.com
Apache License 2.0
466 stars 388 forks source link

Unable to verify Thirdweb smart contract on Celo #2557

Closed kamikazechaser closed 7 months ago

kamikazechaser commented 8 months ago

According to the docs:

import { ThirdwebSDK } from "@thirdweb-dev/sdk";

const sdk = new ThirdwebSDK("celo", {
    secretKey: "XXX",
})
const explorerAPIUrl = "https://api.celoscan.io/api"
const explorerAPIKey = "XXX"

await sdk.verifier.verifyThirdwebContract(
    "ManagedAccountFactory",
    explorerAPIUrl,
    explorerAPIKey,
);

Output:

/tmp/thirdweb/node_modules/.pnpm/@thirdweb-dev+sdk@4.0.50_ethers@5.7.2_typescript@5.4.3/node_modules/@thirdweb-dev/sdk/dist/index-1e72d576.cjs.dev.js:5109
      throw new Error("Can't resolve constructor arguments");
            ^

Error: Can't resolve constructor arguments
    at /tmp/thirdweb/node_modules/.pnpm/@thirdweb-dev+sdk@4.0.50_ethers@5.7.2_typescript@5.4.3/node_modules/@thirdweb-dev/sdk/dist/index-1e72d576.cjs.dev.js:5109:13
    at Array.map (<anonymous>)
    at encodeConstructorParamsForImplementation (/tmp/thirdweb/node_modules/.pnpm/@thirdweb-dev+sdk@4.0.50_ethers@5.7.2_typescript@5.4.3/node_modules/@thirdweb-dev/sdk/dist/index-1e72d576.cjs.dev.js:5075:70)
    at Object.computeDeploymentInfo (/tmp/thirdweb/node_modules/.pnpm/@thirdweb-dev+sdk@4.0.50_ethers@5.7.2_typescript@5.4.3/node_modules/@thirdweb-dev/sdk/dist/index-1e72d576.cjs.dev.js:5041:29)
    at Object.getDeploymentInfo (/tmp/thirdweb/node_modules/.pnpm/@thirdweb-dev+sdk@4.0.50_ethers@5.7.2_typescript@5.4.3/node_modules/@thirdweb-dev/sdk/dist/deployContractDeterministic-31e620a3.cjs.dev.js:140:76)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async predictThirdwebContractAddress (/tmp/thirdweb/node_modules/.pnpm/@thirdweb-dev+sdk@4.0.50_ethers@5.7.2_typescript@5.4.3/node_modules/@thirdweb-dev/sdk/dist/sdk-3a69b331.cjs.dev.js:120:28)
    at async getThirdwebContractAddress (/tmp/thirdweb/node_modules/.pnpm/@thirdweb-dev+sdk@4.0.50_ethers@5.7.2_typescript@5.4.3/node_modules/@thirdweb-dev/sdk/dist/sdk-3a69b331.cjs.dev.js:147:27)
    at async verifyThirdwebPrebuiltImplementation (/tmp/thirdweb/node_modules/.pnpm/@thirdweb-dev+sdk@4.0.50_ethers@5.7.2_typescript@5.4.3/node_modules/@thirdweb-dev/sdk/dist/sdk-3a69b331.cjs.dev.js:203:27)
    at async ContractVerifier.verifyThirdwebContract (/tmp/thirdweb/node_modules/.pnpm/@thirdweb-dev+sdk@4.0.50_ethers@5.7.2_typescript@5.4.3/node_modules/@thirdweb-dev/sdk/dist/sdk-3a69b331.cjs.dev.js:525:18)

Node.js v21.7.1 with sdk version ^4.0.50

Edit:

I tried to verify on the Dashboard. It reports the verification as successful but on Celoscan it isn't verfied. That is a separate bug related to the Thirdweb SaaS.

kumaryash90 commented 8 months ago

Hey @kamikazechaser we're having some trouble currently with contract verification on Celo. We're looking into it. Will let you know once this is resolved.

stale[bot] commented 7 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.