Is it possible to create a token that each ethereum address can not exceed 100,000 token.

If the token amount exceed the 100,000, it will "overflow" and retrieve the transaction.

Thank you


I would try something like:

mapping(address => uint) balance;

function transfer(address to, uint tokens) public returns (bool success) {
    require(balance[msg.sender] >= tokens);    
    require(balance[to] + tokens <= 100000);
    balance[msg.sender] = balance[msg.sender]-tokens;
    balance[to] = balance[to]+tokens;
    return true;    


When a transfer occurs, you simply have to check that the receiver's balance doesn't exceed the amount you fixed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.