Skip to content
This repository has been archived by the owner on Apr 20, 2021. It is now read-only.

Update syntax #84

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions contracts/erc20/ERC20.vy
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
Transfer: event({_from: indexed(address), _to: indexed(address), _value: uint256})
Approval: event({_owner: indexed(address), _spender: indexed(address), _value: uint256})

name: public(bytes[40])
symbol: public(bytes[5])
name: public(string[40])
symbol: public(string[5])
decimals: public(uint256)
balances: map(address, uint256)
allowances: map(address, map(address, uint256))
total_supply: uint256


@public
def __init__(_name: bytes[40], _symbol: bytes[5], _decimals: uint256, _supply: uint256):
def __init__(_name: string[40], _symbol: string[5], _decimals: uint256, _supply: uint256):
init_supply: uint256 = _supply * 10 ** _decimals
self.name = _name
self.symbol = _symbol
Expand Down
6 changes: 3 additions & 3 deletions contracts/erc20/ERC20MintableBurnable.vy
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
Transfer: event({_from: indexed(address), _to: indexed(address), _value: uint256})
Approval: event({_owner: indexed(address), _spender: indexed(address), _value: uint256})

name: public(bytes[40])
symbol: public(bytes[5])
name: public(string[40])
symbol: public(string[5])
decimals: public(uint256)
balances: map(address, uint256)
allowances: map(address, map(address, uint256))
Expand All @@ -14,7 +14,7 @@ minter: address


@public
def __init__(_name: bytes[40], _symbol: bytes[5], _decimals: uint256, _supply: uint256):
def __init__(_name: string[40], _symbol: string[5], _decimals: uint256, _supply: uint256):
init_supply: uint256 = _supply * 10 ** _decimals
self.name = _name
self.symbol = _symbol
Expand Down