I hereby claim:
- I am androlo on github.
- I am androlo (https://keybase.io/androlo) on keybase.
- I have a public key ASAWzYs7FDGMU6CcChAJw1v532h6XvB9LF_WEebcVAB3SAo
To claim this, I am signing this object:
| pragma solidity ^0.4.13; | |
| library InputChecker { | |
| function isAddressZero(address addr) constant internal returns (bool) { | |
| return addr == 0; | |
| } | |
| } | |
| contract CheckInput { |
I hereby claim:
To claim this, I am signing this object:
| contract AddressSet { | |
| function add(address addr) returns (bool) { | |
| assembly { | |
| let index := sload(addr) | |
| let added := not(index) // If offset index for 'addr' isn't 0, add to set. | |
| jumpi(tag_write, added) | |
| tag_end: | |
| mstore(0x0, added) | |
| return(0x0, 0x20) |
| contract AddressSet { | |
| // uint constant SIZE_ADDRESS = 0x10; | |
| // uint constant STORAGE_OFFSET = 0x11; | |
| function add(address addr) returns (bool added) { | |
| assembly { // [garbage, addr, added] | |
| swap1 | |
| dup1 | |
| sload // Load current index. |
| contract Errors { | |
| uint16 constant NO_ERROR = 0; | |
| uint16 constant ERROR = 1; | |
| uint16 constant RESOURCE_ERROR = 1000; | |
| uint16 constant RESOURCE_NOT_FOUND = 1001; | |
| uint16 constant RESOURCE_ALREADY_EXISTS = 1002; | |
| uint16 constant ACCESS_DENIED = 2000; | |
| uint16 constant PARAMETER_ERROR = 3000; | |
| uint16 constant INVALID_PARAM_VALUE = 3001; |
| [{"name":"CoinTest","interface":"[{\"constant\":true,\"inputs\":[],\"name\":\"proxyAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"myAddress\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"receiver\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"name\":\"\",\"type\":\"uint16\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"receiver\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"sendAsProxy\",\"outputs\":[{\"name\":\"\",\"type\":\"uint16\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"receiver\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mintAsProxy\",\"outputs\":[{\"name\":\"\",\"type\":\"uint16\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"receiver\",\"type\":\"address\"}, |
| contract SomeAddressMapper is AddressMapper { | |
| IAMap map; | |
| function addAddress(address addr) returns (bool had) { | |
| return _insert(map, addr, true); | |
| } | |
| function removeAddress(address addr) returns (bool removed) { | |
| return _remove(map, addr); |
| contract AddressMapper { | |
| struct IAMElement { | |
| uint keyIndex; | |
| bool value; | |
| } | |
| struct IAMap | |
| { | |
| mapping(address => IAMElement) data; |