Discover more of Etherscan's tools and services in one place.
Sponsored
Contract Source Code:
File 1 of 1 : MyWishEosRegister
pragma solidity ^0.4.25; contract MyWishEosRegister { event RegisterAdd(address indexed, string, bytes32); mapping(address => bytes32) private register; function put(string _eosAccountName) external { require(register[msg.sender] == 0, "address already bound"); bytes memory byteString = bytes(_eosAccountName); require(byteString.length == 12, "worng length"); for (uint i = 0; i < 12; i ++) { byte b = byteString[i]; require((b >= 48 && b <= 53) || (b >= 97 && b <= 122), "wrong symbol"); } bytes32 result; assembly { result := mload(add(byteString, 0x20)) } register[msg.sender] = result; emit RegisterAdd(msg.sender, _eosAccountName, result); } function get(address _addr) public view returns (string memory result) { bytes32 eos = register[_addr]; if (eos == 0) { return; } result = "............"; assembly { mstore(add(result, 0x20), eos) } } function get() public view returns (string memory) { return get(msg.sender); } }
Please enter a contract address above to load the contract details and source code.
Please DO NOT store any passwords or private keys here. A private note (up to 100 characters) can be saved and is useful for transaction tracking.
This website uses cookies to improve your experience. By continuing to use this website, you agree to its Terms and Privacy Policy.