Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Bytecode Error when running test file - code Invalid argument #44

Open
Aadil151 opened this issue Nov 25, 2024 · 0 comments
Open
Labels
bug 🐛 Something isn't working

Comments

@Aadil151
Copy link

When trying to deploy the BinaryIMTTest.sol I get an incorrect bytecode error with the code invalid argument. Upon

Steps to reproduce the behavior:
Using Hardhat, compile and try to deploy the test contract on a local blockchain.

Expect the contract to deploy to the local blockchain

Screenshots
If applicable, add screenshots to help explain your problem.
Error:
`D:\Projects\Test zk-snarks\scaffold-eth-2>yarn deploy
Generating typings for: 1 artifacts in dir: typechain-types for target: ethers-v6
Successfully generated 14 typings!
Compiled 1 Solidity file successfully (evm target: istanbul).
reusing "YourContract" at 0x5FC8d32690cc91D4c39d9d3abcBD16989F875707
reusing "Groth16Verifier" at 0x0165878A594ca255338adfa4d48449f69242Eb8F
An unexpected error occurred:

Error: ERROR processing D:\Projects\Test zk-snarks\scaffold-eth-2\packages\hardhat\deploy\00_deploy_your_contract.ts:
Error: invalid bytecode (argument="bytecode", value="0x608060405234801561001057600080fd5b506107be806100206000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c8063126ccc571461006757806373d4a13a1461008357806390b5561d146100a4578063b7b0422d146100c0578063d42d361b146100dc578063dd09b0db146100f8575b600080fd5b610081600480360381019061007c9190610387565b610114565b005b61008b61018d565b60405161009b9493929190610681565b60405180910390f35b6100be60048036038101906100b9919061035e565b6101b8565b005b6100da60048036038101906100d5919061035e565b6101bb565b005b6100f660048036038101906100f1919061035e565b61022b565b005b610112600480360381019061010d9190610410565b610298565b005b73__$a9de6087b0a240ac1b1450641d763b373d$6362cff85e600087878787876040518763ffffffff1660e01b8152600401610156969594939291906105f3565b60006040518083038186803b15801561016e57600080fd5b505af4158015610182573d6000803e3d6000fd5b505050505050505050565b60008060000154908060010154908060020154908060050160009054906101000a900460ff16905084565b50565b73$a9de6087b0a240ac1b1450641d763b373d$6334a84bb460008360006040518463ffffffff1660e01b81526004016101f89392919061064a565b60006040518083038186803b15801561021057600080fd5b505af4158015610224573d6000803e3d6000fd5b5050505050565b73$a9de6087b0a240ac1b1450641d763b373d$__6314d8c6266000836040518363ffffffff1660e01b81526004016102659291906105ca565b60006040518083038186803b15801561027d57600080fd5b505af4158015610291573d6000803e3d6000fd5b5050505050565b505050505050565b60008083601f8401126102b257600080fd5b8235905067ffffffffffffffff8111156102cb57600080fd5b6020830191508360208202830111156102e357600080fd5b9250929050565b60008083601f8401126102fc57600080fd5b8235905067ffffffffffffffff81111561031557600080fd5b60208301915083602082028301111561032d57600080fd5b9250929050565b6000813590506103438161075a565b92915050565b60008135905061035881610771565b92915050565b60006020828403121561037057600080fd5b600061037e84828501610334565b91505092915050565b60008060008060006060868803121561039f57600080fd5b60006103ad88828901610334565b955050602086013567ffffffffffffffff8111156103ca57600080fd5b6103d6888289016102a0565b9450945050604086013567ffffffffffffffff8111156103f557600080fd5b610401888289016102ea565b92509250509295509295909350565b6000806000806000806080878903121561042957600080fd5b600061043789828a01610334565b965050602061044889828a01610334565b955050604087013567ffffffffffffffff81111561046557600080fd5b61047189828a016102a0565b9450945050606087013567ffffffffffffffff81111561049057600080fd5b61049c89828a016102ea565b92509250509295509295509295565b60006104b783836105bb565b60208301905092915050565b60006104cf83856106dd565b93507f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8311156104fe57600080fd5b60208302925061050f83858461074b565b82840190509392505050565b600061052783856106ee565b9350610532826106c6565b8060005b8581101561056b5761054882846106ff565b61055288826104ab565b975061055d836106d0565b925050600181019050610536565b5085925050509392505050565b61058181610716565b82525050565b61059081610739565b82525050565b8082525050565b6105a681610722565b82525050565b6105b581610722565b82525050565b6105c48161072c565b82525050565b60006040820190506105df6000830185610596565b6105ec60208301846105ac565b9392505050565b60006080820190506106086000830189610596565b61061560208301886105ac565b81810360408301526106288186886104c3565b9050818103606083015261063d81848661051b565b9050979650505050505050565b600060608201905061065f6000830186610596565b61066c60208301856105ac565b6106796040830184610587565b949350505050565b6000608082019050610696600083018761059d565b6106a3602083018661059d565b6106b0604083018561059d565b6106bd6060830184610578565b95945050505050565b6000819050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061070e6020840184610349565b905092915050565b60008115159050919050565b6000819050919050565b600060ff82169050919050565b600061074482610722565b9050919050565b82818337600083830152505050565b61076381610722565b811461076e57600080fd5b50565b61077a8161072c565b811461078557600080fd5b5056fea2646970667358221220b79e23f797ebbfe47172b10d0071330a301710629437dcf7bede902e5f188f9a64736f6c63430008040033", code=INVALID_ARGUMENT, version=contracts/5.7.0)
at Logger.makeError (D:\Projects\Test zk-snarks\scaffold-eth-2\packages\hardhat\node_modules@ethersproject\logger\src.ts\index.ts:269:28)
at Logger.throwError (D:\Projects\Test zk-snarks\scaffold-eth-2\packages\hardhat\node_modules@ethersproject\logger\src.ts\index.ts:281:20)
at Logger.throwArgumentError (D:\Projects\Test zk-snarks\scaffold-eth-2\packages\hardhat\node_modules@ethersproject\logger\src.ts\index.ts:285:21)
at new ContractFactory (D:\Projects\Test zk-snarks\scaffold-eth-2\packages\hardhat\node_modules@ethersproject\contracts\src.ts\index.ts:1172:20)
at new DeploymentFactory (D:\Projects\Test zk-snarks\scaffold-eth-2\packages\hardhat\node_modules\hardhat-deploy\src\DeploymentFactory.ts:40:22)
at fetchIfDifferent (D:\Projects\Test zk-snarks\scaffold-eth-2\packages\hardhat\node_modules\hardhat-deploy\src\helpers.ts:836:21)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async _deployOne (D:\Projects\Test zk-snarks\scaffold-eth-2\packages\hardhat\node_modules\hardhat-deploy\src\helpers.ts:913:24)
at async Object.deployYourContract [as func] (D:\Projects\Test zk-snarks\scaffold-eth-2\packages\hardhat\deploy\00_deploy_your_contract.ts:60:3)
at async DeploymentsManager.executeDeployScripts (D:\Projects\Test zk-snarks\scaffold-eth-2\packages\hardhat\node_modules\hardhat-deploy\src\DeploymentsManager.ts:1212:22)
at DeploymentsManager.executeDeployScripts (D:\Projects\Test zk-snarks\scaffold-eth-2\packages\hardhat\node_modules\hardhat-deploy\src\DeploymentsManager.ts:1215:19)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async DeploymentsManager.runDeploy (D:\Projects\Test zk-snarks\scaffold-eth-2\packages\hardhat\node_modules\hardhat-deploy\src\DeploymentsManager.ts:1061:5)
at async SimpleTaskDefinition.action (D:\Projects\Test zk-snarks\scaffold-eth-2\packages\hardhat\node_modules\hardhat-deploy\src\index.ts:450:5)
at async Environment._runTaskDefinition (D:\Projects\Test zk-snarks\scaffold-eth-2\packages\hardhat\node_modules\hardhat\src\internal\core\runtime-environment.ts:351:14)
at async Environment.run (D:\Projects\Test zk-snarks\scaffold-eth-2\packages\hardhat\node_modules\hardhat\src\internal\core\runtime-environment.ts:184:14)
at async SimpleTaskDefinition.action (D:\Projects\Test zk-snarks\scaffold-eth-2\packages\hardhat\node_modules\hardhat-deploy\src\index.ts:601:32)
at async Environment._runTaskDefinition (D:\Projects\Test zk-snarks\scaffold-eth-2\packages\hardhat\node_modules\hardhat\src\internal\core\runtime-environment.ts:351:14)
at async Environment.run (D:\Projects\Test zk-snarks\scaffold-eth-2\packages\hardhat\node_modules\hardhat\src\internal\core\runtime-environment.ts:184:14)
at async SimpleTaskDefinition.action (D:\Projects\Test zk-snarks\scaffold-eth-2\packages\hardhat\node_modules\hardhat-deploy\src\index.ts:690:5)`

  • Node.js version 18.18.0
  • NPM version 10.9.0
  • Solidity version 0.8.4
  • next version 14.2.11
  • ethers: "^6.13.2",
  • hardhat": "^2.22.10",
  • hardhat-deploy": "^0.12.4",
  • hardhat-deploy-ethers": "^0.4.2",
@Aadil151 Aadil151 added the bug 🐛 Something isn't working label Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant