js/etc/pure/pure.js
// This buys P3C from the crop, but with you as the referrer
This buys P3C from the crop, but with you as the referrer
This buys P3C from the crop but with you as the referrer
function sellFromCrop(amountToSell) {
    amount = web3.toWei(amountToSell)
    p3cContract.sell.sendTransaction(
        amount, 
        {
            from: web3.eth.accounts[0],
            gas: 123287,
            gasPrice: web3.toWei(1, 'gwei')
        },
        function (error, result) { 
            if (!error) {
                alertify.success(amountToSell + " Point Terjual. menunggu konfirmasi Blockchain .")
                console.log(result);
            } else {
                console.log(error);
            }
        }
    )
}
function sellFromCrop ( amountToSell ) { amount = web3 . toWei ( amountToSell ) p3cContract . sell . sendTransaction ( amount , { from : web3 . eth . accounts [ 0 ] , gas : 123287 , gasPrice : web3 . toWei ( 1 , 'gwei' ) } , function ( error , result ) { if ( ! error ) { alertify . success ( amountToSell + " Point Terjual. menunggu konfirmasi Blockchain ." ) console . log ( result ) ; } else { console . log ( error ) ; } } ) }
This buys P3C from the crop, but with you as the referrer
This buys P3C from the crop but with you as the referrer
// you are the referer //get callback from function which is your transaction key