erc20-practice's People
Forkers
zcstarrerc20-practice's Issues
Incorrect project structure for React.
Summary:
Project has the wrong file layout for the generated assets. React requires all references to be inside of source, so the output directory of the assets should be put in a generated folder.
Acceptance Criteria:
Generated files are placed inside of source with a generated prefix similar
No address assigned to deployed contract
I am having trouble finding the address of the truffle deployed contract. I image it would be in networks, however, looking in the abi, the networks object is empty. Here is the error I get when I run my code. Which is on the fix/contract-deploy branch.
If you run my branch and look in the console. You can see that for the contract object I can only access the methods by first going into _parent. I am not sure why this is occurring. Should I just be able to call methods with doing contract._parent.methods?
We are trying to resolve this issue before forking the repo for the actual project.
Contract deployment and access pattern
Hey was going over the typechain documentation and noticed their example, looks different than web3's interface. Their recommendations are that you instantiate the web3 smart contract via referencing the json the casting it to Be the typed version from the definitions. This will then allow you to use the .methods.nameofmethodtocall.call() functionality with types.
The original thought was that it would behave just like web3 and wrap the methods.
Here's some example links of how it is working.
Shows the pattern.
https://github.com/ethereum-ts/TypeChain/blob/master/test/integration/targets/web3-v2/DumbContract.spec.web3.ts#L11
Shows the utility to deploy.
https://github.com/ethereum-ts/TypeChain/blob/master/test/integration/targets/web3-v2/web3.ts#L26
Let me know if you have more questions or hit issues
package.json scripts need adjustment
Summary:
The package.json scripts have a problem with it's outDir the directory is /src/... which is off of the rootPath which causes issues with permissions. It should have a doubt or no / prefix.
in #5 the suggested structure would mean adjusting to be something like
"generate": "truffle compile && typechain --force --outDir src/contract-types --target web3-v2 ./src/contract-data/**/*.json"
Truffle Config file should have the shape
module.exports = {
// See <http://truffleframework.com/docs/advanced/configuration>
// for more about customizing your Truffle configuration!
networks: {
development: {
host: "127.0.0.1",
port: 9545, // was 7545 before
network_id: "*", // Match any network id
},
kotti: {
network_id: "*",
provider: new Web3.providers.HttpProvider('https://services.jade.builders/multi-geth/kotti/1.9.9')
}
},
// Note adjustment here where we specify the contract build directory to output in source
contracts_build_directory: "./src/contract-data",
test_file_extension_regexp: /.*\.ts$/
};
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.