0
为什么下面不起作用?在计算和使用燃气时使用函数
uint transactionFee = (msg.value * 2)/100;
uint transactionReward = (msg.value * 2)/100;
uint receiverMoney = msg.value - limitTransactionCosts(transactionFee - transactionReward);
The contract won't allow this transaction to be executed
虽然这是工作:
uint transactionFee = (msg.value * 2)/100;
uint transactionReward = (msg.value * 2)/100;
transactionFee = limitTransactionCosts(transactionFee);
transactionReward = limitTransactionCosts(transactionReward);
uint receiverMoney = msg.value - transactionFee - transactionReward;
limitTransactionCosts是一个功能 – BananazZ
OK,这是与“ - ”在问题的符号,所以我认为 –
请你为函数中添加代码也 –