updated public to external for the functions

changed public to external for the functions
This commit is contained in:
Sreekesh V
2021-08-12 16:24:40 +02:00
committed by hrkrshnn
parent 23b16a1e20
commit 9b9e52e53e
5 changed files with 27 additions and 27 deletions
+4 -4
View File
@@ -39,14 +39,14 @@ and the sum of all balances is an invariant across the lifetime of the contract.
event Transfer(address from, address to, uint amount);
event Approval(address owner, address spender, uint amount);
function transfer(address to, uint amount) public returns (bool success) {
function transfer(address to, uint amount) external returns (bool success) {
balances.move(msg.sender, to, amount);
emit Transfer(msg.sender, to, amount);
return true;
}
function transferFrom(address from, address to, uint amount) public returns (bool success) {
function transferFrom(address from, address to, uint amount) external returns (bool success) {
require(allowed[from][msg.sender] >= amount);
allowed[from][msg.sender] -= amount;
balances.move(from, to, amount);
@@ -54,14 +54,14 @@ and the sum of all balances is an invariant across the lifetime of the contract.
return true;
}
function approve(address spender, uint tokens) public returns (bool success) {
function approve(address spender, uint tokens) external returns (bool success) {
require(allowed[msg.sender][spender] == 0, "");
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
return true;
}
function balanceOf(address tokenOwner) public view returns (uint balance) {
function balanceOf(address tokenOwner) external view returns (uint balance) {
return balances[tokenOwner];
}
}