-
Notifications
You must be signed in to change notification settings - Fork 37
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
TypeChain #23
Comments
Generating the code and refactoring the existing code starting around here: https://github.com/Quintor/angular-truffle-box/blob/master/src/app/meta/meta-sender/meta-sender.component.ts#L31 should be doable. The type of the MetaCoin would then be the specific contract, rather than any. I also tend to do the calls with .sendTransaction or .call explicitly, which I don't think the TypeChain library supports? I'd be happy to accept a PR that does this cleanly. If I were to start working on it myself, I'll post it here. |
OK @pimotte, Please! I didn't understand meta-sender.component.ts, If i would like to give you sample smart contract so that give me an example of angular-truffle. "pragma solidity ^0.4.8; Please! @pimotte |
https://github.com/Quintor/angular-truffle-box/blob/master/src/app/meta/meta-sender/meta-sender.component.ts#L63 and https://github.com/Quintor/angular-truffle-box/blob/master/src/app/meta/meta-sender/meta-sender.component.ts#L81 are the lines where the contract interaction happens. If you want to do that with TypeChain, you should end up with the needed object around those lines. In general, using TypeChain with angular shouldn't be that different from using other libraries from angular, except maybe that the code is generated. |
I am ok in typechain but i need this please "pragma solidity ^0.4.8; web3.services.ts alwys contant i think |
If you want to implement an application that uses that contract, I recommend forking this repo and throwing away meta-sender.component.ts, and implement a new component that interacts with it. This Truffle box already has the MetaCoin contract as an example, so an additional contract is not needed. |
Error Constructor: [object Object] |
Did you get any errors when installing dependencies? |
"web3": "^1.0.0-beta.26" it is not work for me then i install "web3": "^0.20.4" and this is work |
I like your video in youtue Error |
If any of these issues still exist, feel free to create a new issue with a description how to reproduce them. |
How can we use TypeChain in angular 2+?
The text was updated successfully, but these errors were encountered: