false
true
0
PulseChain
Blockchain
Blocks
Blocks
Uncles
Forked Blocks (Reorgs)
Transactions
Confirmed
Pending
Verified contracts
Tokens
All
PLS
APIs
GraphQL
RPC
Eth RPC
Apps
PulseChain Beacon Explorer
PulseX
PulseChain Bridge
Become a Validator
PulseChain
Mainnets
PulseChain Mainnet
Testnets
Testnet V4
/
Search
/
Search
Connection Lost
New Vyper Smart Contract Verification
Contract Address
The 0x address supplied on contract creation.
Contract Name
Must match the name specified in the code.
Compiler
v0.4.3+commit.bff19ea2
v0.4.3-rc1+commit.a35bfd5e
v0.4.2+commit.c216787f
v0.4.2-rc1+commit.11522b83
v0.4.1+commit.8a93dd27
v0.4.1-rc3+commit.1339177d
v0.4.1-rc2+commit.305813c9
v0.4.1-rc1+commit.4d693b72
v0.4.1-b4+commit.4507d2a6
v0.4.1-b3+commit.537313b0
v0.4.1-b2+commit.f249c936
v0.4.1-b1+commit.039d3692
v0.4.0+commit.e9db8d9f
v0.4.0-rc6+commit.33719560
v0.4.0-rc5+commit.98370f50
v0.4.0-rc4+commit.41a3e084
v0.4.0-rc3+commit.f2136550
v0.4.0-rc2+commit.6f09e296
v0.4.0-rc1+commit.44a593a0
v0.4.0-b6+commit.7485ceab
v0.4.0-b5+commit.a9ee6414
v0.4.0-b4+commit.541b2e75
v0.4.0-b1+commit.6fb750af
v0.3.10+commit.91361694
v0.3.10-rc5+commit.42817806
v0.3.10-rc4+commit.2bdbd846
v0.3.10-rc3+commit.3b310d52
v0.3.10-rc2+commit.0cb37e3e
v0.3.9+commit.66b96705
v0.3.8+commit.036f1536
v0.3.7+commit.6020b8bb
v0.3.6+commit.4a2124d0
v0.3.4+commit.f31f0ec4
v0.3.3+commit.48e326f0
v0.3.2+commit.3b6a4117
v0.3.1+commit.0463ea4c
v0.3.0+commit.8a23febb
v0.2.16+commit.59e1bdd9
v0.2.15+commit.6e7dba7a
v0.2.12+commit.2c6842cd
v0.2.11+commit.5db35ef4
v0.2.8+commit.069936fa
v0.2.7+commit.0b3f3b32
v0.2.6+commit.35467d57
v0.2.5+commit.a0c561cb
v0.2.4+commit.7949850c
v0.2.3+commit.006968f0
v0.2.2+commit.337c2efc
v0.2.1+commit.cac3d7d9
v0.2.0+commit.d2c0c87a
v0.1.0-beta.17+commit.0671b7bb
v0.1.0-beta.16+commit.5e4a94ad
Enter the Vyper Contract Code
# https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md from vyper.interfaces import ERC20 implements: ERC20 Transfer: event({_from: indexed(address), _to: indexed(address), _value: uint256}) Approval: event({_owner: indexed(address), _spender: indexed(address), _value: uint256}) name: public(string[64]) symbol: public(string[32]) decimals: public(uint256) # NOTE: By declaring `balanceOf` as public, vyper automatically generates a 'balanceOf()' getter # method to allow access to account balances. # The _KeyType will become a required parameter for the getter and it will return _ValueType. # See: https://vyper.readthedocs.io/en/v0.1.0-beta.8/types.html?highlight=getter#mappings balanceOf: public(map(address, uint256)) allowances: map(address, map(address, uint256)) total_supply: uint256 minter: address @public def __init__(_name: string[64], _symbol: string[32], _decimals: uint256, _supply: uint256): init_supply: uint256 = _supply * 10 ** _decimals self.name = _name self.symbol = _symbol self.decimals = _decimals self.balanceOf[msg.sender] = init_supply self.total_supply = init_supply self.minter = msg.sender log.Transfer(ZERO_ADDRESS, msg.sender, init_supply) @public def set_minter(_minter: address): assert msg.sender == self.minter self.minter = _minter @public @constant def totalSupply() -> uint256: """ @dev Total number of tokens in existence. """ return self.total_supply @public @constant def allowance(_owner : address, _spender : address) -> uint256: """ @dev Function to check the amount of tokens that an owner allowed to a spender. @param _owner The address which owns the funds. @param _spender The address which will spend the funds. @return An uint256 specifying the amount of tokens still available for the spender. """ return self.allowances[_owner][_spender] @public def transfer(_to : address, _value : uint256) -> bool: """ @dev Transfer token for a specified address @param _to The address to transfer to. @param _value The amount to be transferred. """ # NOTE: vyper does not allow underflows # so the following subtraction would revert on insufficient balance self.balanceOf[msg.sender] -= _value self.balanceOf[_to] += _value log.Transfer(msg.sender, _to, _value) return True @public def transferFrom(_from : address, _to : address, _value : uint256) -> bool: """ @dev Transfer tokens from one address to another. Note that while this function emits a Transfer event, this is not required as per the specification, and other compliant implementations may not emit the event. @param _from address The address which you want to send tokens from @param _to address The address which you want to transfer to @param _value uint256 the amount of tokens to be transferred """ # NOTE: vyper does not allow underflows # so the following subtraction would revert on insufficient balance self.balanceOf[_from] -= _value self.balanceOf[_to] += _value if msg.sender != self.minter: # minter is allowed to transfer anything # NOTE: vyper does not allow underflows # so the following subtraction would revert on insufficient allowance self.allowances[_from][msg.sender] -= _value log.Transfer(_from, _to, _value) return True @public def approve(_spender : address, _value : uint256) -> bool: """ @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 @param _spender The address which will spend the funds. @param _value The amount of tokens to be spent. """ assert _value == 0 or self.allowances[msg.sender][_spender] == 0 self.allowances[msg.sender][_spender] = _value log.Approval(msg.sender, _spender, _value) return True @public def mint(_to: address, _value: uint256): """ @dev Mint an amount of the token and assigns it to an account. This encapsulates the modification of balances such that the proper events are emitted. @param _to The account that will receive the created tokens. @param _value The amount that will be created. """ assert msg.sender == self.minter assert _to != ZERO_ADDRESS self.total_supply += _value self.balanceOf[_to] += _value log.Transfer(ZERO_ADDRESS, _to, _value) @private def _burn(_to: address, _value: uint256): """ @dev Internal function that burns an amount of the token of a given account. @param _to The account whose tokens will be burned. @param _value The amount that will be burned. """ assert _to != ZERO_ADDRESS self.total_supply -= _value self.balanceOf[_to] -= _value log.Transfer(_to, ZERO_ADDRESS, _value) @public def burn(_value: uint256): """ @dev Burn an amount of the token of msg.sender. @param _value The amount that will be burned. """ assert msg.sender == self.minter, "Only minter is allowed to burn" self._burn(msg.sender, _value) @public def burnFrom(_to: address, _value: uint256): """ @dev Burn an amount of the token from a given account. @param _to The account whose tokens will be burned. @param _value The amount that will be burned. """ assert msg.sender == self.minter, "Only minter is allowed to burn" self._burn(_to, _value)
ABI-encoded Constructor Arguments (if required by the contract)
0x000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001843757276652e666920634441492f63555344432f555344540000000000000000000000000000000000000000000000000000000000000000000000000000000f634441492b63555344432b555344540000000000000000000000000000000000
Add arguments in
ABI hex encoded form
. Constructor arguments are written right to left, and will be found at the end of the input created bytecode. They may also be
parsed here.
Loading...
Verify & publish
Cancel
Ok
Ok
Ok
No
Yes