Contract 0x887fDe9e7f1BDB3A862A43E2E028c3CEEF51c170 3

Contract Overview

Balance:
2.52286231 AVAX
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x07290b737b0627c4ea15cd04939845da8f2937e1c22746ad4e239a959ec41081Withdraw ETH137103652022-09-20 11:43:506 days 19 hrs ago0x80805ae3cbe23715c1f1807a03c5fb669541c2a9 IN 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700 AVAX0.0010792655 26.5
0xac714ff82b7d8c3eb515ea4d1c3151620cd08a85193d9abded3860f5cb88c299Deposit ETH137103522022-09-20 11:43:246 days 19 hrs ago0x80805ae3cbe23715c1f1807a03c5fb669541c2a9 IN 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700.00001 AVAX0.0012071545 26.5
0xfbb8b575af2b27be7f97235e15eee8a02b3ce5c06bbb20e5658543e2e38dec95Withdraw ETH137097442022-09-20 11:23:066 days 19 hrs ago0x80805ae3cbe23715c1f1807a03c5fb669541c2a9 IN 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700 AVAX0.001382104386 33.925829945
0xcdb6cacdb295bb06f1ac03092db8d9771121879ee576c7415a52e67ebcc77044Deposit ETH137097372022-09-20 11:22:516 days 19 hrs ago0x80805ae3cbe23715c1f1807a03c5fb669541c2a9 IN 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700.1 AVAX0.001406807647 30.882875943
0x68fa58716389c1bf00461784d7a15a94c0a0724216976c76f3594eaa630b9237Withdraw ETH137096862022-09-20 11:21:096 days 19 hrs ago0x80805ae3cbe23715c1f1807a03c5fb669541c2a9 IN 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700 AVAX0.0010795835 26.5
0x3084634224565adc01ce571c1543e8e5b45954ef0e903a1fd6fde94967285dd7Deposit ETH137095662022-09-20 11:17:106 days 19 hrs ago0x80805ae3cbe23715c1f1807a03c5fb669541c2a9 IN 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700.1 AVAX0.0012071545 26.5
0x1749ae4ee72d6d33e104dc99c868062cfbfcfddd88adb8d405e27c04e4646193Deposit ETH126175962022-08-17 13:43:5340 days 17 hrs ago0xf97b3e57773086244ad9ef9ef89520b29640e044 IN 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1701 AVAX0.001249291025 27.425
0x797cb470695da67ab7995b83c705f306523e7bab01aae0b28cae1bcfef8fee5dDeposit ETH119703422022-07-26 23:28:3362 days 7 hrs ago0x4e04235a0dc6ecbbcf2dec4312cdf0b5bae1e691 IN 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700.2 AVAX0.0007540045 26.5
0x4664953b7e5cf5046dd096dc2cea467bf2f5465820e6ce3554f95ba69979edaeWithdraw ETH117938882022-07-21 2:33:2168 days 4 hrs ago0xa56a762cc7b19f7e7188677f06679b4532f64878 IN 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700 AVAX0.001117267075 27.425
0xdc8e8938d313eb5adf8454833176cfea767509082fc9067e79219c884f93b035Deposit ETH117480732022-07-19 21:44:3069 days 9 hrs ago0xa56a762cc7b19f7e7188677f06679b4532f64878 IN 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700.2 AVAX0.0007540045 26.5
0x63a9f2d733b43d769514208f9fc8d20af29250a1749a5df3fc313d49d876ffcaDeposit ETH117480612022-07-19 21:44:0369 days 9 hrs ago0xa56a762cc7b19f7e7188677f06679b4532f64878 IN 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700.1 AVAX0.0012071545 26.5
0x7ef3807ada04a330f4de92b609fbcd1dd82ce88e51a821785cc4d5a9875f2691Deposit ETH103251902022-06-02 17:30:48116 days 13 hrs ago0x16b9f66674c02ba3c4e753d56370fb27bc89312b IN 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700.1 AVAX0.001249291025 27.425
0x3e572ebad0ed9716750537eaf338884007ab0a6619e9e28ca8618f045a704e09Deposit ETH93570092022-05-06 11:30:08143 days 19 hrs ago0x4a2c2501d26ff3ac30bd0aabfb48471b411852a1 IN 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700.1 AVAX0.0012071545 26.5
0xdec33cca6f49e776c9df943d0edccd3ec9a41c7026ce4089d60a34493846354bDeposit ETH80636682022-04-01 21:50:36178 days 9 hrs ago0x108f4110382963db011a98e98480490dd9a85f71 IN 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700.1 AVAX0.0007540045 26.5
0x73fa8f1b8d3f3f1b6f8c2b218433db4dbfcb97348ccd36d158eed8261ec0c176Deposit ETH76771592022-03-23 13:56:12187 days 17 hrs ago0xabc6ecc124f89917bbb325c9032fef8b61bc97fb IN 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700.1 AVAX0.0007540045 26.5
0x576861ce91fe4a91d78444377c12f0cc6283af05ddbc443d9cffd8ef2df99b2fDeposit ETH76336652022-03-22 13:50:17188 days 17 hrs ago0xabc6ecc124f89917bbb325c9032fef8b61bc97fb IN 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700.1 AVAX0.001138825 25
0x943aad0efaa258c697b6d277b0baf28fe6078953c827e6b81bcd298f13b01adeDeposit ETH75956842022-03-21 16:35:19189 days 14 hrs ago0x3820aaecb476da10a9ace2b21a0a3495b6d3f5e2 IN 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700.01 AVAX0.001138825 25
0xeb20d4c06dddc1de8f4f59a9bec479fcff7a7e831518b620b32867b8d96f5cc4Deposit ETH75672792022-03-21 0:42:09190 days 6 hrs ago0x108f4110382963db011a98e98480490dd9a85f71 IN 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700.5 AVAX0.001138825 25
0x8ce4ecbaa2bba16e7622487f7462ca7877581b38d9b00f5199fd4d0157049de0Deposit ETH74268072022-03-17 18:18:37193 days 12 hrs ago0xc061a9fd025cb0fd48c5832f3c718a73e17cdd53 IN 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1701 AVAX0.001138825 25
0x87a8bda1f19bd18dc91745744188a8f5beb93e4bbd18cd948802af87c681f12cWithdraw ETH74265992022-03-17 18:11:42193 days 12 hrs ago0x4e04235a0dc6ecbbcf2dec4312cdf0b5bae1e691 IN 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700 AVAX0.001018775 25
0xf1b41d47b773645332b10848ac64db6b6055857862d52f6600cbc42392de6c31Withdraw ETH73709862022-03-16 11:16:44194 days 19 hrs ago0x4e04235a0dc6ecbbcf2dec4312cdf0b5bae1e691 IN 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700 AVAX0.001018475 25
0xf48cdc1d6fb47785196eed0d18ecafe8664aee8e731e3f5d8043efeabc313f46Deposit ETH73709752022-03-16 11:16:23194 days 19 hrs ago0x4e04235a0dc6ecbbcf2dec4312cdf0b5bae1e691 IN 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1701 AVAX0.000711325 25
0x84581aaa9fe15af008ebec8c04d513e16e8e6bdde073621342f46d0b48c8797cDeposit ETH73696312022-03-16 10:31:00194 days 20 hrs ago0x4e04235a0dc6ecbbcf2dec4312cdf0b5bae1e691 IN 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1701 AVAX0.001138825 25
0x639da8ea49ad85d31fd001f9346173a2378e26ca2a11e52bb5d1575f1074ebc70x60e0604073693032022-03-16 10:20:00194 days 20 hrs ago0x7db8d33114462e032e5bf636d271f8680619ba25 IN  Create: FundsRouter0 AVAX0.0217359525
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x07290b737b0627c4ea15cd04939845da8f2937e1c22746ad4e239a959ec41081137103652022-09-20 11:43:506 days 19 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700x80805ae3cbe23715c1f1807a03c5fb669541c2a90.00001 AVAX
0xfbb8b575af2b27be7f97235e15eee8a02b3ce5c06bbb20e5658543e2e38dec95137097442022-09-20 11:23:066 days 19 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700x80805ae3cbe23715c1f1807a03c5fb669541c2a90.1 AVAX
0x68fa58716389c1bf00461784d7a15a94c0a0724216976c76f3594eaa630b9237137096862022-09-20 11:21:096 days 19 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700x80805ae3cbe23715c1f1807a03c5fb669541c2a90.1 AVAX
0x4664953b7e5cf5046dd096dc2cea467bf2f5465820e6ce3554f95ba69979edae117938882022-07-21 2:33:2168 days 4 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700xa56a762cc7b19f7e7188677f06679b4532f648780.1 AVAX
0x300f1639efa5177a2d6336dac4a15cdde3feb0038e2ed9e3546e1b67758fb8a1103414562022-06-03 3:46:53116 days 3 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c170 0xa0f25b796dd59e504077f87caea1c0472cd6b7b40.0006825 AVAX
0x300f1639efa5177a2d6336dac4a15cdde3feb0038e2ed9e3546e1b67758fb8a1103414562022-06-03 3:46:53116 days 3 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700x109a2b534488791c0f0c6a531612ea38cba497f30 AVAX
0x300f1639efa5177a2d6336dac4a15cdde3feb0038e2ed9e3546e1b67758fb8a1103414562022-06-03 3:46:53116 days 3 hrs ago 0x457b8bb4d6c8cc2e506789f768996ddae60cd4fd0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700 AVAX
0x26d9db03cdf281482d525ad39cd79a3b389db6c2bcfd99874e905f6ccd17cc14103414512022-06-03 3:46:39116 days 3 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c170 0xa0f25b796dd59e504077f87caea1c0472cd6b7b40.0006825 AVAX
0x26d9db03cdf281482d525ad39cd79a3b389db6c2bcfd99874e905f6ccd17cc14103414512022-06-03 3:46:39116 days 3 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700x109a2b534488791c0f0c6a531612ea38cba497f30 AVAX
0x26d9db03cdf281482d525ad39cd79a3b389db6c2bcfd99874e905f6ccd17cc14103414512022-06-03 3:46:39116 days 3 hrs ago 0x457b8bb4d6c8cc2e506789f768996ddae60cd4fd0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700 AVAX
0xa0767af73e2f75b033e8153b58358b6cd7370df85cbb9c090ad35273842baebb103414422022-06-03 3:46:14116 days 3 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c170 0xa0f25b796dd59e504077f87caea1c0472cd6b7b40.0006825 AVAX
0xa0767af73e2f75b033e8153b58358b6cd7370df85cbb9c090ad35273842baebb103414422022-06-03 3:46:14116 days 3 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700x109a2b534488791c0f0c6a531612ea38cba497f30 AVAX
0xa0767af73e2f75b033e8153b58358b6cd7370df85cbb9c090ad35273842baebb103414422022-06-03 3:46:14116 days 3 hrs ago 0x457b8bb4d6c8cc2e506789f768996ddae60cd4fd0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700 AVAX
0x37d138bb334d10940f78ad843ba63bc1d6d8200861b606d4c70548c3dcb0aa75103414342022-06-03 3:45:52116 days 3 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c170 0xa0f25b796dd59e504077f87caea1c0472cd6b7b40.0006825 AVAX
0x37d138bb334d10940f78ad843ba63bc1d6d8200861b606d4c70548c3dcb0aa75103414342022-06-03 3:45:52116 days 3 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700x109a2b534488791c0f0c6a531612ea38cba497f30 AVAX
0x37d138bb334d10940f78ad843ba63bc1d6d8200861b606d4c70548c3dcb0aa75103414342022-06-03 3:45:52116 days 3 hrs ago 0x457b8bb4d6c8cc2e506789f768996ddae60cd4fd0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700 AVAX
0xaa56d887162e31c01d87cc4c54801de8224d33eec2c07e8d00314ab6956759fb103413372022-06-03 3:41:49116 days 3 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c170 0xa0f25b796dd59e504077f87caea1c0472cd6b7b40.0006825 AVAX
0xaa56d887162e31c01d87cc4c54801de8224d33eec2c07e8d00314ab6956759fb103413372022-06-03 3:41:49116 days 3 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700x109a2b534488791c0f0c6a531612ea38cba497f30 AVAX
0xaa56d887162e31c01d87cc4c54801de8224d33eec2c07e8d00314ab6956759fb103413372022-06-03 3:41:49116 days 3 hrs ago 0x457b8bb4d6c8cc2e506789f768996ddae60cd4fd0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700 AVAX
0x109fe37c5b542e7f2283afa3d6daad189e5113f64b5c4ca2200c8a0d7727494b103412222022-06-03 3:37:28116 days 3 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c170 0xa0f25b796dd59e504077f87caea1c0472cd6b7b40.0006825 AVAX
0x109fe37c5b542e7f2283afa3d6daad189e5113f64b5c4ca2200c8a0d7727494b103412222022-06-03 3:37:28116 days 3 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700x109a2b534488791c0f0c6a531612ea38cba497f30 AVAX
0x109fe37c5b542e7f2283afa3d6daad189e5113f64b5c4ca2200c8a0d7727494b103412222022-06-03 3:37:28116 days 3 hrs ago 0x457b8bb4d6c8cc2e506789f768996ddae60cd4fd0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700 AVAX
0x7ae4d52a3a82cb54ff23335d8cf187147323c709f57958e34229b91d486c0d4a103411892022-06-03 3:36:13116 days 3 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c170 0xa0f25b796dd59e504077f87caea1c0472cd6b7b40.0006825 AVAX
0x7ae4d52a3a82cb54ff23335d8cf187147323c709f57958e34229b91d486c0d4a103411892022-06-03 3:36:13116 days 3 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700x109a2b534488791c0f0c6a531612ea38cba497f30 AVAX
0x7ae4d52a3a82cb54ff23335d8cf187147323c709f57958e34229b91d486c0d4a103411892022-06-03 3:36:13116 days 3 hrs ago 0x457b8bb4d6c8cc2e506789f768996ddae60cd4fd0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700 AVAX
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FundsRouter

Compiler Version
v0.8.6+commit.11564f7e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 4 : FundsRouter.sol
pragma solidity 0.8.6;


import "ReentrancyGuard.sol";
import "Shared.sol";
import "IForwarder.sol";


/**
* @notice   This contract serves as both a router for bundling actions
*           to be automated, along with conditions under which those actions
*           should only be executed under, aswell as a vault for storing ETH
*           to pay the execution fees by Autonomy Network as part of
*           Autonomy's Automation Station. Users can deposit and withdraw
*           funds at any time. This system is designed to be extremely modular
*           where users can use an arbitrary number of conditions with an
*           arbitrary number of calls in an arbitrary order.
* @author   @quantafire (James Key)
*/
contract FundsRouter is ReentrancyGuard, Shared {

    event BalanceChanged(address indexed user, uint newBal);


    // ETH balances to pay for execution fees
    mapping(address => uint) public balances;
    // The Autonomy Registry to send the execution fee to
    address payable public immutable registry;
    // The forwarder used by the Registry to guarantee that calls from it
    // have the correct `user` and `feeAmount` arguments
    IForwarder public immutable regUserFeeVeriForwarder;
    // The forwarder used by this FundsRouter contract to guarantee that
    // calls from it have the correct `user` argument, where the recipient
    // of the call(s) know that the `user` argument is correct
    IForwarder public immutable routerUserVeriForwarder;


    struct FcnData {
        address target;
        bytes callData;
        uint ethForCall;
        bool verifyUser;
    }


    constructor(
        address payable registry_,
        IForwarder regUserFeeVeriForwarder_,
        IForwarder routerUserVeriForwarder_
    ) ReentrancyGuard() {
        registry = registry_;
        regUserFeeVeriForwarder = regUserFeeVeriForwarder_;
        routerUserVeriForwarder = routerUserVeriForwarder_;
    }

    /**
    * @notice   Deposit ETH to fund the execution of requests by `spender`.
    * @param spender    The address that should be credited with the funds.
    */
    function depositETH(address spender) external payable {
        uint newBal = balances[spender] + msg.value;
        balances[spender] = newBal;
        emit BalanceChanged(spender, newBal);
    }

    /**
    * @notice   Withdraw ETH from `msg.sender`'s balance to send to `recipient`.
    * @param recipient  The address to receive the ETH.
    * @param amount The amount of ETH to withdraw.
    */
    function withdrawETH(address payable recipient, uint amount) external nonReentrant {
        uint startBal = balances[msg.sender];
        require(startBal >= amount, "FRouter: not enough funds");

        uint newBal = startBal - amount;
        balances[msg.sender] = newBal;
        recipient.transfer(amount);
        emit BalanceChanged(msg.sender, newBal);
    }

    /**
    * @notice   Forward an arbitrary number of calls. These could be to
    *           contracts that just test a condition, such as time or a price,
    *           or to contracts to execute an action and change the state of
    *           that contract, such as rebalancing a portfolio, or simply
    *           sending ETH. This function takes into account any ETH received
    *           during any of the calls and adds it to `user`'s balance, enabling
    *           requests to be made without any deposited funds if the receiving
    *           contract pays some kind of reward for calling it.
    * @param user   The address of the user who made the request.
    * @param feeAmount  The amount that Autonomy charges to cover the gas cost of
    *                   executing the request each time, plus a small, deterministic
    *                   incentive fee to the bot. Assumed to be denominated in ETH.
    * @param fcnData    An array of FcnData structs to be called in series. Each struct
    *                   specifies everything needed to make each call independently:
    *                    - target - the address to be called
    *                    - callData - the calldata that specifies what function in the target
    *                       should be called (if a contract) along with any input parameters.
    *                    - ethForCall - any ETH that should be sent with the call
    *                    - verifyUser - whether or not the 1st argument of `callData` should
    *                       be guaranteed to be `user`. If `true`, then the call is routed
    *                       through `routerUserVeriForwarder` so that `target` knows it can
    *                       trust the 1st input parameter as correct if
    *                       `msg.sender == routerUserVeriForwarder` from `target`'s perspective.
    *                       The user should make sure that that is true when generating `callData`.
    *                       If `verifyUser` is `false`, the call will just be sent directly from this
    *                       `FundsRouter` contract.
    */
    function forwardCalls(
        address user,
        uint feeAmount,
        FcnData[] calldata fcnData
    ) external nonReentrant returns (bool, bytes memory) {
        require(msg.sender == address(regUserFeeVeriForwarder), "FRouter: not userFeeForw");

        uint userBal = balances[user];
        uint routerStartBal = address(this).balance;
        uint ethSent = 0;

        bool success;
        bytes memory returnData;
        // Iterate through conditions and make sure they're all met
        for (uint i; i < fcnData.length; i++) {
            ethSent += fcnData[i].ethForCall;
            if (fcnData[i].verifyUser) {
                // Ensure that the 1st argument in this call is the user
                require(abi.decode(fcnData[i].callData[4:36], (address)) == user, "FRouter: calldata not user");
                (success, returnData) = routerUserVeriForwarder.forward{value: fcnData[i].ethForCall}(fcnData[i].target, fcnData[i].callData);
            } else {
                (success, returnData) = fcnData[i].target.call{value: fcnData[i].ethForCall}(fcnData[i].callData);
            }

            revertFailedCall(success, returnData);
        }

        uint routerEndBal = address(this).balance;
        // Make sure that funds were siphoned out this contract somehow
        require(routerEndBal + ethSent >= routerStartBal, "FRouter: funds missing");
        uint ethReceivedDuringForwards = routerEndBal + ethSent - routerStartBal;

        // Make sure that the user has enough balance
        // Having both these checks is definitely overkill - need to get rid of 1
        require(userBal + ethReceivedDuringForwards >= ethSent + feeAmount, "FRouter: not enough funds - fee");
        require(userBal + ethReceivedDuringForwards - ethSent - feeAmount == userBal + routerEndBal - routerStartBal - feeAmount, "FRouter: something doesnt add up");
        balances[user] = userBal + ethReceivedDuringForwards - ethSent - feeAmount;

        registry.transfer(feeAmount);
    }

    // Receive ETH from called contracts, perhaps if they have a reward for poking them
    receive() external payable {}
}

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

pragma solidity ^0.8.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].
 */
abstract 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() {
        _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;
    }
}

File 3 of 4 : Shared.sol
pragma solidity 0.8.6;


/**
* @title    Shared contract
* @notice   Holds constants and modifiers that are used in multiple contracts
* @dev      It would be nice if this could be a library, but modifiers can't be exported :(
* @author   Quantaf1re (James Key)
*/
abstract contract Shared {
    address constant internal _ADDR_0 = address(0);
    uint constant internal _E_18 = 10**18;

    function revertFailedCall(bool success, bytes memory returnData) internal {
        // Need this if statement because if the call succeeds, the tx will revert
        // with an EVM error because it can't decode 0x00. If a tx fails with no error
        // message, maybe that's a problem? But if it failed without a message then it's
        // gonna be hard to know what went wrong regardless
        if (!success) {
            // https://github.com/OpenZeppelin/openzeppelin-contracts/blob/d57593c148dad16abe675083464787ca10f789ec/contracts/utils/Address.sol#L210
            if (returnData.length > 0) {
                assembly {
                    let returndata_size := mload(returnData)
                    revert(add(32, returnData), returndata_size)
                }
            } else {
                revert("No error message!");
            }
        }
    }

    /// @dev    Checks that a uint isn't nonzero/empty
    modifier nzUint(uint u) {
        require(u != 0, "Shared: uint input is empty");
        _;
    }

    /// @dev    Checks that a uint array isn't nonzero/empty
    modifier nzUintArr(uint[] calldata arr) {
        require(arr.length > 0, "Shared: uint arr input is empty");
        _;
    }
}

File 4 of 4 : IForwarder.sol
pragma solidity 0.8.6;


interface IForwarder {

    function forward(
        address target,
        bytes calldata callData
    ) external payable returns (bool success, bytes memory returnData);

}

Settings
{
  "evmVersion": "istanbul",
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "libraries": {
    "FundsRouter.sol": {}
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"inputs":[{"internalType":"address payable","name":"registry_","type":"address"},{"internalType":"contract IForwarder","name":"regUserFeeVeriForwarder_","type":"address"},{"internalType":"contract IForwarder","name":"routerUserVeriForwarder_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"newBal","type":"uint256"}],"name":"BalanceChanged","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"depositETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"feeAmount","type":"uint256"},{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"},{"internalType":"uint256","name":"ethForCall","type":"uint256"},{"internalType":"bool","name":"verifyUser","type":"bool"}],"internalType":"struct FundsRouter.FcnData[]","name":"fcnData","type":"tuple[]"}],"name":"forwardCalls","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"regUserFeeVeriForwarder","outputs":[{"internalType":"contract IForwarder","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"registry","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"routerUserVeriForwarder","outputs":[{"internalType":"contract IForwarder","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60e060405234801561001057600080fd5b50604051610f5e380380610f5e83398101604081905261002f9161005b565b60016000556001600160601b0319606093841b811660805291831b821660a05290911b1660c0526100c0565b60008060006060848603121561007057600080fd5b835161007b816100a8565b602085015190935061008c816100a8565b604085015190925061009d816100a8565b809150509250925092565b6001600160a01b03811681146100bd57600080fd5b50565b60805160601c60a05160601c60c05160601c610e5161010d600039600081816101b501526105c5015260008181610107015261041101526000818161015301526109a20152610e516000f3fe6080604052600436106100745760003560e01c80635fd668271161004e5780635fd66827146100f55780637b10399914610141578063a605572314610175578063a97d542b146101a357600080fd5b806327e235e3146100805780632d2da806146100c05780634782f779146100d557600080fd5b3661007b57005b600080fd5b34801561008c57600080fd5b506100ad61009b366004610a59565b60016020526000908152604090205481565b6040519081526020015b60405180910390f35b6100d36100ce366004610a59565b6101d7565b005b3480156100e157600080fd5b506100d36100f0366004610a7d565b610258565b34801561010157600080fd5b506101297f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b34801561014d57600080fd5b506101297f000000000000000000000000000000000000000000000000000000000000000081565b34801561018157600080fd5b50610195610190366004610aa9565b6103aa565b6040516100b7929190610c65565b3480156101af57600080fd5b506101297f000000000000000000000000000000000000000000000000000000000000000081565b6001600160a01b0381166000908152600160205260408120546101fb903490610d39565b6001600160a01b0383166000818152600160205260409081902083905551919250907fa448afda7ea1e3a7a10fcab0c29fe9a9dd85791503bf0171f281521551c7ec059061024c9084815260200190565b60405180910390a25050565b600260005414156102b05760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002600090815533815260016020526040902054818110156103145760405162461bcd60e51b815260206004820152601960248201527f46526f757465723a206e6f7420656e6f7567682066756e64730000000000000060448201526064016102a7565b60006103208383610d51565b33600090815260016020526040808220839055519192506001600160a01b0386169185156108fc0291869190818181858888f19350505050158015610369573d6000803e3d6000fd5b5060405181815233907fa448afda7ea1e3a7a10fcab0c29fe9a9dd85791503bf0171f281521551c7ec059060200160405180910390a2505060016000555050565b60006060600260005414156104015760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016102a7565b6002600055336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461047e5760405162461bcd60e51b815260206004820152601860248201527f46526f757465723a206e6f742075736572466565466f7277000000000000000060448201526064016102a7565b6001600160a01b038616600090815260016020526040812054904790806060815b88811015610804578989828181106104b9576104b9610dc9565b90506020028101906104cb9190610cef565b6104d9906040013585610d39565b93508989828181106104ed576104ed610dc9565b90506020028101906104ff9190610cef565b610510906080810190606001610b35565b156106fc578b6001600160a01b03168a8a8381811061053157610531610dc9565b90506020028101906105439190610cef565b610551906020810190610ca1565b61056091602491600491610d0f565b81019061056d9190610a59565b6001600160a01b0316146105c35760405162461bcd60e51b815260206004820152601a60248201527f46526f757465723a2063616c6c64617461206e6f74207573657200000000000060448201526064016102a7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636fadcf728b8b8481811061060457610604610dc9565b90506020028101906106169190610cef565b604001358c8c8581811061062c5761062c610dc9565b905060200281019061063e9190610cef565b61064c906020810190610a59565b8d8d8681811061065e5761065e610dc9565b90506020028101906106709190610cef565b61067e906020810190610ca1565b6040518563ffffffff1660e01b815260040161069c93929190610c25565b6000604051808303818588803b1580156106b557600080fd5b505af11580156106c9573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526106f29190810190610b52565b90935091506107e8565b89898281811061070e5761070e610dc9565b90506020028101906107209190610cef565b61072e906020810190610a59565b6001600160a01b03168a8a8381811061074957610749610dc9565b905060200281019061075b9190610cef565b604001358b8b8481811061077157610771610dc9565b90506020028101906107839190610cef565b610791906020810190610ca1565b60405161079f929190610c15565b60006040518083038185875af1925050503d80600081146107dc576040519150601f19603f3d011682016040523d82523d6000602084013e6107e1565b606091505b5090935091505b6107f28383610a04565b806107fc81610d98565b91505061049f565b5047846108118583610d39565b10156108585760405162461bcd60e51b815260206004820152601660248201527546526f757465723a2066756e6473206d697373696e6760501b60448201526064016102a7565b6000856108658684610d39565b61086f9190610d51565b905061087b8c86610d39565b6108858289610d39565b10156108d35760405162461bcd60e51b815260206004820152601f60248201527f46526f757465723a206e6f7420656e6f7567682066756e6473202d206665650060448201526064016102a7565b8b866108df848a610d39565b6108e99190610d51565b6108f39190610d51565b8c866108ff848b610d39565b6109099190610d51565b6109139190610d51565b146109605760405162461bcd60e51b815260206004820181905260248201527f46526f757465723a20736f6d657468696e6720646f65736e742061646420757060448201526064016102a7565b8b8561096c838a610d39565b6109769190610d51565b6109809190610d51565b6001600160a01b03808f166000908152600160205260408082209390935591517f0000000000000000000000000000000000000000000000000000000000000000909116918e156108fc02918f91818181858888f193505050501580156109eb573d6000803e3d6000fd5b5050505050505050600160008190555094509492505050565b81610a5557805115610a195780518082602001fd5b60405162461bcd60e51b81526020600482015260116024820152704e6f206572726f72206d6573736167652160781b60448201526064016102a7565b5050565b600060208284031215610a6b57600080fd5b8135610a7681610df5565b9392505050565b60008060408385031215610a9057600080fd5b8235610a9b81610df5565b946020939093013593505050565b60008060008060608587031215610abf57600080fd5b8435610aca81610df5565b935060208501359250604085013567ffffffffffffffff80821115610aee57600080fd5b818701915087601f830112610b0257600080fd5b813581811115610b1157600080fd5b8860208260051b8501011115610b2657600080fd5b95989497505060200194505050565b600060208284031215610b4757600080fd5b8135610a7681610e0d565b60008060408385031215610b6557600080fd5b8251610b7081610e0d565b602084015190925067ffffffffffffffff80821115610b8e57600080fd5b818501915085601f830112610ba257600080fd5b815181811115610bb457610bb4610ddf565b604051601f8201601f19908116603f01168101908382118183101715610bdc57610bdc610ddf565b81604052828152886020848701011115610bf557600080fd5b610c06836020830160208801610d68565b80955050505050509250929050565b8183823760009101908152919050565b6001600160a01b03841681526040602082018190528101829052818360608301376000818301606090810191909152601f909201601f1916010192915050565b82151581526040602082015260008251806040840152610c8c816060850160208701610d68565b601f01601f1916919091016060019392505050565b6000808335601e19843603018112610cb857600080fd5b83018035915067ffffffffffffffff821115610cd357600080fd5b602001915036819003821315610ce857600080fd5b9250929050565b60008235607e19833603018112610d0557600080fd5b9190910192915050565b60008085851115610d1f57600080fd5b83861115610d2c57600080fd5b5050820193919092039150565b60008219821115610d4c57610d4c610db3565b500190565b600082821015610d6357610d63610db3565b500390565b60005b83811015610d83578181015183820152602001610d6b565b83811115610d92576000848401525b50505050565b6000600019821415610dac57610dac610db3565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610e0a57600080fd5b50565b8015158114610e0a57600080fdfea2646970667358221220353df29dce0a29ad02862cbfb859854c9aea5ca953b1e26716a2e3d78958850d64736f6c63430008060033000000000000000000000000a0f25b796dd59e504077f87caea1c0472cd6b7b4000000000000000000000000457b8bb4d6c8cc2e506789f768996ddae60cd4fd0000000000000000000000002b25c05a64fc279d57e5a80ade773e8dd5a88e6e

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

000000000000000000000000a0f25b796dd59e504077f87caea1c0472cd6b7b4000000000000000000000000457b8bb4d6c8cc2e506789f768996ddae60cd4fd0000000000000000000000002b25c05a64fc279d57e5a80ade773e8dd5a88e6e

-----Decoded View---------------
Arg [0] : registry_ (address): 0xa0f25b796dd59e504077f87caea1c0472cd6b7b4
Arg [1] : regUserFeeVeriForwarder_ (address): 0x457b8bb4d6c8cc2e506789f768996ddae60cd4fd
Arg [2] : routerUserVeriForwarder_ (address): 0x2b25c05a64fc279d57e5a80ade773e8dd5a88e6e

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000a0f25b796dd59e504077f87caea1c0472cd6b7b4
Arg [1] : 000000000000000000000000457b8bb4d6c8cc2e506789f768996ddae60cd4fd
Arg [2] : 0000000000000000000000002b25c05a64fc279d57e5a80ade773e8dd5a88e6e


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading