I have a function that sends eth to a function in a contract with web3:
await contract.methods.withdraw(i).send({
from: from
});
debug("withdraw in battle: "+i);
}
I would like to use a different token instead of ether. How can I pay with tokens? How can I do that? I see no token parameter in web3.