diff --git a/contracts/mocks/ERC23TokenMock.sol b/contracts/mocks/ERC223TokenMock.sol similarity index 57% rename from contracts/mocks/ERC23TokenMock.sol rename to contracts/mocks/ERC223TokenMock.sol index d785a72d9..259faf2ab 100644 --- a/contracts/mocks/ERC23TokenMock.sol +++ b/contracts/mocks/ERC223TokenMock.sol @@ -4,20 +4,19 @@ pragma solidity ^0.4.18; import "../token/BasicToken.sol"; -contract ERC23ContractInterface { +contract ERC223ContractInterface { function tokenFallback(address _from, uint256 _value, bytes _data) external; } +contract ERC223TokenMock is BasicToken { -contract ERC23TokenMock is BasicToken { - - function ERC23TokenMock(address initialAccount, uint256 initialBalance) public { + function ERC223TokenMock(address initialAccount, uint256 initialBalance) public { balances[initialAccount] = initialBalance; totalSupply = initialBalance; } - // ERC23 compatible transfer function (except the name) - function transferERC23(address _to, uint256 _value, bytes _data) public + // ERC223 compatible transfer function (except the name) + function transferERC223(address _to, uint256 _value, bytes _data) public returns (bool success) { transfer(_to, _value); @@ -26,7 +25,7 @@ contract ERC23TokenMock is BasicToken { is_contract := not(iszero(extcodesize(_to))) } if (is_contract) { - ERC23ContractInterface receiver = ERC23ContractInterface(_to); + ERC223ContractInterface receiver = ERC223ContractInterface(_to); receiver.tokenFallback(msg.sender, _value, _data); } return true; diff --git a/contracts/ownership/HasNoTokens.sol b/contracts/ownership/HasNoTokens.sol index 9a4e7aabe..ee9531bb7 100644 --- a/contracts/ownership/HasNoTokens.sol +++ b/contracts/ownership/HasNoTokens.sol @@ -6,14 +6,14 @@ import "./CanReclaimToken.sol"; /** * @title Contracts that should not own Tokens * @author Remco Bloemen - * @dev This blocks incoming ERC23 tokens to prevent accidental loss of tokens. + * @dev This blocks incoming ERC223 tokens to prevent accidental loss of tokens. * Should tokens (any ERC20Basic compatible) end up in the contract, it allows the * owner to reclaim the tokens. */ contract HasNoTokens is CanReclaimToken { /** - * @dev Reject all ERC23 compatible tokens + * @dev Reject all ERC223 compatible tokens * @param from_ address The address that is transferring the tokens * @param value_ uint256 the amount of the specified token * @param data_ Bytes The data passed from the caller. diff --git a/test/ownership/HasNoTokens.test.js b/test/ownership/HasNoTokens.test.js index e6622a16d..ac3690fd3 100644 --- a/test/ownership/HasNoTokens.test.js +++ b/test/ownership/HasNoTokens.test.js @@ -2,7 +2,7 @@ import expectThrow from '../helpers/expectThrow'; const HasNoTokens = artifacts.require('../contracts/lifecycle/HasNoTokens.sol'); -const ERC23TokenMock = artifacts.require('mocks/ERC23TokenMock.sol'); +const ERC223TokenMock = artifacts.require('mocks/ERC223TokenMock.sol'); contract('HasNoTokens', function (accounts) { let hasNoTokens = null; @@ -11,7 +11,7 @@ contract('HasNoTokens', function (accounts) { beforeEach(async () => { // Create contract and token hasNoTokens = await HasNoTokens.new(); - token = await ERC23TokenMock.new(accounts[0], 100); + token = await ERC223TokenMock.new(accounts[0], 100); // Force token into contract await token.transfer(hasNoTokens.address, 10); @@ -19,8 +19,8 @@ contract('HasNoTokens', function (accounts) { assert.equal(startBalance, 10); }); - it('should not accept ERC23 tokens', async function () { - await expectThrow(token.transferERC23(hasNoTokens.address, 10, '')); + it('should not accept ERC223 tokens', async function () { + await expectThrow(token.transferERC223(hasNoTokens.address, 10, '')); }); it('should allow owner to reclaim tokens', async function () {