These are chat archives for ethereum/tutorials

1st
Mar 2018
sunitbelbase
@sunitbelbase
Mar 01 2018 02:12
how can I get benefit from smart contract / blockchain to collect fund for my project idea
Actually I have a project idea which require fund how it can help me to raise fund and not stealing of my idea?
Barfield36
@Barfield36
Mar 01 2018 04:36
How much is Samuel Barfield III Net Worth?
thinh185
@thinh185
Mar 01 2018 07:07
heelo

i have a question
i send transaction by code:
const contract = new web3.eth.Contract(JSON.parse(abi), '0x8e97ec7a54abf98ca7e008ff46a02f4bba0fdbc1', {gasPrice: '12345678', from: '0xc7c583f96abe8bc439eba964d7697dcaa5165204'});

// console.log(contract.methods);
contract.methods.balanceOf('0xc7c583f96abe8bc439eba964d7697dcaa5165204').call().then(console.log).catch(console.error);

contract.methods.totalSupply().call(function(err,res){

    if(!err){
        console.log(res);
    } else {
        console.log(err);
    }
});

// send token from contract address to anthoer address
// contract.methods.transfer('0xC8435dBCD3ebd0Cc78Fc4c12a115a4f0Cbdd8929', web3.utils.toWei('0.01')).send().then(console.log).catch(console.error);
var count = await (web3.eth.getTransactionCount('0xc7c583f96abe8bc439eba964d7697dcaa5165204'));
// count = 10;
console.log(count);
var transferAmount = 10000000000000000000;
var gasPriceGwei = 3;
var gasLimit = 3000000;

var bool = contract.methods.transfer("0xA17Dfa994be3abdF3a70Fb664BD47dF4b95C8d4e", transferAmount).send({from:'0xc7c583f96abe8bc439eba964d7697dcaa5165204'}).then(console.log);

var rawTransaction = {
    "from": "0xc7c583f96abe8bc439eba964d7697dcaa5165204",
    "nonce": "0x" + count.toString(16),
    "gasPrice": web3.utils.toHex(gasPriceGwei * 1e9),
    "gasLimit": web3.utils.toHex(gasLimit),
    "to": '0xA17Dfa994be3abdF3a70Fb664BD47dF4b95C8d4e',
    "value":"0x0",
    "data": contract.methods.transfer("0xA17Dfa994be3abdF3a70Fb664BD47dF4b95C8d4e", transferAmount).encodeABI(),
    "chainId": 0x3
};
// console.log(contract.methods.transfer("0xA17Dfa994be3abdF3a70Fb664BD47dF4b95C8d4e", transferAmount).encodeABI());
var privKey = new Buffer('47e4b0e74bec04eac124f8ca18e8c14b68de4fa845873f35ffaa5cc4a240516e', 'hex');
var tx = new Tx(rawTransaction);

tx.sign(privKey);
var serializedTx = tx.serialize();

web3.eth.sendSignedTransaction('0x' + serializedTx.toString('hex'), function(err, hash) {
    if (!err)
        console.log(hash);
    else
        console.log(err);
});

when i send, transction send token erc-20 token , but token i create is BKA , erc-20 (bka) token
why, have me

help me