Comments (3)
Truffle 2.0 uses a different folder structure. The config directory has been replaced with a migrations directory. To get this project to deploy:
- mkdir conference
- cd conference
- Run truffle init
- cd contracts. If you do an ls, you will notice three Solidity files (ConvertLib.sol, MetaCoin.sol and Migrations.sol) I deleted ConvertLib.sol and MetaCoin.sol. You need Migrations.sol. Do not edit this contract. Create a new file and dopy the conference.sol contract from this repository into this file and save as Conference.sol.
- cd ../migrations and do an ls. You should see two files (1_initial_migration.js and 2_deploy_contracts.js) These are crucial to deploying the truffle dapp. They need to be numbered in sequence. The 1_initial_migrations file deploys the Migrations contract and the 2_deploy_contracts deploys all your other contracts. 2_deploy_contracts needs to be edited so that it knows about your Conference contract. Edit this file - here's how mine looks:
module.exports = function(deployer) {
deployer.deploy(Conference);
}; - truffle compile
- truffle migrate
- truffle build
and everything should deploy without errors.
Where I am current stuck is when I run truffle test, I get
Contract: Conference
1) Initial conference settings should match
> No events were emitted
2) Should update quota
> No events were emitted
3) Should let you buy a ticket
> No events were emitted
4) Should issue a refund by owner only
> No events were emitted
0 passing (1s)
4 failing
-
Contract: Conference Initial conference settings should match:
Error: Invalid address passed to Conference.at(): undefined
at Function.Contract.at (/tmp/test-11675-13276-1a2cod1.r1ucakmx6r/Conference.sol.js:275:13)
at Context. (test/conference.js:7:24) -
Contract: Conference Should update quota:
Error: Invalid address passed to Conference.at(): undefined
at Function.Contract.at (/tmp/test-11675-13276-1a2cod1.r1ucakmx6r/Conference.sol.js:275:13)
at Context. (test/conference.js:25:24) -
Contract: Conference Should let you buy a ticket:
Error: Invalid address passed to Conference.at(): undefined
at Function.Contract.at (/tmp/test-11675-13276-1a2cod1.r1ucakmx6r/Conference.sol.js:275:13)
at Context. (test/conference.js:42:24) -
Contract: Conference Should issue a refund by owner only:
Error: Invalid address passed to Conference.at(): undefined
at Function.Contract.at (/tmp/test-11675-13276-1a2cod1.r1ucakmx6r/Conference.sol.js:275:13)
at Context. (test/conference.js:68:24)
from conference.
I did exactly as said in the above comments and it worked fine till step - 6(truffle compile) but when i run truffle migrate, I get the error:
test@test-ubuntu:~/Blockchain/Ethereum/conference$ truffle migrate
Running migration: 1_initial_migration.js
Deploying Migrations...
Error encountered, bailing. Network state unknown. Review successful transactions manually.
Error: Server error
at Object.module.exports.InvalidResponse (/usr/local/lib/node_modules/truffle/node_modules/ether-pudding/node_modules/web3/lib/web3/errors.js:35:16)
at /usr/local/lib/node_modules/truffle/node_modules/ether-pudding/node_modules/web3/lib/web3/requestmanager.js:86:36
at [object Object].request.onreadystatechange (/usr/local/lib/node_modules/truffle/node_modules/web3/lib/web3/httpprovider.js:114:13)
at [object Object].dispatchEvent (/usr/local/lib/node_modules/truffle/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:591:25)
at setState (/usr/local/lib/node_modules/truffle/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:610:14)
at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/truffle/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:447:13)
at emitNone (events.js:72:20)
at IncomingMessage.emit (events.js:166:7)
at endReadableNT (_stream_readable.js:905:12)
at nextTickCallbackWith2Args (node.js:441:9)
at process._tickDomainCallback (node.js:396:17)
testrpc is up and running, and I see following two lines when I run truffle migrate:
127.0.0.1 - - [2016-10-21 09:38:17] "POST / HTTP/1.1" 200 718 0.001741
127.0.0.1 - - [2016-10-21 09:38:17] "POST / HTTP/1.1" 200 493 0.042596
Am I missing anything in the configuration?
Source Code is at https://github.com/manindra23/conference-contract/tree/develop
from conference.
@miglaros as for the first test, I think this reference might be useful:
trufflesuite/truffle#276
from conference.
Related Issues (20)
- truffle init doesn't create App folder HOT 1
- Running the App: Are the buttons working?
- Making the app running HOT 3
- Truffle Compile Failed HOT 1
- Migrations.sol Missing “;” HOT 1
- Compilation error(Throws an exception) HOT 2
- truffle migration doesn't work HOT 2
- HTML console error
- ParsedContract.sol:7:3: ParserError: Expected token Semicolon got 'RBrace' }
- truffle serve :Error building Build configuration can no longer be specified as an object HOT 2
- truffle comple error HOT 1
- getting error while running truffle server : TypeError: fsevents is not a constructor
- Do this
- Drink beer HOT 2
- [EXAMPLE TASK] - Launch updated calendar feature
- [READ ME] - Instructions for using this template
- meetup widget broke responsiveness
- Add google analytics HOT 1
- Add meetup link to events section
- Add sponsor logos
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.
from conference.