Meteor DApp Pricefeed - for operating price feeds on Etheruem

SilentCiceroSilentCicero Toronto, CAMember Posts: 159 ✭✭✭
edited March 2015 in Smart Contracts and Dapps
I wanted to build Gav's pricefeed contract into a fully fledged DApp that potential users could subscribe their contract addresses too, and admins could manage and monitor. So I built this DApp to meet these needs and to act as a starting point for businesses that want to operate trust-based price feeds on Ethereum.

I also threw in a basic python server that pulls thirdparty data and sends it to the price feed contract.

The default title is "Gold Price Today*" which will be my price feed for gold, updated daily. But I've designed the DApp so that it could be modified to fit almost any price feed scenario (e.g. silver, bitcoin etc.).

You can check out the project here:

All The Best, SC

Post edited by SilentCicero on


  • awrelllawrelll BucurestiMember Posts: 65 ✭✭
    I love your work man ! Awesome ! B)
  • SilentCiceroSilentCicero Toronto, CAMember Posts: 159 ✭✭✭
    Thank you, cheers!
  • cphicphi Member Posts: 46
    @SilentCicero Looks very nice. I started meteor in the /app directory and started a mining process with the latest Go client (geth -mine). I then clicked the "Deploy PriceFeed Contact" but nothing happens. Any idea what I am missing?
  • SilentCiceroSilentCicero Toronto, CAMember Posts: 159 ✭✭✭
    edited April 2015
    Hey @cphi, thanks for trying the price feed. Right now I'm diagnosing a series of problems of my own. It seems some changes where made in the latest poc (i.e 0.9.4) that are stopping some of the contact or js from working. I'll get back to you when I get this all working in the lasted Go POC. For now you could try just amping up the gas value on the deploy transaction.
  • SilentCiceroSilentCicero Toronto, CAMember Posts: 159 ✭✭✭
    edited April 2015
    @cphi try this latest commit. I had to update some code for the latest POC 0.9.4. Also, remember to set the HttpProvider address in client/lib/thirdpartyConfig.js to your local go CLI RPC address and port (usually http://localhost:8545).
  • cphicphi Member Posts: 46
    @SilentCicero Hmmm. Downloaded your latest version and started the latest go (POC 0.9.4) with:
    geth -rpc -rpcaddr "" -rpcport "8545" -mine

    Still nothing. Im sure Im missing something simple.
  • SilentCiceroSilentCicero Toronto, CAMember Posts: 159 ✭✭✭
    edited April 2015
    I haven't tried this on the public chain (of which your geth console code is running), just a private chain. Here is what I do to get something like this DApp operational on a private (or local) chain. This is for a fresh Ubuntu VMWare player machine.

    1. Clear old blockchain data
    $ sudo rm -rf ~/.etheruem

    2. Create a new account (fill out the password as it asks you and copy the address provided)
    $ geth account new

    3. Get your rpccorsdomain (this is where your running the dapp from, e.g. localhost:3000 or an YOUR_IP:3000) and run a geth local node
    $ geth --unlock=YOUR_ACCOUNT_ADDRESS --rpcaddr="localhost" --rpc --loglevel=5 --maxpeers=0 --rpccorsdomain="http://YOUR_RPC_CORS_DOMAIN" --mine

    Note, This is what my command line geth looks like for a local chain:
    $ geth --unlock=a78d98c038e15ad862ebb63f83c7abaffcdc7a4d --rpcaddr="" --rpc --loglevel=5 --maxpeers=0 --rpccorsdomain="" --mine

    I'm running a VMWare player instance to run geth, so it has a different domain (i.e. than my local computer (i.e. where I'm running the Meteor DApp. With POC 0.9.4 you need to allow cors access, so wherever your running your Meteor DApp, that is what is should be set to. Also, as you can see, maxpeers is set to zero to create the local chain. And the address you copied is the address you need to put as the unlock parameter. You will be asked when you run GEth to put in the password you created for that account, type it in and hit enter.

    Also, next time you try all this, right click the page of the Meteor DApp and provide what is in the console in Chrome. CNTRL+SHIFT+I for browser console.

    Cheers, hope this helps
  • cphicphi Member Posts: 46
    I tried with the --rpccorsdomain switch and that changed the Deployment button to a text field, but no contract address appeared. I also tried running locally like this:

    geth --unlock=e40d25c2ab7eca48a322775dbca1e4679b0ae919 --rpcaddr="localhost" --rpc --loglevel=5 --maxpeers=0 --rpccorsdomain="http://localhost:3000"; --mine

    I get the following unlock error in the javascript developer window of the browser.

    $ Your Accounts: ["0xadaa812c6e3a62e16b7a4a0751e2285e70aa577d", "0xe40d25c2ab7eca48a322775dbca1e4679b0ae919"]
    kwift.CHROME.min.js:514 Resource interpreted as Font but transferred with MIME type text/html: "http://localhost:3000/fonts/font-awesome/fontawesome-webfont.woff2?v=4.3.0".
    ethereum.js:2606 Object {id: 28, jsonrpc: "2.0", error: Object}
    ethereum.js:2608 could not unlock sender account
    feedHelpers.js?0b70911986e8100e198561e271389b1a69c85aae:49 New PriceFeed address: null
  • SilentCiceroSilentCicero Toronto, CAMember Posts: 159 ✭✭✭
    edited April 2015
    Looks like the account your using is not unlocked. This is common. Try switching the 'Feed.account' setting in client/lib/feedConfig.js to 1 (by default this is set to zero, meaning account 0: "0xadaa812c6e3a62e16b7a4a0751e2285e70aa577d" in your case).
  • cphicphi Member Posts: 46
    Yes, that worked on the private chain. Very nice work and thank you for taking the time to work out the problems I had.

    I'm very interested to see how this dapp will work on the public chain.

    Again, great work!
  • SilentCiceroSilentCicero Toronto, CAMember Posts: 159 ✭✭✭
    edited April 2015
    Great! This conversation needs to be had somewhere, there is gonna be that one guy who really needs to know everything we just talked about.

    Cheers, there is more to come.
  • cphicphi Member Posts: 46
    @SilentCicero Can't wait to see what's next. Let me know if you need me to test more of your creations.
Sign In or Register to comment.