【发布时间】:2019-05-09 18:27:11
【问题描述】:
在我的 Solidity 合约 ERC20 中,我有一个如下所示的函数:
function buy() payable public {
uint amount = msg.value / buyPrice; // calculates the amount
_transfer(address(this), msg.sender, amount); // makes the transfers
}
应该向谁支付购买代币的费用?代币的所有者是否已铸造?一个普通的“发送”以太币给合约的所有者就足够购买代币了?
提前感谢您的回答。
【问题讨论】:
标签: ethereum signature solidity