Last active
March 11, 2018 12:16
-
-
Save Gim6626/f8d71235ee3c3bf61ae42f6b80d265cb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let address = '0xaea16217c589bf736344fd62daa7bdbc428ca5d3'; | |
let abi = [{"constant":true,"inputs":[],"name":"client","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"contract_owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"ad_placed","type":"bool"},{"name":"ad_views","type":"uint256"}],"name":"updatePrice","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"total_price_in_szabo","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"szabo_per_placement","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"payForWork","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"szabo_per_view","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"state","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"blogger","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"price_in_szabo_per_placement","type":"uint256"},{"name":"price_in_szabo_per_view","type":"uint256"},{"name":"client_address","type":"address"},{"name":"blogger_address","type":"address"}],"payable":true,"stateMutability":"payable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[],"name":"ContractCreated","type":"event"},{"anonymous":false,"inputs":[],"name":"VideoPlacedAndPriceCalculated","type":"event"},{"anonymous":false,"inputs":[],"name":"NotEnoughEther","type":"event"},{"anonymous":false,"inputs":[],"name":"EtherSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"sender","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"OnDeposit","type":"event"}]; | |
let act4 = web3.eth.contract(abi).at(address); | |
act4.szabo_per_placement(web3.eth.accounts[0], (e, r) => {console.log(r)}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment