web3-eth
web3-eth copied to clipboard
RuntimeError: Function transfer is not constant: transfer, requires to sign transaction
Hi, everyone
I am going to send transfer using ruby.
this is my code.
web3 = Web3::Eth::Rpc.new host: 'ropsten.infura.io',
port: 443,
connect_options: {
open_timeout: 20,
read_timeout: 140,
use_ssl: true,
rpc_path: '/xxxxxxxxxx'
}
ERC_ABI = '[{.....}]'
contractAddr = "0xFf............"
contract = web3.eth.contract(ERC_ABI).at(contractAddr)
data = contract.transfer.getData('0xg.......', 10000, {from: '0xc........'})
but i get some error. please help me. Best regards.