Contract 0xf92cD566Ea4864356C5491c177A430C222d7e678 4

 

Contract Overview

Wormhole: Solana Bridge
Balance:
0 Ether

EtherValue:
$0.00

Token:
Txn Hash Method
Block
From
To
Value
0x128879712a6ae632454fcc8df6b80b0c5e53678ddc9424dfe3b3e4fe99b00605Submit VAA134800482021-10-24 11:56:454 hrs 6 mins ago0x47ed57f375d3dddae2ded7a6de522c35bc9419af IN  Wormhole: Solana Bridge0 Ether0.010947196066 47.268298234
0x32ce1bd5fe3e022a00552761cf5ba5d98c5654590ca2b35d5b1839c8b1329032Submit VAA134799572021-10-24 11:39:044 hrs 24 mins ago0x47ed57f375d3dddae2ded7a6de522c35bc9419af IN  Wormhole: Solana Bridge0 Ether0.016866287698 72.807157558
0x0297451b33d9d3f3a37029c824e40ae5ae2bc4b65d4d443a1fdf0cb762dc9033Submit VAA134786262021-10-24 6:37:389 hrs 25 mins ago0xa00b0540f43e00a634d016a31b0a39d95170e6bf IN  Wormhole: Solana Bridge0 Ether0.013188570142 56.925557739
0xd445243c69cae8904320ccc1f28ed287e529adfe2d6a970e9eacf0ce02c2e460Submit VAA134785032021-10-24 6:04:309 hrs 58 mins ago0xa00b0540f43e00a634d016a31b0a39d95170e6bf IN  Wormhole: Solana Bridge0 Ether0.009106303517 39.313498151
0xc9fd574acfc01c7474a0c27a26602e6c3d2852bb57d69a60edd3a6e8894f29d7Submit VAA134773712021-10-24 1:51:2514 hrs 11 mins ago0xa00b0540f43e00a634d016a31b0a39d95170e6bf IN  Wormhole: Solana Bridge0 Ether0.010751788718 46.414939751
0x37ae1e9ed332f2d4a4f463d0e5fca7082c0f9a05e0d7d05bc21ce4faab9d7b95Submit VAA134768252021-10-23 23:42:3816 hrs 20 mins ago0xde715346e9ffef952d3e73d51f77828eef242e5a IN  Wormhole: Solana Bridge0 Ether0.013018460068 51.82631778
0x4b10da359dbc39e957fba84f1371db038f2a15ce9ed1698f4809694ff63069feSubmit VAA134756082021-10-23 19:06:1020 hrs 57 mins ago0xaf7bbcfb1c1f987e0ae409c684289b332a425254 IN  Wormhole: Solana Bridge0 Ether0.018168664771 78.421039151
0xe084bef25814c05d80229ec0243e48e3b6f8d2767a98d3234b3f2b0df2fe8941Lock Assets134753272021-10-23 18:09:2521 hrs 53 mins ago0xf469fa705a3cbfade9a31b1dfda3ebc1e8036a9d IN  Wormhole: Solana Bridge0 Ether0.00545071891
0x6949accf69fae3200d92af69889de9b29ac330a3cd2c331c59c477268cbd841aSubmit VAA134753052021-10-23 18:04:2421 hrs 58 mins ago0xf469fa705a3cbfade9a31b1dfda3ebc1e8036a9d IN  Wormhole: Solana Bridge0 Ether0.01666065672
0xe07e192180dc6c383b61bcdb5178d65fa30d24c0161f4e49ce8f62e08beb53b2Lock Assets134752562021-10-23 17:54:3322 hrs 8 mins ago0xf469fa705a3cbfade9a31b1dfda3ebc1e8036a9d IN  Wormhole: Solana Bridge0 Ether0.00484979481
0x3f0d77cbbd29d7a99313c8a44f0c85246be8da321fddccadd56fa9112229ffeeLock Assets134747932021-10-23 16:13:1723 hrs 49 mins ago0x41c5cf425ea8a9ba6a5fa6aba8f318e10ced9c97 IN  Wormhole: Solana Bridge0 Ether0.003490535277 59.906897295
0x64d242b7a7deb5c188ee96210eba590af22e38a3c4495a069e962fb3d9b23cf0Lock Assets134740042021-10-23 13:18:011 day 2 hrs ago0xd0471c359f65d6adcbd69694996ab49e5e6b6a47 IN  Wormhole: Solana Bridge0 Ether0.002565648619 44.024307969
0xcae716df4a008fee721395565b42d9874f7b865eb6d6caabcc44df3e2e3b37a2Submit VAA134737202021-10-23 12:20:031 day 3 hrs ago0xa00b0540f43e00a634d016a31b0a39d95170e6bf IN  Wormhole: Solana Bridge0 Ether0.012756435939 55.066049976
0xd14d2e660eac0a98f0995d429a4041eae815029815228859bd8c52deef5e9159Lock Assets134736432021-10-23 12:02:561 day 4 hrs ago0x713e95d7dd8f490c5d4f034ac7e4af6bda87c16a IN  Wormhole: Solana Bridge0 Ether0.003692746518 63.36433162
0x4c217372cdeb35a284e0e02adace69f8ca79dcc2efe3b4afb7bde6d156f5e3f4Lock Assets134730452021-10-23 9:47:291 day 6 hrs ago0xfae1ecad2fa96bedd94a0966bd762074d48b5968 IN  Wormhole: Solana Bridge0 Ether0.003041011394 52.191868231
0xf72f6111c85883dce85d78bf0fd456d33490d9321ffc4848ce9db7f61d5d2289Submit VAA134704342021-10-22 23:40:271 day 16 hrs ago0xa00b0540f43e00a634d016a31b0a39d95170e6bf IN  Wormhole: Solana Bridge0 Ether0.01843252657 79.597045297
0x23ca7fef97569ab56fd1c8055728e14b73abfa4563877e611563cc11856374e2Lock Assets134698492021-10-22 21:30:041 day 18 hrs ago0x600dfb82f3dd703f18540ce447ef98cf26e4a5e2 IN  Wormhole: Solana Bridge0 Ether0.004974225965 85.370987635
0xf2d24be4f4a97a3c35cff00cb353dfb49c2457b1b33cadfc976bfb082fb11fe9Submit VAA134696822021-10-22 20:53:571 day 19 hrs ago0xd93e71864c07a118b354b9a40b1aedcba51ad1b4 IN  Wormhole: Solana Bridge0 Ether0.022302016632 96.337837185
0xd422e8f5e9300af482291750c5d0099dbcbbc35df81ccdcdb757fa9ec9d7df35Submit VAA134695892021-10-22 20:33:281 day 19 hrs ago0xaf7bbcfb1c1f987e0ae409c684289b332a425254 IN  Wormhole: Solana Bridge0 Ether0.018754755222 80.95915609
0x779ea247f803b684c8b1a802eea127ffc87a1b6636666955a55def4147072f54Submit VAA134695602021-10-22 20:28:261 day 19 hrs ago0x47ed57f375d3dddae2ded7a6de522c35bc9419af IN  Wormhole: Solana Bridge0 Ether0.02594424 112
0xf7cb9b86f9e263e6d4b6baf041a40af039534289aefa240d910ed9c95113e0b8Submit VAA134694892021-10-22 20:10:261 day 19 hrs ago0xaf7bbcfb1c1f987e0ae409c684289b332a425254 IN  Wormhole: Solana Bridge0 Ether0.021266057001 91.809271571
0xc9c0d61bd8329b3525877fd94b710fa8056a40fae5bb55100ce04c15cd110cf2Lock Assets134693072021-10-22 19:31:331 day 20 hrs ago0xe7207afc5cd57625b88e2ddbc4fe9de794a76b0f IN  Wormhole: Solana Bridge0 Ether0.005579617002 88.455832498
0x26c30265a0ad597d9a662a08309a99ba9a3ac27938e5657a58979a69e2251688Lock Assets134684072021-10-22 16:14:481 day 23 hrs ago0xe7207afc5cd57625b88e2ddbc4fe9de794a76b0f IN  Wormhole: Solana Bridge0 Ether0.008406728089 133.275121116
0x8b56d7024ee08735acd7c4c91ae506e6ce32ee2273e693d85d27b12d8eb71a35Lock Assets134682342021-10-22 15:35:022 days 28 mins ago0x47ed57f375d3dddae2ded7a6de522c35bc9419af IN  Wormhole: Solana Bridge0 Ether0.00538765809 94.794723157
0x4ac348b88ce53b64538d0c8a362736074156c059c528f42248c9c175d07ca1d8Lock Assets134678042021-10-22 13:54:552 days 2 hrs ago0x9772fedc43123a6efbd1965617d0e079de2689e4 IN  Wormhole: Solana Bridge0 Ether0.003948584689 71.63355265
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xd41e946299aae76a6b5bdbb31659ffed0044b330692cfc02c42bdf641b100799133923552021-10-10 17:51:0513 days 22 hrs ago Wormhole: Solana Bridge Wrapped Ether0.0765 Ether
0x9640c7dbe95d6fe59f93c4a428866316db763e91465a623f41108b0b4e01e736133843662021-10-09 11:47:3815 days 4 hrs ago Wormhole: Solana Bridge  Contract Creation0 Ether
0xf4faf1f3395701899d9e0b6538dcbe006e0d34144c46aef5ef8cb42776c1bfe5132498272021-09-18 13:08:5836 days 2 hrs ago Wormhole: Solana Bridge  Contract Creation0 Ether
0x913c9f4373f4f4d19673fc4e1702cc40a4eff9314180e5aedc324fbc334ed2fa132316622021-09-15 17:29:5538 days 22 hrs ago Wormhole: Solana Bridge  Contract Creation0 Ether
0x1edce2afa0719e3d650520a883c0777fb125abe8429cf3201f4ddfa4ad5f2446132316392021-09-15 17:25:0638 days 22 hrs ago Wormhole: Solana Bridge  Contract Creation0 Ether
0x8b1fecf539bd2cce84bd79220a34e7d047824018eec3273755a1ee2fbe12e52a132291762021-09-15 8:19:3239 days 7 hrs ago Wormhole: Solana Bridge  Contract Creation0 Ether
0x0c1cbaf2a0477eddd2bea9994a8f72724be6643f4836271c4d6c32f24fa87a25131183592021-08-29 4:54:0356 days 11 hrs ago Wormhole: Solana Bridge  Contract Creation0 Ether
0x417f0fa67bc266f15d9b9973a1cc8a50b2753fef77bdc1354aeb1ca36dac5929130759062021-08-22 15:25:5863 days 37 mins ago Wormhole: Solana Bridge  Contract Creation0 Ether
0xa0fc3f381d5affa62f2c1ac0fe19a186367763ee3776d62e5aa72dfafc9c9f63130752612021-08-22 13:00:1563 days 3 hrs ago Wormhole: Solana Bridge  Contract Creation0 Ether
0x2b304b69109ab6ebccf709029c4ee685096bd500b8873fe61790866059b34034130314542021-08-15 18:41:4669 days 21 hrs ago Wormhole: Solana Bridge  Contract Creation0 Ether
0x26319c9fe7b236aaa6e3f71076864478c236180d81f2e2deaa44789c7375ec7a128890872021-07-24 12:50:5692 days 3 hrs ago Wormhole: Solana Bridge  Contract Creation0 Ether
0xbd7d3eb1217fef17b3f4ae97b36bcd2d21cd4200579a68a1b1e6b53411b448ec128802012021-07-23 3:19:4193 days 12 hrs ago Wormhole: Solana Bridge  Contract Creation0 Ether
0x216d19228a63571b3a079253fd92e5f4bf2853647a7cd74173cc0cdbe3308ea4128796422021-07-23 1:17:5393 days 14 hrs ago Wormhole: Solana Bridge  Contract Creation0 Ether
0x73b06d106a4d06d59f02a104146d2a46a109f0a3bebe4d767a69e34c5d38ac8d128569922021-07-19 12:30:5997 days 3 hrs ago Wormhole: Solana Bridge  Contract Creation0 Ether
0x6a40ee10586e6c6ba04140f927059292726e1f86d14a7394a23fb56863137992128494772021-07-18 8:10:5298 days 7 hrs ago Wormhole: Solana Bridge  Contract Creation0 Ether
0xa15c2056121a70dffb819d89c955ac2fc5af8fcc4df5f87143eff78e5ac3742d126169202021-06-12 1:58:16134 days 14 hrs ago Wormhole: Solana Bridge  Contract Creation0 Ether
0xcb52866d2f20249af709f84906070f17614fbefd047c78d43d9fee6853381e3f125030212021-05-25 10:44:54152 days 5 hrs ago Wormhole: Solana Bridge  Contract Creation0 Ether
0x45360e3dee3516058333939827f0d2904b264ae48f52e099be805e9603ecd4c6124500282021-05-17 5:26:21160 days 10 hrs ago Wormhole: Solana Bridge  Contract Creation0 Ether
0x3c7719d27a4149ffc23fb67410eabd2e619c93687767122efbdb9c8572e9f8f8124490722021-05-17 1:46:22160 days 14 hrs ago Wormhole: Solana Bridge  Contract Creation0 Ether
0x6856d4dd56c98a6524961fde4b692f92a4f53077dce23641aeb6897a7108ec08124370942021-05-15 5:30:51162 days 10 hrs ago Wormhole: Solana Bridge  Contract Creation0 Ether
0x781fc97edf30bfc7c12b0be2b50d86ea40b643e6746be8f15c1c3f8314c59017123812732021-05-06 14:30:33171 days 1 hr ago Wormhole: Solana Bridge  Contract Creation0 Ether
0xb9303174b9754ba7e979685f64b2ba43a8823d43ef52919274b8f5b86cc251be123764082021-05-05 20:28:32171 days 19 hrs ago Wormhole: Solana Bridge  Contract Creation0 Ether
0xa368e89bdfe6d1bf3c57a9258d56a1d67a97fb5edea12df28beca9567641cfb3123694862021-05-04 18:58:57172 days 21 hrs ago Wormhole: Solana Bridge  Contract Creation0 Ether
0xf0d51b042b5101df212487180b6a55edb0521936fbd93d8d252d0b70585f69c9123569882021-05-02 20:44:37174 days 19 hrs ago Wormhole: Solana Bridge Wrapped Ether0.0001 Ether
0x411a2cde77831d9c58168c75c5ceb9ad69f329325fbe565a56220b18cea1fff2123569402021-05-02 20:34:47174 days 19 hrs ago Wormhole: Solana Bridge Wrapped Ether0.0001 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Wormhole

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 10 : BytesLib.sol
// SPDX-License-Identifier: Unlicense
/*
 * @title Solidity Bytes Arrays Utils
 * @author Gonçalo Sá <[email protected]>
 *
 * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity.
 *      The library lets you concatenate, slice and type cast bytes arrays both in memory and storage.
 */
pragma solidity >=0.5.0 <0.7.0;


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 concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal {
        assembly {
        // Read the first 32 bytes of _preBytes storage, which is the length
        // of the array. (We don't need to use the offset into the slot
        // because arrays use the entire slot.)
            let fslot := sload(_preBytes_slot)
        // Arrays of 31 bytes or less have an even value in their slot,
        // while longer arrays have an odd value. The actual length is
        // the slot divided by two for odd values, and the lowest order
        // byte divided by two for even values.
        // If the slot is even, bitwise and the slot with 255 and divide by
        // two to get the length. If the slot is odd, bitwise and the slot
        // with -1 and divide by two.
            let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)
            let mlength := mload(_postBytes)
            let newlength := add(slength, mlength)
        // slength can contain both the length and contents of the array
        // if length < 32 bytes so let's prepare for that
        // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage
            switch add(lt(slength, 32), lt(newlength, 32))
            case 2 {
            // Since the new array still fits in the slot, we just need to
            // update the contents of the slot.
            // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length
                sstore(
                _preBytes_slot,
                // all the modifications to the slot are inside this
                // next block
                add(
                // we can just add to the slot contents because the
                // bytes we want to change are the LSBs
                fslot,
                add(
                mul(
                div(
                // load the bytes from memory
                mload(add(_postBytes, 0x20)),
                // zero all bytes to the right
                exp(0x100, sub(32, mlength))
                ),
                // and now shift left the number of bytes to
                // leave space for the length in the slot
                exp(0x100, sub(32, newlength))
                ),
                // increase length by the double of the memory
                // bytes length
                mul(mlength, 2)
                )
                )
                )
            }
            case 1 {
            // The stored value fits in the slot, but the combined value
            // will exceed it.
            // get the keccak hash to get the contents of the array
                mstore(0x0, _preBytes_slot)
                let sc := add(keccak256(0x0, 0x20), div(slength, 32))

            // save new length
                sstore(_preBytes_slot, add(mul(newlength, 2), 1))

            // The contents of the _postBytes array start 32 bytes into
            // the structure. Our first read should obtain the `submod`
            // bytes that can fit into the unused space in the last word
            // of the stored array. To get this, we read 32 bytes starting
            // from `submod`, so the data we read overlaps with the array
            // contents by `submod` bytes. Masking the lowest-order
            // `submod` bytes allows us to add that value directly to the
            // stored value.

                let submod := sub(32, slength)
                let mc := add(_postBytes, submod)
                let end := add(_postBytes, mlength)
                let mask := sub(exp(0x100, submod), 1)

                sstore(
                sc,
                add(
                and(
                fslot,
                0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
                ),
                and(mload(mc), mask)
                )
                )

                for {
                    mc := add(mc, 0x20)
                    sc := add(sc, 1)
                } lt(mc, end) {
                    sc := add(sc, 1)
                    mc := add(mc, 0x20)
                } {
                    sstore(sc, mload(mc))
                }

                mask := exp(0x100, sub(mc, end))

                sstore(sc, mul(div(mload(mc), mask), mask))
            }
            default {
            // get the keccak hash to get the contents of the array
                mstore(0x0, _preBytes_slot)
            // Start copying to the last used word of the stored array.
                let sc := add(keccak256(0x0, 0x20), div(slength, 32))

            // save new length
                sstore(_preBytes_slot, add(mul(newlength, 2), 1))

            // Copy over the first `submod` bytes of the new data as in
            // case 1 above.
                let slengthmod := mod(slength, 32)
                let mlengthmod := mod(mlength, 32)
                let submod := sub(32, slengthmod)
                let mc := add(_postBytes, submod)
                let end := add(_postBytes, mlength)
                let mask := sub(exp(0x100, submod), 1)

                sstore(sc, add(sload(sc), and(mload(mc), mask)))

                for {
                    sc := add(sc, 1)
                    mc := add(mc, 0x20)
                } lt(mc, end) {
                    sc := add(sc, 1)
                    mc := add(mc, 0x20)
                } {
                    sstore(sc, mload(mc))
                }

                mask := exp(0x100, sub(mc, end))

                sstore(sc, mul(div(mload(mc), mask), mask))
            }
        }
    }

    function slice(
        bytes memory _bytes,
        uint256 _start,
        uint256 _length
    )
    internal
    pure
    returns (bytes memory)
    {
        require(_bytes.length >= (_start + _length), "Read out of bounds");

        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;
    }

    function toAddress(bytes memory _bytes, uint256 _start) internal pure returns (address) {
        require(_bytes.length >= (_start + 20), "Read out of bounds");
        address tempAddress;

        assembly {
            tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)
        }

        return tempAddress;
    }

    function toUint8(bytes memory _bytes, uint256 _start) internal pure returns (uint8) {
        require(_bytes.length >= (_start + 1), "Read out of bounds");
        uint8 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x1), _start))
        }

        return tempUint;
    }

    function toUint16(bytes memory _bytes, uint256 _start) internal pure returns (uint16) {
        require(_bytes.length >= (_start + 2), "Read out of bounds");
        uint16 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x2), _start))
        }

        return tempUint;
    }

    function toUint32(bytes memory _bytes, uint256 _start) internal pure returns (uint32) {
        require(_bytes.length >= (_start + 4), "Read out of bounds");
        uint32 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x4), _start))
        }

        return tempUint;
    }

    function toUint64(bytes memory _bytes, uint256 _start) internal pure returns (uint64) {
        require(_bytes.length >= (_start + 8), "Read out of bounds");
        uint64 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x8), _start))
        }

        return tempUint;
    }

    function toUint96(bytes memory _bytes, uint256 _start) internal pure returns (uint96) {
        require(_bytes.length >= (_start + 12), "Read out of bounds");
        uint96 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0xc), _start))
        }

        return tempUint;
    }

    function toUint128(bytes memory _bytes, uint256 _start) internal pure returns (uint128) {
        require(_bytes.length >= (_start + 16), "Read out of bounds");
        uint128 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x10), _start))
        }

        return tempUint;
    }

    function toUint256(bytes memory _bytes, uint256 _start) internal pure returns (uint256) {
        require(_bytes.length >= (_start + 32), "Read out of bounds");
        uint256 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x20), _start))
        }

        return tempUint;
    }

    function toBytes32(bytes memory _bytes, uint256 _start) internal pure returns (bytes32) {
        require(_bytes.length >= (_start + 32), "Read out of bounds");
        bytes32 tempBytes32;

        assembly {
            tempBytes32 := mload(add(add(_bytes, 0x20), _start))
        }

        return tempBytes32;
    }

    function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) {
        bool success = true;

        assembly {
            let length := mload(_preBytes)

        // if lengths don't match the arrays are not equal
            switch eq(length, mload(_postBytes))
            case 1 {
            // cb is a circuit breaker in the for loop since there's
            //  no said feature for inline assembly loops
            // cb = 1 - don't breaker
            // cb = 0 - break
                let cb := 1

                let mc := add(_preBytes, 0x20)
                let end := add(mc, length)

                for {
                    let cc := add(_postBytes, 0x20)
                // the next line is the loop condition:
                // while(uint256(mc < end) + cb == 2)
                } eq(add(lt(mc, end), cb), 2) {
                    mc := add(mc, 0x20)
                    cc := add(cc, 0x20)
                } {
                // if any of these checks fails then arrays are not equal
                    if iszero(eq(mload(mc), mload(cc))) {
                    // unsuccess:
                        success := 0
                        cb := 0
                    }
                }
            }
            default {
            // unsuccess:
                success := 0
            }
        }

        return success;
    }

    function equalStorage(
        bytes storage _preBytes,
        bytes memory _postBytes
    )
    internal
    view
    returns (bool)
    {
        bool success = true;

        assembly {
        // we know _preBytes_offset is 0
            let fslot := sload(_preBytes_slot)
        // Decode the length of the stored array like in concatStorage().
            let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)
            let mlength := mload(_postBytes)

        // if lengths don't match the arrays are not equal
            switch eq(slength, mlength)
            case 1 {
            // slength can contain both the length and contents of the array
            // if length < 32 bytes so let's prepare for that
            // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage
                if iszero(iszero(slength)) {
                    switch lt(slength, 32)
                    case 1 {
                    // blank the last byte which is the length
                        fslot := mul(div(fslot, 0x100), 0x100)

                        if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) {
                        // unsuccess:
                            success := 0
                        }
                    }
                    default {
                    // cb is a circuit breaker in the for loop since there's
                    //  no said feature for inline assembly loops
                    // cb = 1 - don't breaker
                    // cb = 0 - break
                        let cb := 1

                    // get the keccak hash to get the contents of the array
                        mstore(0x0, _preBytes_slot)
                        let sc := keccak256(0x0, 0x20)

                        let mc := add(_postBytes, 0x20)
                        let end := add(mc, mlength)

                    // the next line is the loop condition:
                    // while(uint256(mc < end) + cb == 2)
                        for {} eq(add(lt(mc, end), cb), 2) {
                            sc := add(sc, 1)
                            mc := add(mc, 0x20)
                        } {
                            if iszero(eq(sload(sc), mload(mc))) {
                            // unsuccess:
                                success := 0
                                cb := 0
                            }
                        }
                    }
                }
            }
            default {
            // unsuccess:
                success := 0
            }
        }

        return success;
    }
}

File 2 of 10 : Wormhole.sol
// contracts/Wormhole.sol
// SPDX-License-Identifier: Apache 2

pragma solidity ^0.6.0;
pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "./BytesLib.sol";
import "./WrappedAsset.sol";

contract Wormhole is ReentrancyGuard {
    using SafeERC20 for IERC20;
    using BytesLib for bytes;
    using SafeMath for uint256;

    uint64 constant MAX_UINT64 = 18_446_744_073_709_551_615;

    // Address of the Wrapped asset template
    address public wrappedAssetMaster;

    // Chain ID of Ethereum
    uint8 CHAIN_ID = 2;

    // Address of the official WETH contract
    address constant WETHAddress = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;

    struct GuardianSet {
        address[] keys;
        uint32 expiration_time;
    }

    event LogGuardianSetChanged(
        uint32 oldGuardianIndex,
        uint32 newGuardianIndex
    );

    event LogTokensLocked(
        uint8 target_chain,
        uint8 token_chain,
        uint8 token_decimals,
        bytes32 indexed token,
        bytes32 indexed sender,
        bytes32 recipient,
        uint256 amount,
        uint32 nonce
    );

    struct ParsedVAA {
        uint8 version;
        bytes32 hash;
        uint32 guardian_set_index;
        uint32 timestamp;
        uint8 action;
        bytes payload;
    }

    // Mapping of guardian_set_index => guardian set
    mapping(uint32 => GuardianSet) public guardian_sets;
    // Current active guardian set
    uint32 public guardian_set_index;

    // Period for which a guardian set stays active after it has been replaced
    uint32 public guardian_set_expirity;

    // Mapping of already consumedVAAs
    mapping(bytes32 => bool) public consumedVAAs;

    // Mapping of wrapped asset ERC20 contracts
    mapping(bytes32 => address) public wrappedAssets;
    mapping(address => bool) public isWrappedAsset;

    constructor(GuardianSet memory initial_guardian_set, address wrapped_asset_master, uint32 _guardian_set_expirity) public {
        guardian_sets[0] = initial_guardian_set;
        // Explicitly set for doc purposes
        guardian_set_index = 0;
        guardian_set_expirity = _guardian_set_expirity;

        wrappedAssetMaster = wrapped_asset_master;
    }

    function getGuardianSet(uint32 idx) view public returns (GuardianSet memory gs) {
        return guardian_sets[idx];
    }

    function submitVAA(
        bytes calldata vaa
    ) public nonReentrant {
        ParsedVAA memory parsed_vaa = parseAndVerifyVAA(vaa);
        // Process VAA
        if (parsed_vaa.action == 0x01) {
            require(parsed_vaa.guardian_set_index == guardian_set_index, "only the current guardian set can change the guardian set");
            vaaUpdateGuardianSet(parsed_vaa.payload);
        } else if (parsed_vaa.action == 0x10) {
            vaaTransfer(parsed_vaa.payload);
        } else {
            revert("invalid VAA action");
        }

        // Set the VAA as consumed
        consumedVAAs[parsed_vaa.hash] = true;
    }

    // parseAndVerifyVAA parses raw VAA data into a struct and verifies whether it contains sufficient signatures of an
    // active guardian set i.e. is valid according to Wormhole consensus rules.
    function parseAndVerifyVAA(bytes calldata vaa) public view returns (ParsedVAA memory parsed_vaa) {
        parsed_vaa.version = vaa.toUint8(0);
        require(parsed_vaa.version == 1, "VAA version incompatible");

        // Load 4 bytes starting from index 1
        parsed_vaa.guardian_set_index = vaa.toUint32(1);

        uint256 len_signers = vaa.toUint8(5);
        uint offset = 6 + 66 * len_signers;

        // Load 4 bytes timestamp
        parsed_vaa.timestamp = vaa.toUint32(offset);

        // Hash the body
        parsed_vaa.hash = keccak256(vaa.slice(offset, vaa.length - offset));
        require(!consumedVAAs[parsed_vaa.hash], "VAA was already executed");

        GuardianSet memory guardian_set = guardian_sets[parsed_vaa.guardian_set_index];
        require(guardian_set.keys.length > 0, "invalid guardian set");
        require(guardian_set.expiration_time == 0 || guardian_set.expiration_time > block.timestamp, "guardian set has expired");
        // We're using a fixed point number transformation with 1 decimal to deal with rounding.
        require(((guardian_set.keys.length * 10 / 3) * 2) / 10 + 1 <= len_signers, "no quorum");

        int16 last_index = - 1;
        for (uint i = 0; i < len_signers; i++) {
            uint8 index = vaa.toUint8(6 + i * 66);
            require(index > last_index, "signature indices must be ascending");
            last_index = int16(index);

            bytes32 r = vaa.toBytes32(7 + i * 66);
            bytes32 s = vaa.toBytes32(39 + i * 66);
            uint8 v = vaa.toUint8(71 + i * 66);
            v += 27;
            require(ecrecover(parsed_vaa.hash, v, r, s) == guardian_set.keys[index], "VAA signature invalid");
        }

        parsed_vaa.action = vaa.toUint8(offset + 4);
        parsed_vaa.payload = vaa.slice(offset + 5, vaa.length - (offset + 5));
    }

    function vaaUpdateGuardianSet(bytes memory data) private {
        uint32 new_guardian_set_index = data.toUint32(0);
        require(new_guardian_set_index == guardian_set_index + 1, "index must increase in steps of 1");
        uint8 len = data.toUint8(4);

        address[] memory new_guardians = new address[](len);
        for (uint i = 0; i < len; i++) {
            address addr = data.toAddress(5 + i * 20);
            new_guardians[i] = addr;
        }

        uint32 old_guardian_set_index = guardian_set_index;
        guardian_set_index = new_guardian_set_index;

        GuardianSet memory new_guardian_set = GuardianSet(new_guardians, 0);
        guardian_sets[guardian_set_index] = new_guardian_set;
        guardian_sets[old_guardian_set_index].expiration_time = uint32(block.timestamp) + guardian_set_expirity;

        emit LogGuardianSetChanged(old_guardian_set_index, guardian_set_index);
    }

    function vaaTransfer(bytes memory data) private {
        //uint32 nonce = data.toUint64(0);
        uint8 source_chain = data.toUint8(4);

        uint8 target_chain = data.toUint8(5);
        //bytes32 source_address = data.toBytes32(6);
        //bytes32 target_address = data.toBytes32(38);
        address target_address = data.toAddress(38 + 12);

        uint8 token_chain = data.toUint8(70);
        //bytes32 token_address = data.toBytes32(71);
        uint256 amount = data.toUint256(104);

        require(source_chain != target_chain, "same chain transfers are not supported");
        require(target_chain == CHAIN_ID, "transfer must be incoming");

        if (token_chain != CHAIN_ID) {
            bytes32 token_address = data.toBytes32(71);
            bytes32 asset_id = keccak256(abi.encodePacked(token_chain, token_address));

            // if yes: mint to address
            // if no: create and mint
            address wrapped_asset = wrappedAssets[asset_id];
            if (wrapped_asset == address(0)) {
                uint8 asset_decimals = data.toUint8(103);
                wrapped_asset = deployWrappedAsset(asset_id, token_chain, token_address, asset_decimals);
            }

            WrappedAsset(wrapped_asset).mint(target_address, amount);
        } else {
            address token_address = data.toAddress(71 + 12);

            uint8 decimals = ERC20(token_address).decimals();

            // Readjust decimals if they've previously been truncated
            if (decimals > 9) {
                amount = amount.mul(10 ** uint256(decimals - 9));
            }
            IERC20(token_address).safeTransfer(target_address, amount);
        }
    }

    function deployWrappedAsset(bytes32 seed, uint8 token_chain, bytes32 token_address, uint8 decimals) private returns (address asset){
        // Taken from https://github.com/OpenZeppelin/openzeppelin-sdk/blob/master/packages/lib/contracts/upgradeability/ProxyFactory.sol
        // Licensed under MIT
        bytes20 targetBytes = bytes20(wrappedAssetMaster);
        assembly {
            let clone := mload(0x40)
            mstore(clone, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
            mstore(add(clone, 0x14), targetBytes)
            mstore(add(clone, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)
            asset := create2(0, clone, 0x37, seed)
        }

        // Call initializer
        WrappedAsset(asset).initialize(token_chain, token_address, decimals);

        // Store address
        wrappedAssets[seed] = asset;
        isWrappedAsset[asset] = true;
    }

    function lockAssets(
        address asset,
        uint256 amount,
        bytes32 recipient,
        uint8 target_chain,
        uint32 nonce,
        bool refund_dust
    ) public nonReentrant {
        require(target_chain != CHAIN_ID, "must not transfer to the same chain");

        uint8 asset_chain = CHAIN_ID;
        bytes32 asset_address;
        uint8 decimals = ERC20(asset).decimals();

        if (isWrappedAsset[asset]) {
            WrappedAsset(asset).burn(msg.sender, amount);
            asset_chain = WrappedAsset(asset).assetChain();
            asset_address = WrappedAsset(asset).assetAddress();
        } else {
            uint256 balanceBefore = IERC20(asset).balanceOf(address(this));
            IERC20(asset).safeTransferFrom(msg.sender, address(this), amount);
            uint256 balanceAfter = IERC20(asset).balanceOf(address(this));

            // The amount that was transferred in is the delta between balance before and after the transfer.
            // This is to properly handle tokens that charge a fee on transfer.
            amount = balanceAfter.sub(balanceBefore);

            // Decimal adjust amount - we keep the dust
            if (decimals > 9) {
                uint256 original_amount = amount;
                amount = amount.div(10 ** uint256(decimals - 9));

                if (refund_dust) {
                    IERC20(asset).safeTransfer(msg.sender, original_amount.mod(10 ** uint256(decimals - 9)));
                }

                decimals = 9;
            }

            require(balanceAfter.div(10 ** uint256(ERC20(asset).decimals() - 9)) <= MAX_UINT64, "bridge balance would exceed maximum");

            asset_address = bytes32(uint256(asset));
        }

        // Check here after truncation
        require(amount != 0, "truncated amount must not be 0");

        emit LogTokensLocked(target_chain, asset_chain, decimals, asset_address, bytes32(uint256(msg.sender)), recipient, amount, nonce);
    }

    function lockETH(
        bytes32 recipient,
        uint8 target_chain,
        uint32 nonce
    ) public payable nonReentrant {
        require(target_chain != CHAIN_ID, "must not transfer to the same chain");

        uint256 remainder = msg.value.mod(10 ** 9);
        uint256 transfer_amount = msg.value.div(10 ** 9);
        require(transfer_amount != 0, "truncated amount must not be 0");

        // Transfer back remainder
        msg.sender.transfer(remainder);

        // Wrap tx value in WETH
        WETH(WETHAddress).deposit{value : msg.value - remainder}();

        // Log deposit of WETH
        emit LogTokensLocked(target_chain, CHAIN_ID, 9, bytes32(uint256(WETHAddress)), bytes32(uint256(msg.sender)), recipient, transfer_amount, nonce);
    }

    fallback() external payable {revert("please use lockETH to transfer ETH to Solana");}

    receive() external payable {revert("please use lockETH to transfer ETH to Solana");}
}


interface WETH is IERC20 {
    function deposit() external payable;

    function withdraw(uint256 amount) external;
}

File 3 of 10 : WrappedAsset.sol
// contracts/WrappedAsset.sol
// SPDX-License-Identifier: Apache 2
pragma solidity ^0.6.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/GSN/Context.sol";

contract WrappedAsset is IERC20, Context {
    uint8 public assetChain;
    bytes32 public assetAddress;
    bool public initialized;
    address public bridge;

    function initialize(uint8 _assetChain, bytes32 _assetAddress, uint8 decimals) public {
        require(!initialized, "already initialized");
        // Set local fields
        assetChain = _assetChain;
        assetAddress = _assetAddress;
        bridge = msg.sender;
        initialized = true;

        _symbol = "WWT";
        _decimals = decimals;
    }

    function mint(address account, uint256 amount) external {
        require(msg.sender == bridge, "mint can only be called by the bridge");

        _mint(account, amount);
    }

    function burn(address account, uint256 amount) external {
        require(msg.sender == bridge, "burn can only be called by the bridge");

        _burn(account, amount);
    }

    // Taken from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
    // Licensed under MIT

    using SafeMath for uint256;
    using Address for address;

    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _symbol;
    uint8 private _decimals = 18;

    /**
     * @dev Returns the name of the token.
     */
    function name() public view returns (string memory) {
        return string(abi.encodePacked("Wormhole Wrapped - ", uintToString(assetChain), "-", assetAddressString()));
    }

    // https://ethereum.stackexchange.com/a/40977
    function uintToString(uint _i) internal pure returns (string memory _uintAsString) {
        if (_i == 0) {
            return "0";
        }
        uint j = _i;
        uint len;
        while (j != 0) {
            len++;
            j /= 10;
        }
        bytes memory bstr = new bytes(len);
        uint k = len - 1;
        while (_i != 0) {
            bstr[k--] = byte(uint8(48 + _i % 10));
            _i /= 10;
        }
        return string(bstr);
    }

    // https://ethereum.stackexchange.com/a/58341
    function assetAddressString() private view returns (string memory) {
        bytes memory alphabet = "0123456789abcdef";
        bytes32 data = assetAddress;

        bytes memory str = new bytes(2 + data.length * 2);
        for (uint i = 0; i < data.length; i++) {
            str[i * 2] = alphabet[uint(uint8(data[i] >> 4))];
            str[1 + i * 2] = alphabet[uint(uint8(data[i] & 0x0f))];
        }
        return string(str);
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
     * called.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view returns (uint8) {
        return _decimals;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20};
     *
     * Requirements:
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(address sender, address recipient, uint256 amount) internal {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements
     *
     * - `to` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal {
        require(account != address(0), "ERC20: mint to the zero address");

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal {
        require(account != address(0), "ERC20: burn from the zero address");

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
     *
     * This is internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner, address spender, uint256 amount) internal {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal {
        _decimals = decimals_;
    }
}

File 4 of 10 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 5 of 10 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot 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-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

File 6 of 10 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

import "../../GSN/Context.sol";
import "./IERC20.sol";
import "../../math/SafeMath.sol";
import "../../utils/Address.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of ERC20 applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20 {
    using SafeMath for uint256;
    using Address for address;

    mapping (address => uint256) private _balances;

    mapping (address => mapping (address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory name, string memory symbol) public {
        _name = name;
        _symbol = symbol;
        _decimals = 18;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
     * called.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view returns (uint8) {
        return _decimals;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20};
     *
     * Requirements:
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(address sender, address recipient, uint256 amount) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements
     *
     * - `to` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner, address spender, uint256 amount) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal {
        _decimals = decimals_;
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be to transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}

File 7 of 10 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 8 of 10 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

import "./IERC20.sol";
import "../../math/SafeMath.sol";
import "../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    using Address for address;

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 9 of 10 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.2;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies in extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return _functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 10 of 10 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "istanbul",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"components":[{"internalType":"address[]","name":"keys","type":"address[]"},{"internalType":"uint32","name":"expiration_time","type":"uint32"}],"internalType":"struct Wormhole.GuardianSet","name":"initial_guardian_set","type":"tuple"},{"internalType":"address","name":"wrapped_asset_master","type":"address"},{"internalType":"uint32","name":"_guardian_set_expirity","type":"uint32"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"oldGuardianIndex","type":"uint32"},{"indexed":false,"internalType":"uint32","name":"newGuardianIndex","type":"uint32"}],"name":"LogGuardianSetChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"target_chain","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"token_chain","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"token_decimals","type":"uint8"},{"indexed":true,"internalType":"bytes32","name":"token","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"sender","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"recipient","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint32","name":"nonce","type":"uint32"}],"name":"LogTokensLocked","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"consumedVAAs","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"idx","type":"uint32"}],"name":"getGuardianSet","outputs":[{"components":[{"internalType":"address[]","name":"keys","type":"address[]"},{"internalType":"uint32","name":"expiration_time","type":"uint32"}],"internalType":"struct Wormhole.GuardianSet","name":"gs","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"guardian_set_expirity","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"guardian_set_index","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"","type":"uint32"}],"name":"guardian_sets","outputs":[{"internalType":"uint32","name":"expiration_time","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isWrappedAsset","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"recipient","type":"bytes32"},{"internalType":"uint8","name":"target_chain","type":"uint8"},{"internalType":"uint32","name":"nonce","type":"uint32"},{"internalType":"bool","name":"refund_dust","type":"bool"}],"name":"lockAssets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"recipient","type":"bytes32"},{"internalType":"uint8","name":"target_chain","type":"uint8"},{"internalType":"uint32","name":"nonce","type":"uint32"}],"name":"lockETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes","name":"vaa","type":"bytes"}],"name":"parseAndVerifyVAA","outputs":[{"components":[{"internalType":"uint8","name":"version","type":"uint8"},{"internalType":"bytes32","name":"hash","type":"bytes32"},{"internalType":"uint32","name":"guardian_set_index","type":"uint32"},{"internalType":"uint32","name":"timestamp","type":"uint32"},{"internalType":"uint8","name":"action","type":"uint8"},{"internalType":"bytes","name":"payload","type":"bytes"}],"internalType":"struct Wormhole.ParsedVAA","name":"parsed_vaa","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"vaa","type":"bytes"}],"name":"submitVAA","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wrappedAssetMaster","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"wrappedAssets","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040526001805460ff60a01b1916600160a11b1790553480156200002457600080fd5b50604051620028d4380380620028d48339810160408190526200004791620001b5565b600160009081558052600260209081528351805185927fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b92620000919284929190910190620000f7565b50602091909101516001918201805463ffffffff191663ffffffff928316179055600380546001600160401b03191664010000000094909216939093021790915580546001600160a01b0319166001600160a01b03929092169190911790555062000314565b8280548282559060005260206000209081019282156200014f579160200282015b828111156200014f57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000118565b506200015d92915062000161565b5090565b5b808211156200015d5780546001600160a01b031916815560010162000162565b80516001600160a01b03811681146200019a57600080fd5b92915050565b805163ffffffff811681146200019a57600080fd5b600080600060608486031215620001ca578283fd5b83516001600160401b0380821115620001e1578485fd5b9085019060408288031215620001f5578485fd5b620002016040620002d7565b82518281111562000210578687fd5b8301601f8101891362000221578687fd5b80518381111562000230578788fd5b6020935083810262000244858201620002d7565b8281528581019084870183860188018e10156200025f578b8cfd5b8b95505b848610156200028d57620002788e8262000182565b83526001959095019491870191870162000263565b508086525050505050620002a488838501620001a0565b818301529450620002b88787830162000182565b935050506040840151620002cc81620002fe565b809150509250925092565b6040518181016001600160401b0381118282101715620002f657600080fd5b604052919050565b63ffffffff811681146200031157600080fd5b50565b6125b080620003246000396000f3fe6080604052600436106100ab5760003560e01c8063707139601161006457806370713960146101c3578063822d82b3146101e357806399da1d3c146101f8578063a31fe4091461021a578063b6694c2a1461023a578063f951975a1461025a576100d1565b80631a2be4da146100e95780633bc0aee61461011f57806342b0aefa146101415780634db478401461016e57806358d62e4614610183578063600b9aa614610196576100d1565b366100d15760405162461bcd60e51b81526004016100c890611fb0565b60405180910390fd5b60405162461bcd60e51b81526004016100c890611fb0565b3480156100f557600080fd5b50610109610104366004611c59565b610287565b6040516101169190611ece565b60405180910390f35b34801561012b57600080fd5b5061013f61013a366004611d6b565b61029c565b005b34801561014d57600080fd5b5061016161015c366004611dd8565b610386565b60405161011691906124b1565b34801561017a57600080fd5b506101616103a1565b61013f610191366004611d2d565b6103b5565b3480156101a257600080fd5b506101b66101b1366004611d6b565b610559565b6040516101169190612452565b3480156101cf57600080fd5b5061013f6101de366004611c74565b610b43565b3480156101ef57600080fd5b50610161611045565b34801561020457600080fd5b5061020d611051565b6040516101169190611e7d565b34801561022657600080fd5b50610109610235366004611cfd565b611060565b34801561024657600080fd5b5061020d610255366004611cfd565b611075565b34801561026657600080fd5b5061027a610275366004611dd8565b611090565b60405161011691906123e7565b60066020526000908152604090205460ff1681565b600260005414156102bf5760405162461bcd60e51b81526004016100c890612382565b60026000556102cc611b5b565b6102d68383610559565b9050806080015160ff166001141561032957600354604082015163ffffffff9081169116146103175760405162461bcd60e51b81526004016100c890611ffc565b6103248160a00151611128565b61035e565b806080015160ff1660101415610346576103248160a00151611309565b60405162461bcd60e51b81526004016100c890611f4d565b6020908101516000908152600490915260408120805460ff1916600190811790915590555050565b60026020526000908152604090206001015463ffffffff1681565b600354640100000000900463ffffffff1681565b600260005414156103d85760405162461bcd60e51b81526004016100c890612382565b600260005560015460ff838116600160a01b90920416141561040c5760405162461bcd60e51b81526004016100c8906120bc565b600061041c34633b9aca00611565565b9050600061042e34633b9aca006115b0565b90508061044d5760405162461bcd60e51b81526004016100c89061216f565b604051339083156108fc029084906000818181858888f1935050505015801561047a573d6000803e3d6000fd5b5073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db08334036040518263ffffffff1660e01b81526004016000604051808303818588803b1580156104cc57600080fd5b505af11580156104e0573d6000803e3d6000fd5b505060015460405133945073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc293507f6bbd554ad75919f71fd91bf917ca6e4f41c10f03ab25751596a22253bb39aab89250610545918991600160a01b90910460ff16906009908c9089908c906124f6565b60405180910390a350506001600055505050565b610561611b5b565b6105a5600084848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092939250506115f29050565b60ff168082526001146105ca5760405162461bcd60e51b81526004016100c890612085565b61060e600184848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092939250506116219050565b63ffffffff1660408083019190915280516020601f850181900481028201810190925283815260009161066191600591879087908190840183828082843760009201919091525092939250506115f29050565b60ff16905060008160420260060190506106b48186868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092939250506116219050565b63ffffffff166060840152604080516020601f87018190048102820181019092528581526107069183918288039189908990819084018382808284376000920191909152509294939250506116509050565b805160209182012084820181905260009081526004909152604090205460ff16156107435760405162461bcd60e51b81526004016100c890611f79565b61074b611b92565b60408085015163ffffffff166000908152600260209081529082902082518154606093810282018401855293810184815290939192849284918401828280156107bd57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161079f575b50505091835250506001919091015463ffffffff166020909101528051519091506107fa5760405162461bcd60e51b81526004016100c8906123b9565b602081015163ffffffff16158061081a575042816020015163ffffffff16115b6108365760405162461bcd60e51b81526004016100c890612241565b82600a6003836000015151600a028161084b57fe5b046002028161085657fe5b0460010111156108785760405162461bcd60e51b81526004016100c8906121e7565b60001960005b84811015610a965760006108d1826042026006018a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092939250506115f29050565b90508260010b8160ff16136108f85760405162461bcd60e51b81526004016100c8906122af565b8060ff1692506000610949836042026007018b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092939250506116e39050565b90506000610996846042026027018c8c8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092939250506116e39050565b905060006109e3856042026047018d8d8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092939250506115f29050565b87518051601b90920192509060ff86169081106109fc57fe5b60200260200101516001600160a01b031660018b6020015183868660405160008152602001604052604051610a349493929190611ed9565b6020604051602081039080840390855afa158015610a56573d6000803e3d6000fd5b505050602060405103516001600160a01b031614610a865760405162461bcd60e51b81526004016100c8906120ff565b50506001909201915061087e9050565b50610add8360040188888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092939250506115f29050565b60ff166080860152604080516020601f8901819004810282018101909252878152610b33916005860191600419878b0301918b908b90819084018382808284376000920191909152509294939250506116509050565b60a0860152509295945050505050565b60026000541415610b665760405162461bcd60e51b81526004016100c890612382565b600260005560015460ff848116600160a01b909204161415610b9a5760405162461bcd60e51b81526004016100c8906120bc565b6000600160149054906101000a900460ff169050600080886001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015610bea57600080fd5b505afa158015610bfe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c229190611dfc565b6001600160a01b038a1660009081526006602052604090205490915060ff1615610d9157604051632770a7eb60e21b81526001600160a01b038a1690639dc29fac90610c749033908c90600401611e91565b600060405180830381600087803b158015610c8e57600080fd5b505af1158015610ca2573d6000803e3d6000fd5b50505050886001600160a01b031663026b05396040518163ffffffff1660e01b815260040160206040518083038186803b158015610cdf57600080fd5b505afa158015610cf3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d179190611dfc565b9250886001600160a01b0316631ba46cfd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d5257600080fd5b505afa158015610d66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8a9190611d15565b9150610fc9565b6040516370a0823160e01b81526000906001600160a01b038b16906370a0823190610dc0903090600401611e7d565b60206040518083038186803b158015610dd857600080fd5b505afa158015610dec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e109190611d15565b9050610e276001600160a01b038b1633308c611712565b6040516370a0823160e01b81526000906001600160a01b038c16906370a0823190610e56903090600401611e7d565b60206040518083038186803b158015610e6e57600080fd5b505afa158015610e82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ea69190611d15565b9050610eb28183611770565b995060098360ff161115610f0c5789610ed58160ff600819870116600a0a6115b0565b9a508615610f0657610f0633610ef58360ff600819890116600a0a611565565b6001600160a01b038f1691906117b2565b60099350505b67ffffffffffffffff8016610f9c60098d6001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015610f5557600080fd5b505afa158015610f69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f8d9190611dfc565b849160ff910316600a0a6115b0565b1115610fba5760405162461bcd60e51b81526004016100c890611f0a565b50506001600160a01b03891691505b87610fe65760405162461bcd60e51b81526004016100c89061216f565b336001600160a01b031660001b827f6bbd554ad75919f71fd91bf917ca6e4f41c10f03ab25751596a22253bb39aab88886858c8e8c60405161102d969594939291906124f6565b60405180910390a35050600160005550505050505050565b60035463ffffffff1681565b6001546001600160a01b031681565b60046020526000908152604090205460ff1681565b6005602052600090815260409020546001600160a01b031681565b611098611b92565b63ffffffff8216600090815260026020908152604091829020825181546060938102820184018552938101848152909391928492849184018282801561110757602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116110e9575b50505091835250506001919091015463ffffffff1660209091015292915050565b60006111348282611621565b60035490915063ffffffff80831691811660010116146111665760405162461bcd60e51b81526004016100c8906121a6565b60006111738360046115f2565b905060608160ff1667ffffffffffffffff8111801561119157600080fd5b506040519080825280602002602001820160405280156111bb578160200160208202803683370190505b50905060005b8260ff1681101561120e5760006111de86600560148502016117d6565b9050808383815181106111ed57fe5b6001600160a01b0390921660209283029190910190910152506001016111c1565b506003805463ffffffff85811663ffffffff1983161790925516611230611b92565b506040805180820182528381526000602080830182905260035463ffffffff16825260028152929020815180519293849361126e9284920190611baa565b506020918201516001918201805463ffffffff1990811663ffffffff9384161790915560038054878416600090815260029096526040958690209094018054909216640100000000909404831642018316939093179055905491517fdfb80683934199683861bf00b64ecdf0984bbaf661bf27983dba382e99297a62926112f99286929116906124c2565b60405180910390a1505050505050565b60006113168260046115f2565b905060006113258360056115f2565b905060006113348460326117d6565b905060006113438560466115f2565b905060006113528660686116e3565b90508360ff168560ff16141561137a5760405162461bcd60e51b81526004016100c89061233c565b60015460ff858116600160a01b90920416146113a85760405162461bcd60e51b81526004016100c89061220a565b60015460ff838116600160a01b909204161461149f5760006113cb8760476116e3565b9050600083826040516020016113e2929190611e60565b60408051601f198184030181529181528151602092830120600081815260059093529120549091506001600160a01b0316806114375760006114258a60676115f2565b90506114338387868461180c565b9150505b6040516340c10f1960e01b81526001600160a01b038216906340c10f19906114659089908890600401611e91565b600060405180830381600087803b15801561147f57600080fd5b505af1158015611493573d6000803e3d6000fd5b5050505050505061155d565b60006114ac8760536117d6565b90506000816001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156114e957600080fd5b505afa1580156114fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115219190611dfc565b905060098160ff161115611546576115438360ff600819840116600a0a61191a565b92505b61155a6001600160a01b03831686856117b2565b50505b505050505050565b60006115a783836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000815250611954565b90505b92915050565b60006115a783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611988565b600081600101835110156116185760405162461bcd60e51b81526004016100c890612059565b50016001015190565b600081600401835110156116475760405162461bcd60e51b81526004016100c890612059565b50016004015190565b6060818301845110156116755760405162461bcd60e51b81526004016100c890612059565b606082158015611690576040519150602082016040526116da565b6040519150601f8416801560200281840101858101878315602002848b0101015b818310156116c95780518352602092830192016116b1565b5050858452601f01601f1916604052505b50949350505050565b600081602001835110156117095760405162461bcd60e51b81526004016100c890612059565b50016020015190565b61176a846323b872dd60e01b85858560405160240161173393929190611eaa565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526119bf565b50505050565b60006115a783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611a4e565b6117d18363a9059cbb60e01b8484604051602401611733929190611e91565b505050565b600081601401835110156117fc5760405162461bcd60e51b81526004016100c890612059565b500160200151600160601b900490565b600154604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b815260609190911b6bffffffffffffffffffffffff1916601482018190526e5af43d82803e903d91602b57fd5bf360881b60288301526000918660378285f560405163a7a2d3fb60e01b81529093506001600160a01b038416915063a7a2d3fb9061189d908890889088906004016124d9565b600060405180830381600087803b1580156118b757600080fd5b505af11580156118cb573d6000803e3d6000fd5b5050506000968752505060056020908152604080872080546001600160a01b0319166001600160a01b03851690811790915587526006909152909420805460ff19166001179055509192915050565b600082611929575060006115aa565b8282028284828161193657fe5b04146115a75760405162461bcd60e51b81526004016100c89061212e565b600081836119755760405162461bcd60e51b81526004016100c89190611ef7565b5082848161197f57fe5b06949350505050565b600081836119a95760405162461bcd60e51b81526004016100c89190611ef7565b5060008385816119b557fe5b0495945050505050565b6060611a14826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611a7a9092919063ffffffff16565b8051909150156117d15780806020019051810190611a329190611ce1565b6117d15760405162461bcd60e51b81526004016100c8906122f2565b60008184841115611a725760405162461bcd60e51b81526004016100c89190611ef7565b505050900390565b6060611a898484600085611a91565b949350505050565b6060611a9c85611b55565b611ab85760405162461bcd60e51b81526004016100c890612278565b60006060866001600160a01b03168587604051611ad59190611e44565b60006040518083038185875af1925050503d8060008114611b12576040519150601f19603f3d011682016040523d82523d6000602084013e611b17565b606091505b50915091508115611b2b579150611a899050565b805115611b3b5780518082602001fd5b8360405162461bcd60e51b81526004016100c89190611ef7565b3b151590565b6040805160c0810182526000808252602082018190529181018290526060808201839052608082019290925260a081019190915290565b60408051808201909152606081526000602082015290565b828054828255906000526020600020908101928215611bff579160200282015b82811115611bff57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611bca565b50611c0b929150611c0f565b5090565b5b80821115611c0b5780546001600160a01b0319168155600101611c10565b80356001600160a01b03811681146115aa57600080fd5b803563ffffffff811681146115aa57600080fd5b600060208284031215611c6a578081fd5b6115a78383611c2e565b60008060008060008060c08789031215611c8c578182fd5b611c968888611c2e565b955060208701359450604087013593506060870135611cb48161256b565b9250611cc38860808901611c45565b915060a0870135611cd38161255a565b809150509295509295509295565b600060208284031215611cf2578081fd5b81516115a78161255a565b600060208284031215611d0e578081fd5b5035919050565b600060208284031215611d26578081fd5b5051919050565b600080600060608486031215611d41578283fd5b833592506020840135611d538161256b565b9150611d628560408601611c45565b90509250925092565b60008060208385031215611d7d578182fd5b823567ffffffffffffffff80821115611d94578384fd5b818501915085601f830112611da7578384fd5b813581811115611db5578485fd5b866020828501011115611dc6578485fd5b60209290920196919550909350505050565b600060208284031215611de9578081fd5b813563ffffffff811681146115a7578182fd5b600060208284031215611e0d578081fd5b81516115a78161256b565b60008151808452611e3081602086016020860161252e565b601f01601f19169290920160200192915050565b60008251611e5681846020870161252e565b9190910192915050565b60f89290921b6001600160f81b0319168252600182015260210190565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b901515815260200190565b93845260ff9290921660208401526040830152606082015260800190565b6000602082526115a76020830184611e18565b60208082526023908201527f6272696467652062616c616e636520776f756c6420657863656564206d6178696040820152626d756d60e81b606082015260800190565b60208082526012908201527134b73b30b634b2102b20a09030b1ba34b7b760711b604082015260600190565b60208082526018908201527f5641412077617320616c72656164792065786563757465640000000000000000604082015260600190565b6020808252602c908201527f706c6561736520757365206c6f636b45544820746f207472616e73666572204560408201526b544820746f20536f6c616e6160a01b606082015260800190565b60208082526039908201527f6f6e6c79207468652063757272656e7420677561726469616e2073657420636160408201527f6e206368616e67652074686520677561726469616e2073657400000000000000606082015260800190565b60208082526012908201527152656164206f7574206f6620626f756e647360701b604082015260600190565b60208082526018908201527f5641412076657273696f6e20696e636f6d70617469626c650000000000000000604082015260600190565b60208082526023908201527f6d757374206e6f74207472616e7366657220746f207468652073616d6520636860408201526230b4b760e91b606082015260800190565b602080825260159082015274159050481cda59db985d1d5c99481a5b9d985b1a59605a1b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252601e908201527f7472756e636174656420616d6f756e74206d757374206e6f7420626520300000604082015260600190565b60208082526021908201527f696e646578206d75737420696e63726561736520696e207374657073206f66206040820152603160f81b606082015260800190565b6020808252600990820152686e6f2071756f72756d60b81b604082015260600190565b60208082526019908201527f7472616e73666572206d75737420626520696e636f6d696e6700000000000000604082015260600190565b60208082526018908201527f677561726469616e207365742068617320657870697265640000000000000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526023908201527f7369676e617475726520696e6469636573206d75737420626520617363656e64604082015262696e6760e81b606082015260800190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60208082526026908201527f73616d6520636861696e207472616e736665727320617265206e6f74207375706040820152651c1bdc9d195960d21b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252601490820152731a5b9d985b1a590819dd585c991a585b881cd95d60621b604082015260600190565b6020808252825160408383015280516060840181905260009291820190839060808601905b808310156124355783516001600160a01b0316825292840192600192909201919084019061240c565b5063ffffffff848801511660408701528094505050505092915050565b60006020825260ff835116602083015260208301516040830152604083015163ffffffff8082166060850152806060860151166080850152505060ff60808401511660a083015260a083015160c080840152611a8960e0840182611e18565b63ffffffff91909116815260200190565b63ffffffff92831681529116602082015260400190565b60ff93841681526020810192909252909116604082015260600190565b60ff968716815294861660208601529290941660408401526060830152608082019290925263ffffffff90911660a082015260c00190565b60005b83811015612549578181015183820152602001612531565b8381111561176a5750506000910152565b801515811461256857600080fd5b50565b60ff8116811461256857600080fdfea2646970667358221220efee3aa0256bf0285f463a6d366d44803785dbf94307fcbbb6dede96231639a564736f6c634300060c003300000000000000000000000000000000000000000000000000000000000000600000000000000000000000009a5e27995309a03f8b583febde7ef289fccdc6ae00000000000000000000000000000000000000000000000000000000000151800000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000007580aa7e036dc199bf0e152c71004716ae0aa747

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000000000000000000000000000000000000000000600000000000000000000000009a5e27995309a03f8b583febde7ef289fccdc6ae00000000000000000000000000000000000000000000000000000000000151800000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000007580aa7e036dc199bf0e152c71004716ae0aa747

-----Decoded View---------------
Arg [0] : initial_guardian_set (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [1] : wrapped_asset_master (address): 0x9a5e27995309a03f8b583febde7ef289fccdc6ae
Arg [2] : _guardian_set_expirity (uint32): 86400

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 0000000000000000000000009a5e27995309a03f8b583febde7ef289fccdc6ae
Arg [2] : 0000000000000000000000000000000000000000000000000000000000015180
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [6] : 0000000000000000000000007580aa7e036dc199bf0e152c71004716ae0aa747


Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.