у меня есть токен, созданный на смарт-контракте. адрес контракта: 0x1fa1a89f72c1011122e62261bb962b123ac40a76
я пытался передать токен несколько раз, и я получаю следующую ошибку. Предупреждение! Ошибка при выполнении контракта [Неверная инструкция]
https://etherscan.io/tx/0x7d7571080d6469a558847c075283d30ef197ca69ba8761242ec469a44521e248
исходный код смарт-контракта
contract FRPoint {
/* Public variables of the token */
string public standard = 'Token 0.1';
string public name;
string public symbol;
uint8 public decimals;
uint256 public initialSupply;
/* This creates an array with all balances */
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
/* Initializes contract with initial supply tokens to the creator of the contract */
function FRPoint() {
initialSupply = 90000000000000000000;
name ="FRP$";
decimals = 9;
symbol = "FRP";
balanceOf[msg.sender] = initialSupply; // Give the creator all initial tokens
uint256 totalSupply = initialSupply; // Update total supply
}
/* Send coins */
function transfer(address _to, uint256 _value) {
if (balanceOf[msg.sender] < _value) throw; // Check if the sender has enough
if (balanceOf[_to] + _value < balanceOf[_to]) throw; // Check for overflows
balanceOf[msg.sender] -= _value; // Subtract from the sender
balanceOf[_to] += _value; // Add the same to the recipient
}
/* This unnamed function is called whenever someone tries to send ether to it */
function () {
throw; // Prevents accidental sending of ether
}
}
Я потерял эфир в виде газа при совершении транзакции и можно ли его вернуть.
В этой и других недавних неудачных транзакциях вы пытаетесь вызвать метод approve()
, который не реализован в контракте. Вот почему это терпит неудачу.
Это не токен ERC20, поэтому вам нужно только позвонить transfer()
, как в этой успешной транзакции .
Ричард Хоррокс
легкие