Im using truffle and openzeppelin for issuing my ERC20 token. I already can add and buying the token, but still cannot transfer the token to another.
when i console.log the contract, it show me:
and i created front end for transfer
but i little bit confuse how to connected it to the contract to be able to transfering token to receiver address.
for now i just created function transfer like this:
transferToken() {
let web3 = store.getState().web3.web3Instance
const receiver = this.state.receipt_add
const token_value = this.state.token_amount
const token = contract(IYoToken)
token.setProvider(web3.currentProvider)
token.deployed().then(inst => {
inst.transfer({
to: receiver,
amount: token_value
})
})
}