eshon / conference Goto Github PK
View Code? Open in Web Editor NEWA simple Ethereum smart contract + DApp example
A simple Ethereum smart contract + DApp example
F:\dapps\conference-master\conference-master>truffle.cmd compile
Compiling .\contracts\Conference.sol...
Compiling .\contracts\Migrations.sol...
5
5
C:\Users\Himansh12\AppData\Roaming\npm\node_modules\truffle\node_modules\solc\wr
apper.js:48
throw e;
^
abort(5) at Error
at jsStackTrace (C:\Users\Himansh12\AppData\Roaming\npm\node_modules\truffle
\node_modules\solc\soljson.js:1:19718)
at stackTrace (C:\Users\Himansh12\AppData\Roaming\npm\node_modules\truffle\n
ode_modules\solc\soljson.js:1:19901)
at abort (C:\Users\Himansh12\AppData\Roaming\npm\node_modules\truffle\node_m
odules\solc\soljson.js:19:15285)
at Array.dXb (C:\Users\Himansh12\AppData\Roaming\npm\node_modules\truffle\no
de_modules\solc\soljson.js:11:585101)
at Array.tX (C:\Users\Himansh12\AppData\Roaming\npm\node_modules\truffle\nod
e_modules\solc\soljson.js:8:557453)
at Array.eea (C:\Users\Himansh12\AppData\Roaming\npm\node_modules\truffle\no
de_modules\solc\soljson.js:6:495332)
at Object.wOb [as dynCall_ii] (C:\Users\Himansh12\AppData\Roaming\npm\node_m
odules\truffle\node_modules\solc\soljson.js:11:540050)
at invoke_ii (C:\Users\Himansh12\AppData\Roaming\npm\node_modules\truffle\no
de_modules\solc\soljson.js:1:1275129)
at Array.ixa (C:\Users\Himansh12\AppData\Roaming\npm\node_modules\truffle\no
de_modules\solc\soljson.js:7:494308)
at Object.bVb [as dynCall_viii] (C:\Users\Himansh12\AppData\Roaming\npm\node
_modules\truffle\node_modules\solc\soljson.js:11:577232)
If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more in
formation.
there is beer in the fridge
Hi,
Thanks for upgrade to truffle version 2.0.4, I have copied the latest version of your code and 'truffle compile' 'truffle migrate' 'truffle test' are all working properly, but only when after issuing 'truffle serve', the page can not load the organizer and buyer address automatically, the earlier version will load contract address, organizer..., could you suggest if it can work in new version?
You need to add an empty images folder to the app folder i.e.
..app/images
Also in Migrations.sol in the contracts folder add a ; at the end of line 8 so it reads:
if (msg.sender == owner) _;
Also add: pragma solidity ^0.4.2; to the start of Conference.sol and Migrations.sol
And now one that had me stumped change line 19 (it will be line 18) unless you add the pragma line to:
function buyTicket() payable public {
That is add the payable modifier to the buyTicket() function. if you don't it will throw invalid jump!
And truffle test will fail.
Still having issues with the refund function specifically
the recipient.send(amount); line.
This project template is set up in Board View with columns and three Asana-created custom fields to help you track your team’s sprint plans. Most teams make projects at the beginning of each sprint and track their work through each stage to make sure they know where their sprint work stands.
We’ve provided some example content in this template to get you started, but you should add tasks, change task names, add more custom fields, and change any other info to make this project your own. When you’re ready to begin work, you can complete this task, or keep it in your project for easy access to our tips below.
Learn more about planning your sprints in Asana:
https://asana.com/guide/examples/eng/sprint-planning
https://academy.asana.com/series/product-use-cases/sprint-planning-course
Send feedback about this template:
https://asana.com/research/templates-feedback
MacBook-Pro:conference-master origin$ truffle compile
Error parsing /Users/geshengli/Downloads/conference-master/contracts/Migrations.sol: ParsedContract.sol:7:3: ParserError: Expected token Semicolon got 'RBrace'
}
^
Compilation failed. See above.
Hi, I am getting this error on "truffle compile"
`[henry@x1 conference]$ truffle compile
Compiling ./contracts/Conference.sol...
Compiling ./contracts/Migrations.sol...
/home/henry/projects/conference/contracts/Migrations.sol:7:3: ParserError: Expected token Semicolon got 'RBrace'
}
^
Compiliation failed. See above.
`
What should I do to fix this?
when i open html in console have error.
Uncaught ReferenceError: web3 is not defined at window.onload (app.js:177)
in (app.js:177) code is
web3.eth.getAccounts(function(err, accs) {
With Truffle 2.0.7, I am trying to compile MyConference.sol. I get this error.
Any recent change on Solidity affecting this code ?
Error compiling:
MyConference.sol:36:5: Warning: Return value of low-level calls not used.
recipient.send(amount);
^--------------------^
Compiliation failed. See above.
This is an example task for you to see how a “real” task in this project works.
Goal: Based on research, we’ve found the top 3 blockers to using calendar and are implementing solutions to solve: discoverability, speed, and functionality.
Metrics: 30% higher calendar usage after 90 days.
Do this
I got an error :
Error: No Network specified. can not determine current network.
Migrations.sol:7:3: ParserError: Expected token Semicolon
got 'RBrace'
}
^
Hi,
truffle test and serve work
but I get the following error on the console when I go on the browser localhost:8080.
TypeError: undefined is not an object (evaluating 'accounts')
onload — app.js:43735
The contract deployed at: does not show anything too. I'm not sure what might be wrong
I got this error.
Truffle v3.2.1
$ truffle serve
Serving static assets in ./build on port 8080...
Rebuilding...
Error building:
Build configuration can no longer be specified as an object. Please see our documentation for an updated list of supported build configurations.
Build failed. See above.
Did anyone try running the App?
How can you tell if it is working? I entered a buyer address, clicked on "Buy Ticket".
Registrants number did not change. Clicked on 'Check Balance, nothing happen!
Tried the 'Create Wallet", nothing happen.
The Fund wallet seems to create gas and a transaction but cannot check my wallet balance!
Thanks for your help.
testrpc Output
Transaction: 0x2e6cc0c5cffb1617562132cdc9e5a66b8180bd8c488c6dca4a555dbbe728777
Gas usage: 0x68ce
Block Number: 0x3b
Block Time: Mon May 22 2017 14:40:50 GMT+0400 (Arabian Standard Time)
eth_getTransactionReceipt
eth_call
eth_sendTransaction
eth_call
eth_sendTransaction
root@vagrant:/home/vagrant/conference# npm install -g truffle
...
/usr/local/bin/truffle -> /usr/local/lib/node_modules/truffle/truffle.bash
/usr/local/bin/truffle-exec -> /usr/local/lib/node_modules/truffle/truffle-exec.bash
[email protected] /usr/local/lib/node_modules/truffle
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected]
├── [email protected] ([email protected])
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
root@vagrant:/home/vagrant/conference# truffle deploy
/usr/local/lib/node_modules/truffle/node_modules/ether-pudding/loader.js:19
for (var file of files) {
^^
SyntaxError: Unexpected identifier
at Module._compile (module.js:439:25)
at Module._extensions..js (module.js:474:10)
at Object.require.extensions.(anonymous function) as .js
at Module.load (/usr/local/lib/node_modules/truffle/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/usr/local/lib/node_modules/truffle/lib/exec.es6:9:21)
at Module._compile (module.js:456:26)
at normalLoader (/usr/local/lib/node_modules/truffle/node_modules/babel/node_modules/babel-core/lib/api/register/node.js:199:5)
at Object.require.extensions.(anonymous function) as .es6
at Module.load (/usr/local/lib/node_modules/truffle/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/usr/local/lib/node_modules/truffle/lib/config.es6:12:12)
at Module._compile (module.js:456:26)
at normalLoader (/usr/local/lib/node_modules/truffle/node_modules/babel/node_modules/babel-core/lib/api/register/node.js:199:5)
at Object.require.extensions.(anonymous function) as .es6
at Module.load (/usr/local/lib/node_modules/truffle/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/usr/local/lib/node_modules/truffle/truffle.es6:14:14)
at Module._compile (module.js:456:26)
at normalLoader (/usr/local/lib/node_modules/truffle/node_modules/babel/node_modules/babel-core/lib/api/register/node.js:199:5)
at Object.require.extensions.(anonymous function) as .es6
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at Object. (/usr/local/lib/node_modules/truffle/node_modules/babel/lib/_babel-node.js:144:25)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3
root@vagrant:/home/vagrant/conference#
How to fix it?
I am having a compile error when running truffle compile (latest node, python 2.7, all according to instructions):
Migrations.sol:7:3: Error: Expected token Semicolon got 'RBrace'
➜ app git:(master) truffle compile
Compiling Conference.sol...
Compiling Migrations.sol...
Error compiling:
Migrations.sol:7:3: Error: Expected token Semicolon got 'RBrace'
}
^
Compilation failed. See above.
I had some troubles setting up the project. I dockerize it and put some further instructions.
You can check it here https://github.com/MiguelBel/conference
For bringing up the project just follow the "using docker" instructions.
Feel free to reach me out if you have any trouble with this.
Serving static assets in ./build on port 8080...
Rebuilding...
Error building:
Build configuration can no longer be specified as an object. Please see our documentation for an updated list of supported build configurations.
Build failed. See above.
/usr/lib/node_modules/truffle/build/webpack://chokidar/lib/fsevents-handler.js:26/chokidar/lib/fsevents-handler.js:26:1)
return (new fsevents(path)).on('fsevent', callback).start();
^
TypeError: fsevents is not a constructor
at createFSEventsInstance (/usr/lib/node_modules/truffle/build/webpack:/
at setFSEventsListener (/usr/lib/node_modules/truffle/build/webpack://chokidar/lib/fsevents-handler.js:80:1)/chokidar/lib/fsevents-handler.js:244:1)
at FSWatcher.FsEventsHandler._watchWithFsEvents (/usr/lib/node_modules/truffle/build/webpack:/
at FSWatcher. (/usr/lib/node_modules/truffle/build/webpack:/~/chokidar/lib/fsevents-handler.js:378:1)
at LOOP (fs.js:1781:14)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
my truffle is v2.1.1,when i use truffle compile,there are errors:
Could not find expected contract or library in 'MetaCoin.sol': contract or library 'MetaCoin' not found.
Compilation failed. See above.
zhangjiajiedeMacBook-Pro:contracts zhangjiajie$ truffle compile
Compiling ConvertLib.sol...
Compiling MetaCoin.sol...
Compiling Migrations.sol...
Error compiling:
Could not find expected contract or library in 'ConvertLib.sol': contract or library 'ConvertLib' not found.
Compilation failed. See above.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.