xf00f / web3x

Ethereum TypeScript Client Library - for perfect types and tiny builds.
211 stars 27 forks source link

Unable to create contracts without address specified #22

Closed AlexCheema closed 5 years ago

AlexCheema commented 5 years ago

On version v3.0.1.

When creating an instance of a contract without specifying an address, I get the following output: "No contract address."

This seems to be because of buildMethods in Contract. It visits every function in the abi and creates an executor for each one. When doing this, it checks if the address has been defined.

Thank you for the great library, it has saved me a lot of time.

AlexCheema commented 5 years ago

By the way, my usecase is deploying contracts from a contract instance. Please let me know if I'm missing something.

xf00f commented 5 years ago

@AlexCheema Was this an issue before v3.0.1? If not, do you know what version were you on before?

The "No contract address" error should only be thrown if you are calling a contract method without having specified the contract address. e.g. If you have not yet deployed the contract with deploy or deployBytecode, or if you constructed without an address.

A minimal example that reproduces the issue would help. I will fix immediately if the error is in the library.

AlexCheema commented 5 years ago

@xf00f This was my mistake. The issue was something else. I'll make an issue for that.