Feature Tip: Add private address tag to any address under My Name Tag !
More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0xc228224eb3eb553ff389ef624f917b044ee3835539e2c4b6503a028107438b9d | Start Exit With ... | (pending) | 2 days ago | IN | 0 ETH | (Pending) | |||
Start Exit With ... | 20718799 | 77 days ago | IN | 0 ETH | 0.00121289 | ||||
Start Exit With ... | 20718708 | 77 days ago | IN | 0 ETH | 0.00087246 | ||||
Start Exit With ... | 20718051 | 77 days ago | IN | 0 ETH | 0.00132956 | ||||
Start Exit With ... | 20717650 | 77 days ago | IN | 0 ETH | 0.00132956 | ||||
Start Exit With ... | 20669315 | 84 days ago | IN | 0 ETH | 0.00087601 | ||||
Start Exit With ... | 20629879 | 90 days ago | IN | 0 ETH | 0.00021466 | ||||
Start Exit With ... | 20613113 | 92 days ago | IN | 0 ETH | 0.00067089 | ||||
Start Exit With ... | 20613089 | 92 days ago | IN | 0 ETH | 0.00066318 | ||||
Start Exit With ... | 20613069 | 92 days ago | IN | 0 ETH | 0.00065634 | ||||
Start Exit With ... | 20611409 | 92 days ago | IN | 0 ETH | 0.00043736 | ||||
Start Exit With ... | 20611389 | 92 days ago | IN | 0 ETH | 0.00040929 | ||||
Start Exit With ... | 20611374 | 92 days ago | IN | 0 ETH | 0.00040832 | ||||
Start Exit With ... | 20610169 | 92 days ago | IN | 0 ETH | 0.00022766 | ||||
Start Exit With ... | 20610165 | 92 days ago | IN | 0 ETH | 0.00053624 | ||||
Start Exit With ... | 20610145 | 92 days ago | IN | 0 ETH | 0.00025084 | ||||
Start Exit With ... | 20607621 | 93 days ago | IN | 0 ETH | 0.00041391 | ||||
Start Exit With ... | 20607606 | 93 days ago | IN | 0 ETH | 0.00041456 | ||||
Start Exit With ... | 20607586 | 93 days ago | IN | 0 ETH | 0.00039976 | ||||
Start Exit With ... | 20605682 | 93 days ago | IN | 0 ETH | 0.00054319 | ||||
Start Exit With ... | 20605361 | 93 days ago | IN | 0 ETH | 0.00048512 | ||||
Start Exit With ... | 20605172 | 93 days ago | IN | 0 ETH | 0.00078372 | ||||
Start Exit With ... | 20605167 | 93 days ago | IN | 0 ETH | 0.00080326 | ||||
Start Exit With ... | 20603302 | 93 days ago | IN | 0 ETH | 0.00082033 | ||||
Start Exit With ... | 20603302 | 93 days ago | IN | 0 ETH | 0.00084008 |
Loading...
Loading
Contract Name:
ERC20PredicateBurnOnly
Compiler Version
v0.5.17+commit.d19bba13
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2021-08-11 */ // File: openzeppelin-solidity/contracts/math/SafeMath.sol pragma solidity ^0.5.2; /** * @title SafeMath * @dev Unsigned math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b); return c; } /** * @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; } /** * @dev Adds two unsigned integers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; } /** * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; } } // File: contracts/common/lib/BytesLib.sol pragma solidity ^0.5.2; library BytesLib { function concat(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bytes memory) { bytes memory tempBytes; assembly { // Get a location of some free memory and store it in tempBytes as // Solidity does for memory variables. tempBytes := mload(0x40) // Store the length of the first bytes array at the beginning of // the memory for tempBytes. let length := mload(_preBytes) mstore(tempBytes, length) // Maintain a memory counter for the current write location in the // temp bytes array by adding the 32 bytes for the array length to // the starting location. let mc := add(tempBytes, 0x20) // Stop copying when the memory counter reaches the length of the // first bytes array. let end := add(mc, length) for { // Initialize a copy counter to the start of the _preBytes data, // 32 bytes into its memory. let cc := add(_preBytes, 0x20) } lt(mc, end) { // Increase both counters by 32 bytes each iteration. mc := add(mc, 0x20) cc := add(cc, 0x20) } { // Write the _preBytes data into the tempBytes memory 32 bytes // at a time. mstore(mc, mload(cc)) } // Add the length of _postBytes to the current length of tempBytes // and store it as the new length in the first 32 bytes of the // tempBytes memory. length := mload(_postBytes) mstore(tempBytes, add(length, mload(tempBytes))) // Move the memory counter back from a multiple of 0x20 to the // actual end of the _preBytes data. mc := end // Stop copying when the memory counter reaches the new combined // length of the arrays. end := add(mc, length) for { let cc := add(_postBytes, 0x20) } lt(mc, end) { mc := add(mc, 0x20) cc := add(cc, 0x20) } { mstore(mc, mload(cc)) } // Update the free-memory pointer by padding our last write location // to 32 bytes: add 31 bytes to the end of tempBytes to move to the // next 32 byte block, then round down to the nearest multiple of // 32. If the sum of the length of the two arrays is zero then add // one before rounding down to leave a blank 32 bytes (the length block with 0). mstore( 0x40, and( add(add(end, iszero(add(length, mload(_preBytes)))), 31), not(31) // Round down to the nearest 32 bytes. ) ) } return tempBytes; } function slice(bytes memory _bytes, uint256 _start, uint256 _length) internal pure returns (bytes memory) { require(_bytes.length >= (_start + _length)); bytes memory tempBytes; assembly { switch iszero(_length) case 0 { // Get a location of some free memory and store it in tempBytes as // Solidity does for memory variables. tempBytes := mload(0x40) // The first word of the slice result is potentially a partial // word read from the original array. To read it, we calculate // the length of that partial word and start copying that many // bytes into the array. The first word we copy will start with // data we don't care about, but the last `lengthmod` bytes will // land at the beginning of the contents of the new array. When // we're done copying, we overwrite the full first word with // the actual length of the slice. let lengthmod := and(_length, 31) // The multiplication in the next line is necessary // because when slicing multiples of 32 bytes (lengthmod == 0) // the following copy loop was copying the origin's length // and then ending prematurely not copying everything it should. let mc := add( add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)) ) let end := add(mc, _length) for { // The multiplication in the next line has the same exact purpose // as the one above. let cc := add( add( add(_bytes, lengthmod), mul(0x20, iszero(lengthmod)) ), _start ) } lt(mc, end) { mc := add(mc, 0x20) cc := add(cc, 0x20) } { mstore(mc, mload(cc)) } mstore(tempBytes, _length) //update free-memory pointer //allocating the array padded to 32 bytes like the compiler does now mstore(0x40, and(add(mc, 31), not(31))) } //if we want a zero-length slice let's just return a zero-length array default { tempBytes := mload(0x40) mstore(0x40, add(tempBytes, 0x20)) } } return tempBytes; } // Pad a bytes array to 32 bytes function leftPad(bytes memory _bytes) internal pure returns (bytes memory) { // may underflow if bytes.length < 32. Hence using SafeMath.sub bytes memory newBytes = new bytes(SafeMath.sub(32, _bytes.length)); return concat(newBytes, _bytes); } function toBytes32(bytes memory b) internal pure returns (bytes32) { require(b.length >= 32, "Bytes array should atleast be 32 bytes"); bytes32 out; for (uint256 i = 0; i < 32; i++) { out |= bytes32(b[i] & 0xFF) >> (i * 8); } return out; } function toBytes4(bytes memory b) internal pure returns (bytes4 result) { assembly { result := mload(add(b, 32)) } } function fromBytes32(bytes32 x) internal pure returns (bytes memory) { bytes memory b = new bytes(32); for (uint256 i = 0; i < 32; i++) { b[i] = bytes1(uint8(uint256(x) / (2**(8 * (31 - i))))); } return b; } function fromUint(uint256 _num) internal pure returns (bytes memory _ret) { _ret = new bytes(32); assembly { mstore(add(_ret, 32), _num) } } function toUint(bytes memory _bytes, uint256 _start) internal pure returns (uint256) { require(_bytes.length >= (_start + 32)); uint256 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x20), _start)) } return tempUint; } function toAddress(bytes memory _bytes, uint256 _start) internal pure returns (address) { require(_bytes.length >= (_start + 20)); address tempAddress; assembly { tempAddress := div( mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000 ) } return tempAddress; } } // File: contracts/common/lib/Common.sol pragma solidity ^0.5.2; library Common { function getV(bytes memory v, uint16 chainId) public pure returns (uint8) { if (chainId > 0) { return uint8( BytesLib.toUint(BytesLib.leftPad(v), 0) - (chainId * 2) - 8 ); } else { return uint8(BytesLib.toUint(BytesLib.leftPad(v), 0)); } } //assemble the given address bytecode. If bytecode exists then the _addr is a contract. function isContract(address _addr) public view returns (bool) { uint256 length; assembly { //retrieve the size of the code on target address, this needs assembly length := extcodesize(_addr) } return (length > 0); } // convert bytes to uint8 function toUint8(bytes memory _arg) public pure returns (uint8) { return uint8(_arg[0]); } function toUint16(bytes memory _arg) public pure returns (uint16) { return (uint16(uint8(_arg[0])) << 8) | uint16(uint8(_arg[1])); } } // File: openzeppelin-solidity/contracts/math/Math.sol pragma solidity ^0.5.2; /** * @title Math * @dev Assorted math operations */ library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Calculates the average of two numbers. Since these are integers, * averages of an even and odd number cannot be represented, and will be * rounded down. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow, so we distribute return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2); } } // File: contracts/common/lib/RLPEncode.sol // Library for RLP encoding a list of bytes arrays. // Modeled after ethereumjs/rlp (https://github.com/ethereumjs/rlp) // [Very] modified version of Sam Mayo's library. pragma solidity ^0.5.2; library RLPEncode { // Encode an item (bytes memory) function encodeItem(bytes memory self) internal pure returns (bytes memory) { bytes memory encoded; if (self.length == 1 && uint8(self[0] & 0xFF) < 0x80) { encoded = new bytes(1); encoded = self; } else { encoded = BytesLib.concat(encodeLength(self.length, 128), self); } return encoded; } // Encode a list of items function encodeList(bytes[] memory self) internal pure returns (bytes memory) { bytes memory encoded; for (uint256 i = 0; i < self.length; i++) { encoded = BytesLib.concat(encoded, encodeItem(self[i])); } return BytesLib.concat(encodeLength(encoded.length, 192), encoded); } // Hack to encode nested lists. If you have a list as an item passed here, included // pass = true in that index. E.g. // [item, list, item] --> pass = [false, true, false] // function encodeListWithPasses(bytes[] memory self, bool[] pass) internal pure returns (bytes memory) { // bytes memory encoded; // for (uint i=0; i < self.length; i++) { // if (pass[i] == true) { // encoded = BytesLib.concat(encoded, self[i]); // } else { // encoded = BytesLib.concat(encoded, encodeItem(self[i])); // } // } // return BytesLib.concat(encodeLength(encoded.length, 192), encoded); // } // Generate the prefix for an item or the entire list based on RLP spec function encodeLength(uint256 L, uint256 offset) internal pure returns (bytes memory) { if (L < 56) { bytes memory prefix = new bytes(1); prefix[0] = bytes1(uint8(L + offset)); return prefix; } else { // lenLen is the length of the hex representation of the data length uint256 lenLen; uint256 i = 0x1; while (L / i != 0) { lenLen++; i *= 0x100; } bytes memory prefix0 = getLengthBytes(offset + 55 + lenLen); bytes memory prefix1 = getLengthBytes(L); return BytesLib.concat(prefix0, prefix1); } } function getLengthBytes(uint256 x) internal pure returns (bytes memory b) { // Figure out if we need 1 or two bytes to express the length. // 1 byte gets us to max 255 // 2 bytes gets us to max 65535 (no payloads will be larger than this) uint256 nBytes = 1; if (x > 255) { nBytes = 2; } b = new bytes(nBytes); // Encode the length and return it for (uint256 i = 0; i < nBytes; i++) { b[i] = bytes1(uint8(x / (2**(8 * (nBytes - 1 - i))))); } } } // File: solidity-rlp/contracts/RLPReader.sol /* * @author Hamdi Allam [email protected] * Please reach out with any questions or concerns */ pragma solidity ^0.5.0; library RLPReader { uint8 constant STRING_SHORT_START = 0x80; uint8 constant STRING_LONG_START = 0xb8; uint8 constant LIST_SHORT_START = 0xc0; uint8 constant LIST_LONG_START = 0xf8; uint8 constant WORD_SIZE = 32; struct RLPItem { uint len; uint memPtr; } struct Iterator { RLPItem item; // Item that's being iterated over. uint nextPtr; // Position of the next item in the list. } /* * @dev Returns the next element in the iteration. Reverts if it has not next element. * @param self The iterator. * @return The next element in the iteration. */ function next(Iterator memory self) internal pure returns (RLPItem memory) { require(hasNext(self)); uint ptr = self.nextPtr; uint itemLength = _itemLength(ptr); self.nextPtr = ptr + itemLength; return RLPItem(itemLength, ptr); } /* * @dev Returns true if the iteration has more elements. * @param self The iterator. * @return true if the iteration has more elements. */ function hasNext(Iterator memory self) internal pure returns (bool) { RLPItem memory item = self.item; return self.nextPtr < item.memPtr + item.len; } /* * @param item RLP encoded bytes */ function toRlpItem(bytes memory item) internal pure returns (RLPItem memory) { uint memPtr; assembly { memPtr := add(item, 0x20) } return RLPItem(item.length, memPtr); } /* * @dev Create an iterator. Reverts if item is not a list. * @param self The RLP item. * @return An 'Iterator' over the item. */ function iterator(RLPItem memory self) internal pure returns (Iterator memory) { require(isList(self)); uint ptr = self.memPtr + _payloadOffset(self.memPtr); return Iterator(self, ptr); } /* * @param item RLP encoded bytes */ function rlpLen(RLPItem memory item) internal pure returns (uint) { return item.len; } /* * @param item RLP encoded bytes */ function payloadLen(RLPItem memory item) internal pure returns (uint) { return item.len - _payloadOffset(item.memPtr); } /* * @param item RLP encoded list in bytes */ function toList(RLPItem memory item) internal pure returns (RLPItem[] memory) { require(isList(item)); uint items = numItems(item); RLPItem[] memory result = new RLPItem[](items); uint memPtr = item.memPtr + _payloadOffset(item.memPtr); uint dataLen; for (uint i = 0; i < items; i++) { dataLen = _itemLength(memPtr); result[i] = RLPItem(dataLen, memPtr); memPtr = memPtr + dataLen; } return result; } // @return indicator whether encoded payload is a list. negate this function call for isData. function isList(RLPItem memory item) internal pure returns (bool) { if (item.len == 0) return false; uint8 byte0; uint memPtr = item.memPtr; assembly { byte0 := byte(0, mload(memPtr)) } if (byte0 < LIST_SHORT_START) return false; return true; } /** RLPItem conversions into data types **/ // @returns raw rlp encoding in bytes function toRlpBytes(RLPItem memory item) internal pure returns (bytes memory) { bytes memory result = new bytes(item.len); if (result.length == 0) return result; uint ptr; assembly { ptr := add(0x20, result) } copy(item.memPtr, ptr, item.len); return result; } // any non-zero byte is considered true function toBoolean(RLPItem memory item) internal pure returns (bool) { require(item.len == 1); uint result; uint memPtr = item.memPtr; assembly { result := byte(0, mload(memPtr)) } return result == 0 ? false : true; } function toAddress(RLPItem memory item) internal pure returns (address) { // 1 byte for the length prefix require(item.len == 21); return address(toUint(item)); } function toUint(RLPItem memory item) internal pure returns (uint) { require(item.len > 0 && item.len <= 33); uint offset = _payloadOffset(item.memPtr); uint len = item.len - offset; uint result; uint memPtr = item.memPtr + offset; assembly { result := mload(memPtr) // shfit to the correct location if neccesary if lt(len, 32) { result := div(result, exp(256, sub(32, len))) } } return result; } // enforces 32 byte length function toUintStrict(RLPItem memory item) internal pure returns (uint) { // one byte prefix require(item.len == 33); uint result; uint memPtr = item.memPtr + 1; assembly { result := mload(memPtr) } return result; } function toBytes(RLPItem memory item) internal pure returns (bytes memory) { require(item.len > 0); uint offset = _payloadOffset(item.memPtr); uint len = item.len - offset; // data length bytes memory result = new bytes(len); uint destPtr; assembly { destPtr := add(0x20, result) } copy(item.memPtr + offset, destPtr, len); return result; } /* * Private Helpers */ // @return number of payload items inside an encoded list. function numItems(RLPItem memory item) private pure returns (uint) { if (item.len == 0) return 0; uint count = 0; uint currPtr = item.memPtr + _payloadOffset(item.memPtr); uint endPtr = item.memPtr + item.len; while (currPtr < endPtr) { currPtr = currPtr + _itemLength(currPtr); // skip over an item count++; } return count; } // @return entire rlp item byte length function _itemLength(uint memPtr) private pure returns (uint) { uint itemLen; uint byte0; assembly { byte0 := byte(0, mload(memPtr)) } if (byte0 < STRING_SHORT_START) itemLen = 1; else if (byte0 < STRING_LONG_START) itemLen = byte0 - STRING_SHORT_START + 1; else if (byte0 < LIST_SHORT_START) { assembly { let byteLen := sub(byte0, 0xb7) // # of bytes the actual length is memPtr := add(memPtr, 1) // skip over the first byte /* 32 byte word size */ let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to get the len itemLen := add(dataLen, add(byteLen, 1)) } } else if (byte0 < LIST_LONG_START) { itemLen = byte0 - LIST_SHORT_START + 1; } else { assembly { let byteLen := sub(byte0, 0xf7) memPtr := add(memPtr, 1) let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to the correct length itemLen := add(dataLen, add(byteLen, 1)) } } return itemLen; } // @return number of bytes until the data function _payloadOffset(uint memPtr) private pure returns (uint) { uint byte0; assembly { byte0 := byte(0, mload(memPtr)) } if (byte0 < STRING_SHORT_START) return 0; else if (byte0 < STRING_LONG_START || (byte0 >= LIST_SHORT_START && byte0 < LIST_LONG_START)) return 1; else if (byte0 < LIST_SHORT_START) // being explicit return byte0 - (STRING_LONG_START - 1) + 1; else return byte0 - (LIST_LONG_START - 1) + 1; } /* * @param src Pointer to source * @param dest Pointer to destination * @param len Amount of memory to copy from the source */ function copy(uint src, uint dest, uint len) private pure { if (len == 0) return; // copy as many word sizes as possible for (; len >= WORD_SIZE; len -= WORD_SIZE) { assembly { mstore(dest, mload(src)) } src += WORD_SIZE; dest += WORD_SIZE; } // left over bytes. Mask is used to remove unwanted bytes from the word uint mask = 256 ** (WORD_SIZE - len) - 1; assembly { let srcpart := and(mload(src), not(mask)) // zero out src let destpart := and(mload(dest), mask) // retrieve the bytes mstore(dest, or(destpart, srcpart)) } } } // File: contracts/common/lib/ExitPayloadReader.sol pragma solidity 0.5.17; library ExitPayloadReader { using RLPReader for bytes; using RLPReader for RLPReader.RLPItem; uint8 constant WORD_SIZE = 32; struct ExitPayload { RLPReader.RLPItem[] data; } struct Receipt { RLPReader.RLPItem[] data; bytes raw; uint256 logIndex; } struct Log { RLPReader.RLPItem data; RLPReader.RLPItem[] list; } struct LogTopics { RLPReader.RLPItem[] data; } function toExitPayload(bytes memory data) internal pure returns (ExitPayload memory) { RLPReader.RLPItem[] memory payloadData = data .toRlpItem() .toList(); return ExitPayload(payloadData); } function copy(uint src, uint dest, uint len) private pure { if (len == 0) return; // copy as many word sizes as possible for (; len >= WORD_SIZE; len -= WORD_SIZE) { assembly { mstore(dest, mload(src)) } src += WORD_SIZE; dest += WORD_SIZE; } // left over bytes. Mask is used to remove unwanted bytes from the word uint mask = 256 ** (WORD_SIZE - len) - 1; assembly { let srcpart := and(mload(src), not(mask)) // zero out src let destpart := and(mload(dest), mask) // retrieve the bytes mstore(dest, or(destpart, srcpart)) } } function getHeaderNumber(ExitPayload memory payload) internal pure returns(uint256) { return payload.data[0].toUint(); } function getBlockProof(ExitPayload memory payload) internal pure returns(bytes memory) { return payload.data[1].toBytes(); } function getBlockNumber(ExitPayload memory payload) internal pure returns(uint256) { return payload.data[2].toUint(); } function getBlockTime(ExitPayload memory payload) internal pure returns(uint256) { return payload.data[3].toUint(); } function getTxRoot(ExitPayload memory payload) internal pure returns(bytes32) { return bytes32(payload.data[4].toUint()); } function getReceiptRoot(ExitPayload memory payload) internal pure returns(bytes32) { return bytes32(payload.data[5].toUint()); } function getReceipt(ExitPayload memory payload) internal pure returns(Receipt memory receipt) { receipt.raw = payload.data[6].toBytes(); RLPReader.RLPItem memory receiptItem = receipt.raw.toRlpItem(); if (receiptItem.isList()) { // legacy tx receipt.data = receiptItem.toList(); } else { // pop first byte before parsting receipt bytes memory typedBytes = receipt.raw; bytes memory result = new bytes(typedBytes.length - 1); uint256 srcPtr; uint256 destPtr; assembly { srcPtr := add(33, typedBytes) destPtr := add(0x20, result) } copy(srcPtr, destPtr, result.length); receipt.data = result.toRlpItem().toList(); } receipt.logIndex = getReceiptLogIndex(payload); return receipt; } function getReceiptProof(ExitPayload memory payload) internal pure returns(bytes memory) { return payload.data[7].toBytes(); } function getBranchMaskAsBytes(ExitPayload memory payload) internal pure returns(bytes memory) { return payload.data[8].toBytes(); } function getBranchMaskAsUint(ExitPayload memory payload) internal pure returns(uint256) { return payload.data[8].toUint(); } function getReceiptLogIndex(ExitPayload memory payload) internal pure returns(uint256) { return payload.data[9].toUint(); } function getTx(ExitPayload memory payload) internal pure returns(bytes memory) { return payload.data[10].toBytes(); } function getTxProof(ExitPayload memory payload) internal pure returns(bytes memory) { return payload.data[11].toBytes(); } // Receipt methods function toBytes(Receipt memory receipt) internal pure returns(bytes memory) { return receipt.raw; } function getLog(Receipt memory receipt) internal pure returns(Log memory) { RLPReader.RLPItem memory logData = receipt.data[3].toList()[receipt.logIndex]; return Log(logData, logData.toList()); } // Log methods function getEmitter(Log memory log) internal pure returns(address) { return RLPReader.toAddress(log.list[0]); } function getTopics(Log memory log) internal pure returns(LogTopics memory) { return LogTopics(log.list[1].toList()); } function getData(Log memory log) internal pure returns(bytes memory) { return log.list[2].toBytes(); } function toRlpBytes(Log memory log) internal pure returns(bytes memory) { return log.data.toRlpBytes(); } // LogTopics methods function getField(LogTopics memory topics, uint256 index) internal pure returns(RLPReader.RLPItem memory) { return topics.data[index]; } } // File: contracts/root/withdrawManager/IWithdrawManager.sol pragma solidity ^0.5.2; contract IWithdrawManager { function createExitQueue(address token) external; function verifyInclusion( bytes calldata data, uint8 offset, bool verifyTxInclusion ) external view returns (uint256 age); function addExitToQueue( address exitor, address childToken, address rootToken, uint256 exitAmountOrTokenId, bytes32 txHash, bool isRegularExit, uint256 priority ) external; function addInput( uint256 exitId, uint256 age, address utxoOwner, address token ) external; function challengeExit( uint256 exitId, uint256 inputId, bytes calldata challengeData, address adjudicatorPredicate ) external; } // File: contracts/root/depositManager/IDepositManager.sol pragma solidity ^0.5.2; interface IDepositManager { function depositEther() external payable; function transferAssets( address _token, address _user, uint256 _amountOrNFTId ) external; function depositERC20(address _token, uint256 _amount) external; function depositERC721(address _token, uint256 _tokenId) external; } // File: openzeppelin-solidity/contracts/ownership/Ownable.sol pragma solidity ^0.5.2; /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { _owner = msg.sender; emit OwnershipTransferred(address(0), _owner); } /** * @return the address of the owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(isOwner()); _; } /** * @return true if `msg.sender` is the owner of the contract. */ function isOwner() public view returns (bool) { return msg.sender == _owner; } /** * @dev Allows the current owner to relinquish control of the contract. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. * @notice Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } /** * @dev Transfers control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function _transferOwnership(address newOwner) internal { require(newOwner != address(0)); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } // File: contracts/common/misc/ProxyStorage.sol pragma solidity ^0.5.2; contract ProxyStorage is Ownable { address internal proxyTo; } // File: contracts/common/governance/IGovernance.sol pragma solidity ^0.5.2; interface IGovernance { function update(address target, bytes calldata data) external; } // File: contracts/common/governance/Governable.sol pragma solidity ^0.5.2; contract Governable { IGovernance public governance; constructor(address _governance) public { governance = IGovernance(_governance); } modifier onlyGovernance() { _assertGovernance(); _; } function _assertGovernance() private view { require( msg.sender == address(governance), "Only governance contract is authorized" ); } } // File: contracts/common/Registry.sol pragma solidity ^0.5.2; contract Registry is Governable { // @todo hardcode constants bytes32 private constant WETH_TOKEN = keccak256("wethToken"); bytes32 private constant DEPOSIT_MANAGER = keccak256("depositManager"); bytes32 private constant STAKE_MANAGER = keccak256("stakeManager"); bytes32 private constant VALIDATOR_SHARE = keccak256("validatorShare"); bytes32 private constant WITHDRAW_MANAGER = keccak256("withdrawManager"); bytes32 private constant CHILD_CHAIN = keccak256("childChain"); bytes32 private constant STATE_SENDER = keccak256("stateSender"); bytes32 private constant SLASHING_MANAGER = keccak256("slashingManager"); address public erc20Predicate; address public erc721Predicate; mapping(bytes32 => address) public contractMap; mapping(address => address) public rootToChildToken; mapping(address => address) public childToRootToken; mapping(address => bool) public proofValidatorContracts; mapping(address => bool) public isERC721; enum Type {Invalid, ERC20, ERC721, Custom} struct Predicate { Type _type; } mapping(address => Predicate) public predicates; event TokenMapped(address indexed rootToken, address indexed childToken); event ProofValidatorAdded(address indexed validator, address indexed from); event ProofValidatorRemoved(address indexed validator, address indexed from); event PredicateAdded(address indexed predicate, address indexed from); event PredicateRemoved(address indexed predicate, address indexed from); event ContractMapUpdated(bytes32 indexed key, address indexed previousContract, address indexed newContract); constructor(address _governance) public Governable(_governance) {} function updateContractMap(bytes32 _key, address _address) external onlyGovernance { emit ContractMapUpdated(_key, contractMap[_key], _address); contractMap[_key] = _address; } /** * @dev Map root token to child token * @param _rootToken Token address on the root chain * @param _childToken Token address on the child chain * @param _isERC721 Is the token being mapped ERC721 */ function mapToken( address _rootToken, address _childToken, bool _isERC721 ) external onlyGovernance { require(_rootToken != address(0x0) && _childToken != address(0x0), "INVALID_TOKEN_ADDRESS"); rootToChildToken[_rootToken] = _childToken; childToRootToken[_childToken] = _rootToken; isERC721[_rootToken] = _isERC721; IWithdrawManager(contractMap[WITHDRAW_MANAGER]).createExitQueue(_rootToken); emit TokenMapped(_rootToken, _childToken); } function addErc20Predicate(address predicate) public onlyGovernance { require(predicate != address(0x0), "Can not add null address as predicate"); erc20Predicate = predicate; addPredicate(predicate, Type.ERC20); } function addErc721Predicate(address predicate) public onlyGovernance { erc721Predicate = predicate; addPredicate(predicate, Type.ERC721); } function addPredicate(address predicate, Type _type) public onlyGovernance { require(predicates[predicate]._type == Type.Invalid, "Predicate already added"); predicates[predicate]._type = _type; emit PredicateAdded(predicate, msg.sender); } function removePredicate(address predicate) public onlyGovernance { require(predicates[predicate]._type != Type.Invalid, "Predicate does not exist"); delete predicates[predicate]; emit PredicateRemoved(predicate, msg.sender); } function getValidatorShareAddress() public view returns (address) { return contractMap[VALIDATOR_SHARE]; } function getWethTokenAddress() public view returns (address) { return contractMap[WETH_TOKEN]; } function getDepositManagerAddress() public view returns (address) { return contractMap[DEPOSIT_MANAGER]; } function getStakeManagerAddress() public view returns (address) { return contractMap[STAKE_MANAGER]; } function getSlashingManagerAddress() public view returns (address) { return contractMap[SLASHING_MANAGER]; } function getWithdrawManagerAddress() public view returns (address) { return contractMap[WITHDRAW_MANAGER]; } function getChildChainAndStateSender() public view returns (address, address) { return (contractMap[CHILD_CHAIN], contractMap[STATE_SENDER]); } function isTokenMapped(address _token) public view returns (bool) { return rootToChildToken[_token] != address(0x0); } function isTokenMappedAndIsErc721(address _token) public view returns (bool) { require(isTokenMapped(_token), "TOKEN_NOT_MAPPED"); return isERC721[_token]; } function isTokenMappedAndGetPredicate(address _token) public view returns (address) { if (isTokenMappedAndIsErc721(_token)) { return erc721Predicate; } return erc20Predicate; } function isChildTokenErc721(address childToken) public view returns (bool) { address rootToken = childToRootToken[childToken]; require(rootToken != address(0x0), "Child token is not mapped"); return isERC721[rootToken]; } } // File: contracts/common/mixin/ChainIdMixin.sol pragma solidity ^0.5.2; contract ChainIdMixin { bytes constant public networkId = hex"3A99"; uint256 constant public CHAINID = 15001; } // File: contracts/root/RootChainStorage.sol pragma solidity ^0.5.2; contract RootChainHeader { event NewHeaderBlock( address indexed proposer, uint256 indexed headerBlockId, uint256 indexed reward, uint256 start, uint256 end, bytes32 root ); // housekeeping event event ResetHeaderBlock(address indexed proposer, uint256 indexed headerBlockId); struct HeaderBlock { bytes32 root; uint256 start; uint256 end; uint256 createdAt; address proposer; } } contract RootChainStorage is ProxyStorage, RootChainHeader, ChainIdMixin { bytes32 public heimdallId; uint8 public constant VOTE_TYPE = 2; uint16 internal constant MAX_DEPOSITS = 10000; uint256 public _nextHeaderBlock = MAX_DEPOSITS; uint256 internal _blockDepositId = 1; mapping(uint256 => HeaderBlock) public headerBlocks; Registry internal registry; } // File: contracts/staking/stakeManager/IStakeManager.sol pragma solidity 0.5.17; contract IStakeManager { // validator replacement function startAuction( uint256 validatorId, uint256 amount, bool acceptDelegation, bytes calldata signerPubkey ) external; function confirmAuctionBid(uint256 validatorId, uint256 heimdallFee) external; function transferFunds( uint256 validatorId, uint256 amount, address delegator ) external returns (bool); function delegationDeposit( uint256 validatorId, uint256 amount, address delegator ) external returns (bool); function unstake(uint256 validatorId) external; function totalStakedFor(address addr) external view returns (uint256); function stakeFor( address user, uint256 amount, uint256 heimdallFee, bool acceptDelegation, bytes memory signerPubkey ) public; function checkSignatures( uint256 blockInterval, bytes32 voteHash, bytes32 stateRoot, address proposer, uint[3][] calldata sigs ) external returns (uint256); function updateValidatorState(uint256 validatorId, int256 amount) public; function ownerOf(uint256 tokenId) public view returns (address); function slash(bytes calldata slashingInfoList) external returns (uint256); function validatorStake(uint256 validatorId) public view returns (uint256); function epoch() public view returns (uint256); function getRegistry() public view returns (address); function withdrawalDelay() public view returns (uint256); function delegatedAmount(uint256 validatorId) public view returns(uint256); function decreaseValidatorDelegatedAmount(uint256 validatorId, uint256 amount) public; function withdrawDelegatorsReward(uint256 validatorId) public returns(uint256); function delegatorsReward(uint256 validatorId) public view returns(uint256); function dethroneAndStake( address auctionUser, uint256 heimdallFee, uint256 validatorId, uint256 auctionAmount, bool acceptDelegation, bytes calldata signerPubkey ) external; } // File: contracts/root/IRootChain.sol pragma solidity ^0.5.2; interface IRootChain { function slash() external; function submitHeaderBlock(bytes calldata data, bytes calldata sigs) external; function submitCheckpoint(bytes calldata data, uint[3][] calldata sigs) external; function getLastChildBlock() external view returns (uint256); function currentHeaderBlock() external view returns (uint256); } // File: contracts/root/RootChain.sol pragma solidity ^0.5.2; contract RootChain is RootChainStorage, IRootChain { using SafeMath for uint256; using RLPReader for bytes; using RLPReader for RLPReader.RLPItem; modifier onlyDepositManager() { require(msg.sender == registry.getDepositManagerAddress(), "UNAUTHORIZED_DEPOSIT_MANAGER_ONLY"); _; } function submitHeaderBlock(bytes calldata data, bytes calldata sigs) external { revert(); } function submitCheckpoint(bytes calldata data, uint[3][] calldata sigs) external { (address proposer, uint256 start, uint256 end, bytes32 rootHash, bytes32 accountHash, uint256 _borChainID) = abi .decode(data, (address, uint256, uint256, bytes32, bytes32, uint256)); require(CHAINID == _borChainID, "Invalid bor chain id"); require(_buildHeaderBlock(proposer, start, end, rootHash), "INCORRECT_HEADER_DATA"); // check if it is better to keep it in local storage instead IStakeManager stakeManager = IStakeManager(registry.getStakeManagerAddress()); uint256 _reward = stakeManager.checkSignatures( end.sub(start).add(1), /** prefix 01 to data 01 represents positive vote on data and 00 is negative vote malicious validator can try to send 2/3 on negative vote so 01 is appended */ keccak256(abi.encodePacked(bytes(hex"01"), data)), accountHash, proposer, sigs ); require(_reward != 0, "Invalid checkpoint"); emit NewHeaderBlock(proposer, _nextHeaderBlock, _reward, start, end, rootHash); _nextHeaderBlock = _nextHeaderBlock.add(MAX_DEPOSITS); _blockDepositId = 1; } function updateDepositId(uint256 numDeposits) external onlyDepositManager returns (uint256 depositId) { depositId = currentHeaderBlock().add(_blockDepositId); // deposit ids will be (_blockDepositId, _blockDepositId + 1, .... _blockDepositId + numDeposits - 1) _blockDepositId = _blockDepositId.add(numDeposits); require( // Since _blockDepositId is initialized to 1; only (MAX_DEPOSITS - 1) deposits per header block are allowed _blockDepositId <= MAX_DEPOSITS, "TOO_MANY_DEPOSITS" ); } function getLastChildBlock() external view returns (uint256) { return headerBlocks[currentHeaderBlock()].end; } function slash() external { //TODO: future implementation } function currentHeaderBlock() public view returns (uint256) { return _nextHeaderBlock.sub(MAX_DEPOSITS); } function _buildHeaderBlock( address proposer, uint256 start, uint256 end, bytes32 rootHash ) private returns (bool) { uint256 nextChildBlock; /* The ID of the 1st header block is MAX_DEPOSITS. if _nextHeaderBlock == MAX_DEPOSITS, then the first header block is yet to be submitted, hence nextChildBlock = 0 */ if (_nextHeaderBlock > MAX_DEPOSITS) { nextChildBlock = headerBlocks[currentHeaderBlock()].end + 1; } if (nextChildBlock != start) { return false; } HeaderBlock memory headerBlock = HeaderBlock({ root: rootHash, start: nextChildBlock, end: end, createdAt: now, proposer: proposer }); headerBlocks[_nextHeaderBlock] = headerBlock; return true; } // Housekeeping function. @todo remove later function setNextHeaderBlock(uint256 _value) public onlyOwner { require(_value % MAX_DEPOSITS == 0, "Invalid value"); for (uint256 i = _value; i < _nextHeaderBlock; i += MAX_DEPOSITS) { delete headerBlocks[i]; } _nextHeaderBlock = _value; _blockDepositId = 1; emit ResetHeaderBlock(msg.sender, _nextHeaderBlock); } // Housekeeping function. @todo remove later function setHeimdallId(string memory _heimdallId) public onlyOwner { heimdallId = keccak256(abi.encodePacked(_heimdallId)); } } // File: openzeppelin-solidity/contracts/introspection/IERC165.sol pragma solidity ^0.5.2; /** * @title IERC165 * @dev https://eips.ethereum.org/EIPS/eip-165 */ interface IERC165 { /** * @notice Query if a contract implements an interface * @param interfaceId The interface identifier, as specified in ERC-165 * @dev Interface identification is specified in ERC-165. This function * uses less than 30,000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); } // File: openzeppelin-solidity/contracts/token/ERC721/IERC721.sol pragma solidity ^0.5.2; /** * @title ERC721 Non-Fungible Token Standard basic interface * @dev see https://eips.ethereum.org/EIPS/eip-721 */ contract IERC721 is IERC165 { event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); function balanceOf(address owner) public view returns (uint256 balance); function ownerOf(uint256 tokenId) public view returns (address owner); function approve(address to, uint256 tokenId) public; function getApproved(uint256 tokenId) public view returns (address operator); function setApprovalForAll(address operator, bool _approved) public; function isApprovedForAll(address owner, address operator) public view returns (bool); function transferFrom(address from, address to, uint256 tokenId) public; function safeTransferFrom(address from, address to, uint256 tokenId) public; function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public; } // File: openzeppelin-solidity/contracts/token/ERC721/IERC721Receiver.sol pragma solidity ^0.5.2; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ contract IERC721Receiver { /** * @notice Handle the receipt of an NFT * @dev The ERC721 smart contract calls this function on the recipient * after a `safeTransfer`. This function MUST return the function selector, * otherwise the caller will revert the transaction. The selector to be * returned can be obtained as `this.onERC721Received.selector`. This * function MAY throw to revert and reject the transfer. * Note: the ERC721 contract address is always the message sender. * @param operator The address which called `safeTransferFrom` function * @param from The address which previously owned the token * @param tokenId The NFT identifier which is being transferred * @param data Additional data with no specified format * @return bytes4 `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` */ function onERC721Received(address operator, address from, uint256 tokenId, bytes memory data) public returns (bytes4); } // File: openzeppelin-solidity/contracts/utils/Address.sol pragma solidity ^0.5.2; /** * Utility library of inline functions on addresses */ library Address { /** * Returns whether the target address is a contract * @dev This function will return false if invoked during the constructor of a contract, * as the code is not actually created until after the constructor finishes. * @param account address of the account to check * @return whether the target address is a contract */ function isContract(address account) internal view returns (bool) { uint256 size; // XXX Currently there is no better way to check if there is a contract in an address // than to check the size of the code at that address. // See https://ethereum.stackexchange.com/a/14016/36603 // for more details about how this works. // TODO Check this again before the Serenity release, because all addresses will be // contracts then. // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } } // File: openzeppelin-solidity/contracts/drafts/Counters.sol pragma solidity ^0.5.2; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids * * Include with `using Counters for Counters.Counter;` * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the SafeMath * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never * directly accessed. */ library Counters { using SafeMath for uint256; struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { counter._value += 1; } function decrement(Counter storage counter) internal { counter._value = counter._value.sub(1); } } // File: openzeppelin-solidity/contracts/introspection/ERC165.sol pragma solidity ^0.5.2; /** * @title ERC165 * @author Matt Condon (@shrugs) * @dev Implements ERC165 using a lookup table. */ contract ERC165 is IERC165 { bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7; /* * 0x01ffc9a7 === * bytes4(keccak256('supportsInterface(bytes4)')) */ /** * @dev a mapping of interface id to whether or not it's supported */ mapping(bytes4 => bool) private _supportedInterfaces; /** * @dev A contract implementing SupportsInterfaceWithLookup * implement ERC165 itself */ constructor () internal { _registerInterface(_INTERFACE_ID_ERC165); } /** * @dev implement supportsInterface(bytes4) using a lookup table */ function supportsInterface(bytes4 interfaceId) external view returns (bool) { return _supportedInterfaces[interfaceId]; } /** * @dev internal method for registering an interface */ function _registerInterface(bytes4 interfaceId) internal { require(interfaceId != 0xffffffff); _supportedInterfaces[interfaceId] = true; } } // File: openzeppelin-solidity/contracts/token/ERC721/ERC721.sol pragma solidity ^0.5.2; /** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */ contract ERC721 is ERC165, IERC721 { using SafeMath for uint256; using Address for address; using Counters for Counters.Counter; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` bytes4 private constant _ERC721_RECEIVED = 0x150b7a02; // Mapping from token ID to owner mapping (uint256 => address) private _tokenOwner; // Mapping from token ID to approved address mapping (uint256 => address) private _tokenApprovals; // Mapping from owner to number of owned token mapping (address => Counters.Counter) private _ownedTokensCount; // Mapping from owner to operator approvals mapping (address => mapping (address => bool)) private _operatorApprovals; bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd; /* * 0x80ac58cd === * bytes4(keccak256('balanceOf(address)')) ^ * bytes4(keccak256('ownerOf(uint256)')) ^ * bytes4(keccak256('approve(address,uint256)')) ^ * bytes4(keccak256('getApproved(uint256)')) ^ * bytes4(keccak256('setApprovalForAll(address,bool)')) ^ * bytes4(keccak256('isApprovedForAll(address,address)')) ^ * bytes4(keccak256('transferFrom(address,address,uint256)')) ^ * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) ^ * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) */ constructor () public { // register the supported interfaces to conform to ERC721 via ERC165 _registerInterface(_INTERFACE_ID_ERC721); } /** * @dev Gets the balance of the specified address * @param owner address to query the balance of * @return uint256 representing the amount owned by the passed address */ function balanceOf(address owner) public view returns (uint256) { require(owner != address(0)); return _ownedTokensCount[owner].current(); } /** * @dev Gets the owner of the specified token ID * @param tokenId uint256 ID of the token to query the owner of * @return address currently marked as the owner of the given token ID */ function ownerOf(uint256 tokenId) public view returns (address) { address owner = _tokenOwner[tokenId]; require(owner != address(0)); return owner; } /** * @dev Approves another address to transfer the given token ID * The zero address indicates there is no approved address. * There can only be one approved address per token at a given time. * Can only be called by the token owner or an approved operator. * @param to address to be approved for the given token ID * @param tokenId uint256 ID of the token to be approved */ function approve(address to, uint256 tokenId) public { address owner = ownerOf(tokenId); require(to != owner); require(msg.sender == owner || isApprovedForAll(owner, msg.sender)); _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev Gets the approved address for a token ID, or zero if no address set * Reverts if the token ID does not exist. * @param tokenId uint256 ID of the token to query the approval of * @return address currently approved for the given token ID */ function getApproved(uint256 tokenId) public view returns (address) { require(_exists(tokenId)); return _tokenApprovals[tokenId]; } /** * @dev Sets or unsets the approval of a given operator * An operator is allowed to transfer all tokens of the sender on their behalf * @param to operator address to set the approval * @param approved representing the status of the approval to be set */ function setApprovalForAll(address to, bool approved) public { require(to != msg.sender); _operatorApprovals[msg.sender][to] = approved; emit ApprovalForAll(msg.sender, to, approved); } /** * @dev Tells whether an operator is approved by a given owner * @param owner owner address which you want to query the approval of * @param operator operator address which you want to query the approval of * @return bool whether the given operator is approved by the given owner */ function isApprovedForAll(address owner, address operator) public view returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev Transfers the ownership of a given token ID to another address * Usage of this method is discouraged, use `safeTransferFrom` whenever possible * Requires the msg.sender to be the owner, approved, or operator * @param from current owner of the token * @param to address to receive the ownership of the given token ID * @param tokenId uint256 ID of the token to be transferred */ function transferFrom(address from, address to, uint256 tokenId) public { require(_isApprovedOrOwner(msg.sender, tokenId)); _transferFrom(from, to, tokenId); } /** * @dev Safely transfers the ownership of a given token ID to another address * If the target address is a contract, it must implement `onERC721Received`, * which is called upon a safe transfer, and return the magic value * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise, * the transfer is reverted. * Requires the msg.sender to be the owner, approved, or operator * @param from current owner of the token * @param to address to receive the ownership of the given token ID * @param tokenId uint256 ID of the token to be transferred */ function safeTransferFrom(address from, address to, uint256 tokenId) public { safeTransferFrom(from, to, tokenId, ""); } /** * @dev Safely transfers the ownership of a given token ID to another address * If the target address is a contract, it must implement `onERC721Received`, * which is called upon a safe transfer, and return the magic value * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise, * the transfer is reverted. * Requires the msg.sender to be the owner, approved, or operator * @param from current owner of the token * @param to address to receive the ownership of the given token ID * @param tokenId uint256 ID of the token to be transferred * @param _data bytes data to send along with a safe transfer check */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public { transferFrom(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data)); } /** * @dev Returns whether the specified token exists * @param tokenId uint256 ID of the token to query the existence of * @return bool whether the token exists */ function _exists(uint256 tokenId) internal view returns (bool) { address owner = _tokenOwner[tokenId]; return owner != address(0); } /** * @dev Returns whether the given spender can transfer a given token ID * @param spender address of the spender to query * @param tokenId uint256 ID of the token to be transferred * @return bool whether the msg.sender is approved for the given token ID, * is an operator of the owner, or is the owner of the token */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) { address owner = ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Internal function to mint a new token * Reverts if the given token ID already exists * @param to The address that will own the minted token * @param tokenId uint256 ID of the token to be minted */ function _mint(address to, uint256 tokenId) internal { require(to != address(0)); require(!_exists(tokenId)); _tokenOwner[tokenId] = to; _ownedTokensCount[to].increment(); emit Transfer(address(0), to, tokenId); } /** * @dev Internal function to burn a specific token * Reverts if the token does not exist * Deprecated, use _burn(uint256) instead. * @param owner owner of the token to burn * @param tokenId uint256 ID of the token being burned */ function _burn(address owner, uint256 tokenId) internal { require(ownerOf(tokenId) == owner); _clearApproval(tokenId); _ownedTokensCount[owner].decrement(); _tokenOwner[tokenId] = address(0); emit Transfer(owner, address(0), tokenId); } /** * @dev Internal function to burn a specific token * Reverts if the token does not exist * @param tokenId uint256 ID of the token being burned */ function _burn(uint256 tokenId) internal { _burn(ownerOf(tokenId), tokenId); } /** * @dev Internal function to transfer ownership of a given token ID to another address. * As opposed to transferFrom, this imposes no restrictions on msg.sender. * @param from current owner of the token * @param to address to receive the ownership of the given token ID * @param tokenId uint256 ID of the token to be transferred */ function _transferFrom(address from, address to, uint256 tokenId) internal { require(ownerOf(tokenId) == from); require(to != address(0)); _clearApproval(tokenId); _ownedTokensCount[from].decrement(); _ownedTokensCount[to].increment(); _tokenOwner[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Internal function to invoke `onERC721Received` on a target address * The call is not executed if the target address is not a contract * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data) internal returns (bool) { if (!to.isContract()) { return true; } bytes4 retval = IERC721Receiver(to).onERC721Received(msg.sender, from, tokenId, _data); return (retval == _ERC721_RECEIVED); } /** * @dev Private function to clear current approval of a given token ID * @param tokenId uint256 ID of the token to be transferred */ function _clearApproval(uint256 tokenId) private { if (_tokenApprovals[tokenId] != address(0)) { _tokenApprovals[tokenId] = address(0); } } } // File: contracts/root/withdrawManager/ExitNFT.sol pragma solidity ^0.5.2; contract ExitNFT is ERC721 { Registry internal registry; modifier onlyWithdrawManager() { require( msg.sender == registry.getWithdrawManagerAddress(), "UNAUTHORIZED_WITHDRAW_MANAGER_ONLY" ); _; } constructor(address _registry) public { registry = Registry(_registry); } function mint(address _owner, uint256 _tokenId) external onlyWithdrawManager { _mint(_owner, _tokenId); } function burn(uint256 _tokenId) external onlyWithdrawManager { _burn(_tokenId); } function exists(uint256 tokenId) public view returns (bool) { return _exists(tokenId); } } // File: contracts/root/withdrawManager/WithdrawManagerStorage.sol pragma solidity ^0.5.2; contract ExitsDataStructure { struct Input { address utxoOwner; address predicate; address token; } struct PlasmaExit { uint256 receiptAmountOrNFTId; bytes32 txHash; address owner; address token; bool isRegularExit; address predicate; // Mapping from age of input to Input mapping(uint256 => Input) inputs; } } contract WithdrawManagerHeader is ExitsDataStructure { event Withdraw(uint256 indexed exitId, address indexed user, address indexed token, uint256 amount); event ExitStarted( address indexed exitor, uint256 indexed exitId, address indexed token, uint256 amount, bool isRegularExit ); event ExitUpdated(uint256 indexed exitId, uint256 indexed age, address signer); event ExitPeriodUpdate(uint256 indexed oldExitPeriod, uint256 indexed newExitPeriod); event ExitCancelled(uint256 indexed exitId); } contract WithdrawManagerStorage is ProxyStorage, WithdrawManagerHeader { // 0.5 week = 7 * 86400 / 2 = 302400 uint256 public HALF_EXIT_PERIOD = 302400; // Bonded exits collaterized at 0.1 ETH uint256 internal constant BOND_AMOUNT = 10**17; Registry internal registry; RootChain internal rootChain; mapping(uint128 => bool) isKnownExit; mapping(uint256 => PlasmaExit) public exits; // mapping with token => (owner => exitId) keccak(token+owner) keccak(token+owner+tokenId) mapping(bytes32 => uint256) public ownerExits; mapping(address => address) public exitsQueues; ExitNFT public exitNft; // ERC721, ERC20 and Weth transfers require 155000, 100000, 52000 gas respectively // Processing each exit in a while loop iteration requires ~52000 gas (@todo check if this changed) // uint32 constant internal ITERATION_GAS = 52000; // So putting an upper limit of 155000 + 52000 + leeway uint32 public ON_FINALIZE_GAS_LIMIT = 300000; uint256 public exitWindow; } // File: contracts/root/predicates/IPredicate.sol pragma solidity ^0.5.2; interface IPredicate { /** * @notice Verify the deprecation of a state update * @param exit ABI encoded PlasmaExit data * @param inputUtxo ABI encoded Input UTXO data * @param challengeData RLP encoded data of the challenge reference tx that encodes the following fields * headerNumber Header block number of which the reference tx was a part of * blockProof Proof that the block header (in the child chain) is a leaf in the submitted merkle root * blockNumber Block number of which the reference tx is a part of * blockTime Reference tx block time * blocktxRoot Transactions root of block * blockReceiptsRoot Receipts root of block * receipt Receipt of the reference transaction * receiptProof Merkle proof of the reference receipt * branchMask Merkle proof branchMask for the receipt * logIndex Log Index to read from the receipt * tx Challenge transaction * txProof Merkle proof of the challenge tx * @return Whether or not the state is deprecated */ function verifyDeprecation( bytes calldata exit, bytes calldata inputUtxo, bytes calldata challengeData ) external returns (bool); function interpretStateUpdate(bytes calldata state) external view returns (bytes memory); function onFinalizeExit(bytes calldata data) external; } contract PredicateUtils is ExitsDataStructure, ChainIdMixin { using RLPReader for RLPReader.RLPItem; // Bonded exits collaterized at 0.1 ETH uint256 private constant BOND_AMOUNT = 10**17; IWithdrawManager internal withdrawManager; IDepositManager internal depositManager; modifier onlyWithdrawManager() { require( msg.sender == address(withdrawManager), "ONLY_WITHDRAW_MANAGER" ); _; } modifier isBondProvided() { require(msg.value == BOND_AMOUNT, "Invalid Bond amount"); _; } function onFinalizeExit(bytes calldata data) external onlyWithdrawManager { (, address token, address exitor, uint256 tokenId) = decodeExitForProcessExit( data ); depositManager.transferAssets(token, exitor, tokenId); } function sendBond() internal { address(uint160(address(withdrawManager))).transfer(BOND_AMOUNT); } function getAddressFromTx(RLPReader.RLPItem[] memory txList) internal pure returns (address signer, bytes32 txHash) { bytes[] memory rawTx = new bytes[](9); for (uint8 i = 0; i <= 5; i++) { rawTx[i] = txList[i].toBytes(); } rawTx[6] = networkId; rawTx[7] = hex""; // [7] and [8] have something to do with v, r, s values rawTx[8] = hex""; txHash = keccak256(RLPEncode.encodeList(rawTx)); signer = ecrecover( txHash, Common.getV(txList[6].toBytes(), Common.toUint16(networkId)), bytes32(txList[7].toUint()), bytes32(txList[8].toUint()) ); } function decodeExit(bytes memory data) internal pure returns (PlasmaExit memory) { (address owner, address token, uint256 amountOrTokenId, bytes32 txHash, bool isRegularExit) = abi .decode(data, (address, address, uint256, bytes32, bool)); return PlasmaExit( amountOrTokenId, txHash, owner, token, isRegularExit, address(0) /* predicate value is not required */ ); } function decodeExitForProcessExit(bytes memory data) internal pure returns (uint256 exitId, address token, address exitor, uint256 tokenId) { (exitId, token, exitor, tokenId) = abi.decode( data, (uint256, address, address, uint256) ); } function decodeInputUtxo(bytes memory data) internal pure returns (uint256 age, address signer, address predicate, address token) { (age, signer, predicate, token) = abi.decode( data, (uint256, address, address, address) ); } } contract IErcPredicate is IPredicate, PredicateUtils { enum ExitType {Invalid, OutgoingTransfer, IncomingTransfer, Burnt} struct ExitTxData { uint256 amountOrToken; bytes32 txHash; address childToken; address signer; ExitType exitType; } struct ReferenceTxData { uint256 closingBalance; uint256 age; address childToken; address rootToken; } uint256 internal constant MAX_LOGS = 10; constructor(address _withdrawManager, address _depositManager) public { withdrawManager = IWithdrawManager(_withdrawManager); depositManager = IDepositManager(_depositManager); } } // File: contracts/root/predicates/ERC20PredicateBurnOnly.sol pragma solidity ^0.5.2; contract ERC20PredicateBurnOnly is IErcPredicate { using RLPReader for bytes; using RLPReader for RLPReader.RLPItem; using SafeMath for uint256; using ExitPayloadReader for bytes; using ExitPayloadReader for ExitPayloadReader.ExitPayload; using ExitPayloadReader for ExitPayloadReader.Receipt; using ExitPayloadReader for ExitPayloadReader.Log; using ExitPayloadReader for ExitPayloadReader.LogTopics; // keccak256('Withdraw(address,address,uint256,uint256,uint256)') bytes32 constant WITHDRAW_EVENT_SIG = 0xebff2602b3f468259e1e99f613fed6691f3a6526effe6ef3e768ba7ae7a36c4f; constructor( address _withdrawManager, address _depositManager ) public IErcPredicate(_withdrawManager, _depositManager) { } function startExitWithBurntTokens(bytes calldata data) external { ExitPayloadReader.ExitPayload memory payload = data.toExitPayload(); ExitPayloadReader.Receipt memory receipt = payload.getReceipt(); uint256 logIndex = payload.getReceiptLogIndex(); require(logIndex < MAX_LOGS, "Supporting a max of 10 logs"); uint256 age = withdrawManager.verifyInclusion( data, 0, /* offset */ false /* verifyTxInclusion */ ); ExitPayloadReader.Log memory log = receipt.getLog(); // "address" (contract address that emitted the log) field in the receipt address childToken = log.getEmitter(); ExitPayloadReader.LogTopics memory topics = log.getTopics(); // now, inputItems[i] refers to i-th (0-based) topic in the topics array // event Withdraw(address indexed token, address indexed from, uint256 amountOrTokenId, uint256 input1, uint256 output1) require( bytes32(topics.getField(0).toUint()) == WITHDRAW_EVENT_SIG, "Not a withdraw event signature" ); require( msg.sender == address(topics.getField(2).toUint()), // from "Withdrawer and burn exit tx do not match" ); address rootToken = address(topics.getField(1).toUint()); uint256 exitAmount = BytesLib.toUint(log.getData(), 0); // amountOrTokenId withdrawManager.addExitToQueue( msg.sender, childToken, rootToken, exitAmount, bytes32(0x0), true, /* isRegularExit */ age << 1 ); } function verifyDeprecation( bytes calldata exit, bytes calldata inputUtxo, bytes calldata challengeData ) external returns (bool) {} function interpretStateUpdate(bytes calldata state) external view returns (bytes memory) {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_withdrawManager","type":"address"},{"internalType":"address","name":"_depositManager","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"constant":true,"inputs":[],"name":"CHAINID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes","name":"state","type":"bytes"}],"name":"interpretStateUpdate","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"networkId","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onFinalizeExit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"startExitWithBurntTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes","name":"exit","type":"bytes"},{"internalType":"bytes","name":"inputUtxo","type":"bytes"},{"internalType":"bytes","name":"challengeData","type":"bytes"}],"name":"verifyDeprecation","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50604051610fba380380610fba8339818101604052604081101561003357600080fd5b508051602090910151600080546001600160a01b039384166001600160a01b03199182161790915560018054939092169216919091179055610f408061007a6000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c80637bd94e03146100675780637c5264b4146100d757806382e3464c146101455780639025e64c14610228578063cc79f97b14610230578063ec58410c1461024a575b600080fd5b6100d56004803603602081101561007d57600080fd5b810190602081018135600160201b81111561009757600080fd5b8201836020820111156100a957600080fd5b803590602001918460018302840111600160201b831117156100ca57600080fd5b50909250905061036c565b005b6100d5600480360360208110156100ed57600080fd5b810190602081018135600160201b81111561010757600080fd5b82018360208201111561011957600080fd5b803590602001918460018302840111600160201b8311171561013a57600080fd5b50909250905061048a565b6101b36004803603602081101561015b57600080fd5b810190602081018135600160201b81111561017557600080fd5b82018360208201111561018757600080fd5b803590602001918460018302840111600160201b831117156101a857600080fd5b5090925090506107ef565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101ed5781810151838201526020016101d5565b50505050905090810190601f16801561021a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101b36107f7565b610238610815565b60408051918252519081900360200190f35b6103586004803603606081101561026057600080fd5b810190602081018135600160201b81111561027a57600080fd5b82018360208201111561028c57600080fd5b803590602001918460018302840111600160201b831117156102ad57600080fd5b919390929091602081019035600160201b8111156102ca57600080fd5b8201836020820111156102dc57600080fd5b803590602001918460018302840111600160201b831117156102fd57600080fd5b919390929091602081019035600160201b81111561031a57600080fd5b82018360208201111561032c57600080fd5b803590602001918460018302840111600160201b8311171561034d57600080fd5b50909250905061081b565b604080519115158252519081900360200190f35b6000546001600160a01b031633146103c3576040805162461bcd60e51b815260206004820152601560248201527427a7262cafaba4aa24222920abafa6a0a720a3a2a960591b604482015290519081900360640190fd5b600080600061040785858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061082792505050565b600154604080516349f4cc1760e01b81526001600160a01b03808716600483015280861660248301526044820185905291519599509397509195501692506349f4cc1791606480830192600092919082900301818387803b15801561046b57600080fd5b505af115801561047f573d6000803e3d6000fd5b505050505050505050565b610492610e75565b6104d183838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061086492505050565b90506104db610e88565b6104e482610896565b905060006104f183610978565b9050600a8110610548576040805162461bcd60e51b815260206004820152601b60248201527f537570706f7274696e672061206d6178206f66203130206c6f67730000000000604482015290519081900360640190fd5b6000805460405163ad1d806960e01b81526024810183905260448101839052606060048201908152606482018890526001600160a01b039092169163ad1d80699189918991869182918190608401868680828437600081840152601f19601f8201169050808301925050509550505050505060206040518083038186803b1580156105d257600080fd5b505afa1580156105e6573d6000803e3d6000fd5b505050506040513d60208110156105fc57600080fd5b50519050610608610ea9565b610611846109a1565b9050600061061e82610a0e565b9050610628610e75565b61063183610a31565b90507febff2602b3f468259e1e99f613fed6691f3a6526effe6ef3e768ba7ae7a36c4f61066d61066883600063ffffffff610a6016565b610a86565b146106bf576040805162461bcd60e51b815260206004820152601e60248201527f4e6f742061207769746864726177206576656e74207369676e61747572650000604482015290519081900360640190fd5b6106d361066882600263ffffffff610a6016565b6001600160a01b0316336001600160a01b0316146107225760405162461bcd60e51b8152600401808060200182810382526028815260200180610ee46028913960400191505060405180910390fd5b600061073861066883600163ffffffff610a6016565b9050600061074f61074886610ae6565b6000610afc565b600080546040805163d931a86960e01b81523360048201526001600160a01b03898116602483015287811660448301526064820186905260848201859052600160a483018190528c901b60c4830152915194955091169263d931a8699260e48084019391929182900301818387803b1580156107ca57600080fd5b505af11580156107de573d6000803e3d6000fd5b505050505050505050505050505050565b606092915050565b604051806040016040528060028152602001613a9960f01b81525081565b613a9981565b60009695505050505050565b60008060008084806020019051608081101561084257600080fd5b5080516020820151604083015160609093015191989097509195509350915050565b61086c610e75565b606061087f61087a84610b18565b610b3d565b60408051602081019091529081529150505b919050565b61089e610e88565b6108bf82600001516006815181106108b257fe5b6020026020010151610c0e565b60208201526108cc610ec9565b6108d98260200151610b18565b90506108e481610c7e565b156108f9576108f281610b3d565b8252610964565b606082602001519050606060018251036040519080825280601f01601f191660200182016040528015610933576020820181803883390190505b50905060008083602101915082602001905061095182828551610cb8565b61095d61087a84610b18565b8652505050505b61096d83610978565b604083015250919050565b600061099b826000015160098151811061098e57fe5b6020026020010151610a86565b92915050565b6109a9610ea9565b6109b1610ec9565b6109d283600001516003815181106109c557fe5b6020026020010151610b3d565b8360400151815181106109e157fe5b602002602001015190506040518060400160405280828152602001610a0583610b3d565b90529392505050565b600061099b8260200151600081518110610a2457fe5b6020026020010151610d03565b610a39610e75565b6040518060200160405280610a5884602001516001815181106109c557fe5b905292915050565b610a68610ec9565b8251805183908110610a7657fe5b6020026020010151905092915050565b805160009015801590610a9b57508151602110155b610aa457600080fd5b6000610ab38360200151610d1d565b83516020808601518301805193945091849003929190831015610add57826020036101000a820491505b50949350505050565b606061099b82602001516002815181106108b257fe5b60008160200183511015610b0f57600080fd5b50016020015190565b610b20610ec9565b506040805180820190915281518152602082810190820152919050565b6060610b4882610c7e565b610b5157600080fd5b6000610b5c83610d80565b9050606081604051908082528060200260200182016040528015610b9a57816020015b610b87610ec9565b815260200190600190039081610b7f5790505b5090506000610bac8560200151610d1d565b60208601510190506000805b84811015610c0357610bc983610ddc565b9150604051806040016040528083815260200184815250848281518110610bec57fe5b602090810291909101015291810191600101610bb8565b509195945050505050565b8051606090610c1c57600080fd5b6000610c2b8360200151610d1d565b83516040805191839003808352601f19601f8201168301602001909152919250606090828015610c62576020820181803883390190505b5090506000816020019050610add848760200151018285610cb8565b8051600090610c8f57506000610891565b6020820151805160001a9060c0821015610cae57600092505050610891565b5060019392505050565b80610cc257610cfe565b5b60208110610ce2578251825260209283019290910190601f1901610cc3565b8251825160208390036101000a60001901801990921691161782525b505050565b8051600090601514610d1457600080fd5b61099b82610a86565b8051600090811a6080811015610d37576000915050610891565b60b8811080610d52575060c08110801590610d52575060f881105b15610d61576001915050610891565b60c0811015610d755760b519019050610891565b60f519019050610891565b8051600090610d9157506000610891565b60008090506000610da58460200151610d1d565b602085015185519181019250015b80821015610dd357610dc482610ddc565b60019093019290910190610db3565b50909392505050565b80516000908190811a6080811015610df75760019150610e6e565b60b8811015610e0c57607e1981019150610e6e565b60c0811015610e395760b78103600185019450806020036101000a85510460018201810193505050610e6e565b60f8811015610e4e5760be1981019150610e6e565b60f78103600185019450806020036101000a855104600182018101935050505b5092915050565b6040518060200160405280606081525090565b60405180606001604052806060815260200160608152602001600081525090565b6040518060400160405280610ebc610ec9565b8152602001606081525090565b60405180604001604052806000815260200160008152509056fe5769746864726177657220616e64206275726e206578697420747820646f206e6f74206d61746368a265627a7a7231582052ca81bee8d095d1ddda984ef8073000dd4b63b671db62be51faa49be39813c064736f6c634300051100320000000000000000000000002a88696e0ffa76baa1338f2c74497cc013495922000000000000000000000000401f6c983ea34274ec46f84d70b31c151321188b
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100625760003560e01c80637bd94e03146100675780637c5264b4146100d757806382e3464c146101455780639025e64c14610228578063cc79f97b14610230578063ec58410c1461024a575b600080fd5b6100d56004803603602081101561007d57600080fd5b810190602081018135600160201b81111561009757600080fd5b8201836020820111156100a957600080fd5b803590602001918460018302840111600160201b831117156100ca57600080fd5b50909250905061036c565b005b6100d5600480360360208110156100ed57600080fd5b810190602081018135600160201b81111561010757600080fd5b82018360208201111561011957600080fd5b803590602001918460018302840111600160201b8311171561013a57600080fd5b50909250905061048a565b6101b36004803603602081101561015b57600080fd5b810190602081018135600160201b81111561017557600080fd5b82018360208201111561018757600080fd5b803590602001918460018302840111600160201b831117156101a857600080fd5b5090925090506107ef565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101ed5781810151838201526020016101d5565b50505050905090810190601f16801561021a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101b36107f7565b610238610815565b60408051918252519081900360200190f35b6103586004803603606081101561026057600080fd5b810190602081018135600160201b81111561027a57600080fd5b82018360208201111561028c57600080fd5b803590602001918460018302840111600160201b831117156102ad57600080fd5b919390929091602081019035600160201b8111156102ca57600080fd5b8201836020820111156102dc57600080fd5b803590602001918460018302840111600160201b831117156102fd57600080fd5b919390929091602081019035600160201b81111561031a57600080fd5b82018360208201111561032c57600080fd5b803590602001918460018302840111600160201b8311171561034d57600080fd5b50909250905061081b565b604080519115158252519081900360200190f35b6000546001600160a01b031633146103c3576040805162461bcd60e51b815260206004820152601560248201527427a7262cafaba4aa24222920abafa6a0a720a3a2a960591b604482015290519081900360640190fd5b600080600061040785858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061082792505050565b600154604080516349f4cc1760e01b81526001600160a01b03808716600483015280861660248301526044820185905291519599509397509195501692506349f4cc1791606480830192600092919082900301818387803b15801561046b57600080fd5b505af115801561047f573d6000803e3d6000fd5b505050505050505050565b610492610e75565b6104d183838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061086492505050565b90506104db610e88565b6104e482610896565b905060006104f183610978565b9050600a8110610548576040805162461bcd60e51b815260206004820152601b60248201527f537570706f7274696e672061206d6178206f66203130206c6f67730000000000604482015290519081900360640190fd5b6000805460405163ad1d806960e01b81526024810183905260448101839052606060048201908152606482018890526001600160a01b039092169163ad1d80699189918991869182918190608401868680828437600081840152601f19601f8201169050808301925050509550505050505060206040518083038186803b1580156105d257600080fd5b505afa1580156105e6573d6000803e3d6000fd5b505050506040513d60208110156105fc57600080fd5b50519050610608610ea9565b610611846109a1565b9050600061061e82610a0e565b9050610628610e75565b61063183610a31565b90507febff2602b3f468259e1e99f613fed6691f3a6526effe6ef3e768ba7ae7a36c4f61066d61066883600063ffffffff610a6016565b610a86565b146106bf576040805162461bcd60e51b815260206004820152601e60248201527f4e6f742061207769746864726177206576656e74207369676e61747572650000604482015290519081900360640190fd5b6106d361066882600263ffffffff610a6016565b6001600160a01b0316336001600160a01b0316146107225760405162461bcd60e51b8152600401808060200182810382526028815260200180610ee46028913960400191505060405180910390fd5b600061073861066883600163ffffffff610a6016565b9050600061074f61074886610ae6565b6000610afc565b600080546040805163d931a86960e01b81523360048201526001600160a01b03898116602483015287811660448301526064820186905260848201859052600160a483018190528c901b60c4830152915194955091169263d931a8699260e48084019391929182900301818387803b1580156107ca57600080fd5b505af11580156107de573d6000803e3d6000fd5b505050505050505050505050505050565b606092915050565b604051806040016040528060028152602001613a9960f01b81525081565b613a9981565b60009695505050505050565b60008060008084806020019051608081101561084257600080fd5b5080516020820151604083015160609093015191989097509195509350915050565b61086c610e75565b606061087f61087a84610b18565b610b3d565b60408051602081019091529081529150505b919050565b61089e610e88565b6108bf82600001516006815181106108b257fe5b6020026020010151610c0e565b60208201526108cc610ec9565b6108d98260200151610b18565b90506108e481610c7e565b156108f9576108f281610b3d565b8252610964565b606082602001519050606060018251036040519080825280601f01601f191660200182016040528015610933576020820181803883390190505b50905060008083602101915082602001905061095182828551610cb8565b61095d61087a84610b18565b8652505050505b61096d83610978565b604083015250919050565b600061099b826000015160098151811061098e57fe5b6020026020010151610a86565b92915050565b6109a9610ea9565b6109b1610ec9565b6109d283600001516003815181106109c557fe5b6020026020010151610b3d565b8360400151815181106109e157fe5b602002602001015190506040518060400160405280828152602001610a0583610b3d565b90529392505050565b600061099b8260200151600081518110610a2457fe5b6020026020010151610d03565b610a39610e75565b6040518060200160405280610a5884602001516001815181106109c557fe5b905292915050565b610a68610ec9565b8251805183908110610a7657fe5b6020026020010151905092915050565b805160009015801590610a9b57508151602110155b610aa457600080fd5b6000610ab38360200151610d1d565b83516020808601518301805193945091849003929190831015610add57826020036101000a820491505b50949350505050565b606061099b82602001516002815181106108b257fe5b60008160200183511015610b0f57600080fd5b50016020015190565b610b20610ec9565b506040805180820190915281518152602082810190820152919050565b6060610b4882610c7e565b610b5157600080fd5b6000610b5c83610d80565b9050606081604051908082528060200260200182016040528015610b9a57816020015b610b87610ec9565b815260200190600190039081610b7f5790505b5090506000610bac8560200151610d1d565b60208601510190506000805b84811015610c0357610bc983610ddc565b9150604051806040016040528083815260200184815250848281518110610bec57fe5b602090810291909101015291810191600101610bb8565b509195945050505050565b8051606090610c1c57600080fd5b6000610c2b8360200151610d1d565b83516040805191839003808352601f19601f8201168301602001909152919250606090828015610c62576020820181803883390190505b5090506000816020019050610add848760200151018285610cb8565b8051600090610c8f57506000610891565b6020820151805160001a9060c0821015610cae57600092505050610891565b5060019392505050565b80610cc257610cfe565b5b60208110610ce2578251825260209283019290910190601f1901610cc3565b8251825160208390036101000a60001901801990921691161782525b505050565b8051600090601514610d1457600080fd5b61099b82610a86565b8051600090811a6080811015610d37576000915050610891565b60b8811080610d52575060c08110801590610d52575060f881105b15610d61576001915050610891565b60c0811015610d755760b519019050610891565b60f519019050610891565b8051600090610d9157506000610891565b60008090506000610da58460200151610d1d565b602085015185519181019250015b80821015610dd357610dc482610ddc565b60019093019290910190610db3565b50909392505050565b80516000908190811a6080811015610df75760019150610e6e565b60b8811015610e0c57607e1981019150610e6e565b60c0811015610e395760b78103600185019450806020036101000a85510460018201810193505050610e6e565b60f8811015610e4e5760be1981019150610e6e565b60f78103600185019450806020036101000a855104600182018101935050505b5092915050565b6040518060200160405280606081525090565b60405180606001604052806060815260200160608152602001600081525090565b6040518060400160405280610ebc610ec9565b8152602001606081525090565b60405180604001604052806000815260200160008152509056fe5769746864726177657220616e64206275726e206578697420747820646f206e6f74206d61746368a265627a7a7231582052ca81bee8d095d1ddda984ef8073000dd4b63b671db62be51faa49be39813c064736f6c63430005110032
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000002a88696e0ffa76baa1338f2c74497cc013495922000000000000000000000000401f6c983ea34274ec46f84d70b31c151321188b
-----Decoded View---------------
Arg [0] : _withdrawManager (address): 0x2A88696e0fFA76bAA1338F2C74497cC013495922
Arg [1] : _depositManager (address): 0x401F6c983eA34274ec46f84D70b31C151321188b
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000002a88696e0ffa76baa1338f2c74497cc013495922
Arg [1] : 000000000000000000000000401f6c983ea34274ec46f84d70b31c151321188b
Deployed Bytecode Sourcemap
75160:2783:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;75160:2783:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;72001:264;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;72001:264:0;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;72001:264:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;72001:264:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;-1:-1;72001:264:0;;-1:-1:-1;72001:264:0;-1:-1:-1;72001:264:0;:::i;:::-;;75955:1687;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;75955:1687:0;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;75955:1687:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;75955:1687:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;-1:-1;75955:1687:0;;-1:-1:-1;75955:1687:0;-1:-1:-1;75955:1687:0;:::i;77822:118::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;77822:118:0;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;77822:118:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;77822:118:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;-1:-1;77822:118:0;;-1:-1:-1;77822:118:0;-1:-1:-1;77822:118:0;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;77822:118:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;40127:43;;;:::i;40175:39::-;;;:::i;:::-;;;;;;;;;;;;;;;;77650:164;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;77650:164:0;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;77650:164:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;77650:164:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;77650:164:0;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;77650:164:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;77650:164:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;77650:164:0;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;77650:164:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;77650:164:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;-1:-1;77650:164:0;;-1:-1:-1;77650:164:0;-1:-1:-1;77650:164:0;:::i;:::-;;;;;;;;;;;;;;;;;;72001:264;71787:15;;-1:-1:-1;;;;;71787:15:0;71765:10;:38;71743:109;;;;;-1:-1:-1;;;71743:109:0;;;;;;;;;;;;-1:-1:-1;;;71743:109:0;;;;;;;;;;;;;;;72089:13;72104:14;72120:15;72139:54;72178:4;;72139:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;72139:24:0;;-1:-1:-1;;;72139:54:0:i;:::-;72204:14;;:53;;;-1:-1:-1;;;72204:53:0;;-1:-1:-1;;;;;72204:53:0;;;;;;;;;;;;;;;;;;;;;;72086:107;;-1:-1:-1;72086:107:0;;-1:-1:-1;72086:107:0;;-1:-1:-1;72204:14:0;;-1:-1:-1;72204:29:0;;:53;;;;;:14;;:53;;;;;;;:14;;:53;;;5:2:-1;;;;30:1;27;20:12;5:2;72204:53:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;72204:53:0;;;;71863:1;;;72001:264;;:::o;75955:1687::-;76030:44;;:::i;:::-;76077:20;:4;;:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;76077:18:0;;-1:-1:-1;;;76077:20:0:i;:::-;76030:67;;76108:40;;:::i;:::-;76151:20;:7;:18;:20::i;:::-;76108:63;;76182:16;76201:28;:7;:26;:28::i;:::-;76182:47;;74829:2;76248:8;:19;76240:59;;;;;-1:-1:-1;;;76240:59:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;76310:11;76324:15;;:134;;-1:-1:-1;;;76324:134:0;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;76324:15:0;;;;:31;;76370:4;;;;76310:11;;;;76324:134;;;;76370:4;;;;76324:134;1:33:-1;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;76324:134:0;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;76324:134:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;76324:134:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;76324:134:0;;-1:-1:-1;76469:32:0;;:::i;:::-;76504:16;:7;:14;:16::i;:::-;76469:51;;76616:18;76637:16;:3;:14;:16::i;:::-;76616:37;;76664:41;;:::i;:::-;76708:15;:3;:13;:15::i;:::-;76664:59;-1:-1:-1;75720:66:0;76976:27;:18;76664:59;77008:18;76976;:15;:18;:::i;:::-;:25;:27::i;:::-;76968:58;76946:138;;;;;-1:-1:-1;;;76946:138:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;77139:27;:18;:6;77155:1;77139:18;:15;:18;:::i;:27::-;-1:-1:-1;;;;;77117:50:0;:10;-1:-1:-1;;;;;77117:50:0;;77095:148;;;;-1:-1:-1;;;77095:148:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;77254:17;77282:27;:18;:6;77298:1;77282:18;:15;:18;:::i;:27::-;77254:56;;77321:18;77342:33;77358:13;:3;:11;:13::i;:::-;77373:1;77342:15;:33::i;:::-;77405:15;;;:229;;;-1:-1:-1;;;77405:229:0;;77450:10;77405:229;;;;-1:-1:-1;;;;;77405:229:0;;;;;;;;;;;;;;;;;;;;;;;;;;:15;:229;;;;;;77615:8;;;77405:229;;;;;;77321:54;;-1:-1:-1;77405:15:0;;;:30;;:229;;;;;:15;;:229;;;;;;:15;;:229;;;5:2:-1;;;;30:1;27;20:12;5:2;77405:229:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;77405:229:0;;;;75955:1687;;;;;;;;;;;:::o;77822:118::-;77924:12;77822:118;;;;:::o;40127:43::-;;;;;;;;;;;;;;-1:-1:-1;;;40127:43:0;;;;:::o;40175:39::-;40209:5;40175:39;:::o;77650:164::-;77806:4;77650:164;;;;;;;;:::o;73694:317::-;73797:14;73813:13;73828:14;73844:15;73937:4;73912:91;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;73912:91:0;;;;;;;;;;;;;;;;;;;-1:-1:-1;73912:91:0;;-1:-1:-1;73912:91:0;-1:-1:-1;73694:317:0;-1:-1:-1;;73694:317:0:o;25257:274::-;25349:18;;:::i;:::-;25385:38;25426:53;:30;:4;:28;:30::i;:::-;:51;:53::i;:::-;25499:24;;;;;;;;;;;;;-1:-1:-1;;25257:274:0;;;;:::o;27115:890::-;27185:22;;:::i;:::-;27232:25;:7;:12;;;27245:1;27232:15;;;;;;;;;;;;;;:23;:25::i;:::-;27218:11;;;:39;27266:36;;:::i;:::-;27305:23;:7;:11;;;:21;:23::i;:::-;27266:62;;27343:20;:11;:18;:20::i;:::-;27339:579;;;27417:20;:11;:18;:20::i;:::-;27402:35;;27339:579;;;27519:23;27545:7;:11;;;27519:37;;27569:19;27621:1;27601:10;:17;:21;27591:32;;;;;;;;;;;;;;;;;;;;;;;;;21:6:-1;;104:10;27591:32:0;87:34:-1;135:17;;-1:-1;27591:32:0;;27569:54;;27636:14;27663:15;27735:10;27731:2;27727:19;27717:29;;27783:6;27777:4;27773:17;27762:28;;27817:36;27822:6;27830:7;27839:6;:13;27817:4;:36::i;:::-;27881:27;:18;:6;:16;:18::i;:27::-;27866:42;;-1:-1:-1;;;;27339:579:0;27947:27;27966:7;27947:18;:27::i;:::-;27928:16;;;:46;-1:-1:-1;27115:890:0;;;:::o;28454:135::-;28532:7;28557:24;:7;:12;;;28570:1;28557:15;;;;;;;;;;;;;;:22;:24::i;:::-;28550:31;28454:135;-1:-1:-1;;28454:135:0:o;29026:218::-;29088:10;;:::i;:::-;29111:32;;:::i;:::-;29146:24;:7;:12;;;29159:1;29146:15;;;;;;;;;;;;;;:22;:24::i;:::-;29171:7;:16;;;29146:42;;;;;;;;;;;;;;29111:77;;29206:30;;;;;;;;29210:7;29206:30;;;;29219:16;:7;:14;:16::i;:::-;29206:30;;29199:37;29026:218;-1:-1:-1;;;29026:218:0:o;29272:123::-;29330:7;29355:32;29375:3;:8;;;29384:1;29375:11;;;;;;;;;;;;;;29355:19;:32::i;29403:132::-;29460:16;;:::i;:::-;29496:31;;;;;;;;29506:20;:3;:8;;;29515:1;29506:11;;;;;;;:20;29496:31;;29489:38;29403:132;-1:-1:-1;;29403:132:0:o;29818:148::-;29898:24;;:::i;:::-;29940:11;;:18;;29952:5;;29940:18;;;;;;;;;;;;29933:25;;29818:148;;;;:::o;19980:549::-;20065:8;;20040:4;;20065:12;;;;:30;;-1:-1:-1;20081:8:0;;20093:2;-1:-1:-1;20081:14:0;20065:30;20057:39;;;;;;20109:11;20123:27;20138:4;:11;;;20123:14;:27::i;:::-;20172:8;;20238:11;;;;;:20;;20303:13;;20109:41;;-1:-1:-1;20172:17:0;;;;;20303:13;20238:20;20394:11;;20391:2;;;20464:3;20460:2;20456:12;20451:3;20447:22;20439:6;20435:35;20425:45;;20391:2;-1:-1:-1;20515:6:0;19980:549;-1:-1:-1;;;;19980:549:0:o;29543:116::-;29598:12;29630:21;:3;:8;;;29639:1;29630:11;;;;;;;9403:322;9506:7;9557:6;9566:2;9557:11;9539:6;:13;:30;;9531:39;;;;;;-1:-1:-1;9650:30:0;9666:4;9650:30;9644:37;;9403:322::o;16962:225::-;17023:14;;:::i;:::-;-1:-1:-1;17151:28:0;;;;;;;;;17159:11;;17151:28;;17116:4;17106:15;;;17151:28;;;;16962:225;;;:::o;17997:523::-;18057:16;18094:12;18101:4;18094:6;:12::i;:::-;18086:21;;;;;;18120:10;18133:14;18142:4;18133:8;:14::i;:::-;18120:27;;18158:23;18198:5;18184:20;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;18158:46;;18217:11;18245:27;18260:4;:11;;;18245:14;:27::i;:::-;18231:11;;;;:41;;-1:-1:-1;18283:12:0;;18306:181;18327:5;18323:1;:9;18306:181;;;18364:19;18376:6;18364:11;:19::i;:::-;18354:29;;18410:24;;;;;;;;18418:7;18410:24;;;;18427:6;18410:24;;;18398:6;18405:1;18398:9;;;;;;;;;;;;;;;;;:36;18459:16;;;;18334:3;;18306:181;;;-1:-1:-1;18506:6:0;;17997:523;-1:-1:-1;;;;;17997:523:0:o;20877:445::-;20971:8;;20938:12;;20963:21;;;;;;20997:11;21011:27;21026:4;:11;;;21011:14;:27::i;:::-;21060:8;;21125:14;;;21060:17;;;;21125:14;;;-1:-1:-1;;21125:14:0;;;;;;;;;;;20997:41;;-1:-1:-1;21103:19:0;;21060:17;21125:14;;;;;;;21:6:-1;;104:10;21125:14:0;87:34:-1;135:17;;-1:-1;21125:14:0;;21103:36;;21152:12;21220:6;21214:4;21210:17;21199:28;;21250:40;21269:6;21255:4;:11;;;:20;21277:7;21286:3;21250:4;:40::i;18627:342::-;18708:8;;18687:4;;18704:31;;-1:-1:-1;18730:5:0;18723:12;;18704:31;18784:11;;;;18847:13;;18748:11;18839:22;;15753:4;18888:24;;18884:55;;;18934:5;18927:12;;;;;;18884:55;-1:-1:-1;18957:4:0;;18627:342;-1:-1:-1;;;18627:342:0:o;25539:717::-;25612:8;25608:21;;25622:7;;25608:21;25689:201;24946:2;25696:16;;25689:201;;25788:10;;25775:24;;24946:2;25830:16;;;;25861:17;;;;-1:-1:-1;;25714:16:0;25689:201;;;26077:10;;26149:11;;24946:2;26003:15;;;25995:3;:24;-1:-1:-1;;25995:28:0;26089:9;;26073:26;;;26145:22;;26216:21;26203:35;;26043:206;;;;:::o;19776:196::-;19908:8;;19839:7;;19920:2;19908:14;19900:23;;;;;;19951:12;19958:4;19951:6;:12::i;23291:552::-;23429:13;;23350:4;;23421:22;;15659:4;23470:26;;23466:369;;;23519:1;23512:8;;;;;23466:369;15706:4;23540:25;;;:83;;-1:-1:-1;15753:4:0;23570:25;;;;;:52;;-1:-1:-1;15800:4:0;23599:23;;23570:52;23536:299;;;23645:1;23638:8;;;;;23536:299;15753:4;23666:24;;23662:173;;;-1:-1:-1;;23731:35:0;;-1:-1:-1;23724:42:0;;23662:173;-1:-1:-1;;23802:33:0;;-1:-1:-1;23795:40:0;;21435:422;21517:8;;21496:4;;21513:27;;-1:-1:-1;21539:1:0;21532:8;;21513:27;21553:10;21566:1;21553:14;;21578:12;21607:27;21622:4;:11;;;21607:14;:27::i;:::-;21593:11;;;;21673:8;;21593:41;;;;-1:-1:-1;21659:22:0;21692:133;21709:6;21699:7;:16;21692:133;;;21751:20;21763:7;21751:11;:20::i;:::-;21806:7;;;;;21741:30;;;;21692:133;;;-1:-1:-1;21844:5:0;;21435:422;-1:-1:-1;;;21435:422:0:o;21909:1327::-;22067:13;;21965:4;;;;22059:22;;15659:4;22108:26;;22104:1098;;;22159:1;22149:11;;22104:1098;;;15706:4;22190:25;;22186:1016;;;-1:-1:-1;;22240:30:0;;;-1:-1:-1;22186:1016:0;;;15753:4;22292:24;;22288:914;;;22387:4;22380:5;22376:16;22467:1;22459:6;22455:14;22445:24;;22625:7;22621:2;22617:16;22612:3;22608:26;22599:6;22593:13;22589:46;22723:1;22714:7;22710:15;22701:7;22697:29;22686:40;;22342:399;;;;;15800:4;22773:23;;22769:433;;;-1:-1:-1;;22823:28:0;;;-1:-1:-1;22769:433:0;;;22950:4;22943:5;22939:16;22995:1;22987:6;22983:14;22973:24;;23068:7;23064:2;23060:16;23055:3;23051:26;23042:6;23036:13;23032:46;23173:1;23164:7;23160:15;23151:7;23147:29;23136:40;;22905:286;;;-1:-1:-1;23221:7:0;21909:1327;-1:-1:-1;;21909:1327:0:o;75160:2783::-;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;:::i;:::-;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;:::o
Swarm Source
bzzr://52ca81bee8d095d1ddda984ef8073000dd4b63b671db62be51faa49be39813c0
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.