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,這是與「 - 」在問題的符號,所以我認爲 –
請你爲函數中添加代碼也 –