Contract 0xCA26b5976E512E6d8eE9056d94EDe8Fd3beaffFD 3

Contract Overview

Balance:
0 AVAX
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xaa1dc7869a57d5558e29ff1cffb03def1f595c71e3973ff790a5d88a09467ca50x60a0604073693252022-03-16 10:20:44194 days 22 hrs ago0x7db8d33114462e032e5bf636d271f8680619ba25 IN  Create: TimeConditions0 AVAX0.00746942525
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xb5f61ff6daf00993d6180024eb84eb3004d0f45b75d92cb6d7e9b6cd3db59852103386472022-06-03 2:01:36116 days 6 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700xca26b5976e512e6d8ee9056d94ede8fd3beafffd0 AVAX
0x6d791dd4dd4afb5055dee80f55653a7191c5878bcf24e6d5b5b8c69c53336700103385602022-06-03 1:58:23116 days 6 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700xca26b5976e512e6d8ee9056d94ede8fd3beafffd0 AVAX
0x7e987b09b78544581579c07440fc8bd563de3ebf1b6e4ca778dc442b0926a5c1103336032022-06-02 22:48:37116 days 9 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700xca26b5976e512e6d8ee9056d94ede8fd3beafffd0 AVAX
0x6b862fc934c0bfd904faad10b8054949cd2331684d5320cbc35343a1899130e5103299352022-06-02 20:29:13116 days 12 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700xca26b5976e512e6d8ee9056d94ede8fd3beafffd0 AVAX
0x4a2c38a64bba1c45331890c3ecd8e9f55f68080ac721c411cd5ca8333a755ef6103298422022-06-02 20:25:25116 days 12 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700xca26b5976e512e6d8ee9056d94ede8fd3beafffd0 AVAX
0xbc15b54cdf8911511db6cc7ef43f023da581a7e715b7c835a6c366765dd6d094103297072022-06-02 20:20:08116 days 12 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700xca26b5976e512e6d8ee9056d94ede8fd3beafffd0 AVAX
0x972fe4aef6f2712e5165ae5d3c9f64c3656d233d7632905d830d6cf9ce616132103296162022-06-02 20:16:39116 days 12 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700xca26b5976e512e6d8ee9056d94ede8fd3beafffd0 AVAX
0x5d2ad52dc6b7f562cd2aabe067fb3a3b9f7fd3f4075a228bbe92cf2da9ad398a103295232022-06-02 20:13:15116 days 12 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700xca26b5976e512e6d8ee9056d94ede8fd3beafffd0 AVAX
0x281b12ffece84db234f07a006e7562eaa7f15c1aa51d0af604033295d34547b2103295142022-06-02 20:12:49116 days 12 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700xca26b5976e512e6d8ee9056d94ede8fd3beafffd0 AVAX
0x7c20b1b8227d39e24222d9fc8c591fe8bf3332bdaaaa8dbe7f94dd09e52a3da4103294782022-06-02 20:11:16116 days 12 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700xca26b5976e512e6d8ee9056d94ede8fd3beafffd0 AVAX
0xd26204ccaf2a329bcffe697de7a92eb06f93a51d9816ccb370253398a57f53c9103293892022-06-02 20:08:12116 days 12 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700xca26b5976e512e6d8ee9056d94ede8fd3beafffd0 AVAX
0x70de7d4d11e945f09fdc8b945b7b949aba07ce3bf7f16ac41ed88b254d65fb7d103293632022-06-02 20:07:09116 days 12 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700xca26b5976e512e6d8ee9056d94ede8fd3beafffd0 AVAX
0x2c32ed164707af6727cef8911d9f641eb2e00866f3f443a51686b35a495df0fb103292972022-06-02 20:04:34116 days 12 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700xca26b5976e512e6d8ee9056d94ede8fd3beafffd0 AVAX
0x64823d8df09b5e79d237171190bd4a5fc1f2bcb29d5b6138ac6bc8ccb581d696103291532022-06-02 19:59:25116 days 12 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700xca26b5976e512e6d8ee9056d94ede8fd3beafffd0 AVAX
0x411328564d5a10ecf6bc2845639028a3b1d38fb468fb0f00886400267f2c6650103290392022-06-02 19:55:02116 days 12 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700xca26b5976e512e6d8ee9056d94ede8fd3beafffd0 AVAX
0xc9b968fa469475d5edd6fe2ebb2e76b27d0e8d7214b3cc6d7430072fbb8bd0df103290152022-06-02 19:53:54116 days 12 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700xca26b5976e512e6d8ee9056d94ede8fd3beafffd0 AVAX
0xfb5a8e6797f38d63d7b7ab143e6e33ffc9192d2d45fedccb8d51c9f443a8ea1193575942022-05-06 11:50:07143 days 20 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700xca26b5976e512e6d8ee9056d94ede8fd3beafffd0 AVAX
0x8d4512172e08c152fcfee94d106e21d24047af936383266a0d62799789ef986981424692022-04-04 0:12:03176 days 8 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700xca26b5976e512e6d8ee9056d94ede8fd3beafffd0 AVAX
0x37a883122b0bd9dc0b5b568352579d81eec15051b81d34bde385b7947681d68780686222022-04-02 0:58:09178 days 7 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700xca26b5976e512e6d8ee9056d94ede8fd3beafffd0 AVAX
0x33fef2caafbb595be3c20be9ee409dc5ea1c543995a56f60526cb44dbae1973e80670072022-04-01 23:58:25178 days 8 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700xca26b5976e512e6d8ee9056d94ede8fd3beafffd0 AVAX
0x371bb3334acb35480d1fd3d0764b0b36aab4931966f24673c6853c572454b04a80667322022-04-01 23:48:25178 days 8 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700xca26b5976e512e6d8ee9056d94ede8fd3beafffd0 AVAX
0x6663df8b7a628371c2569d141589d690d686fa92b2961a1e4ae93cd6c1edf75680666262022-04-01 23:44:28178 days 8 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700xca26b5976e512e6d8ee9056d94ede8fd3beafffd0 AVAX
0x4f1efbc84bf120fe01c7635f0fd166f125a4403a770b656f55530e6e13b6781280664182022-04-01 23:36:46178 days 8 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700xca26b5976e512e6d8ee9056d94ede8fd3beafffd0 AVAX
0xb7a4336e678bc1b945767c6b5d612e644c82b629f8a2de0410939d2e7875c35080663912022-04-01 23:35:32178 days 8 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700xca26b5976e512e6d8ee9056d94ede8fd3beafffd0 AVAX
0x04215e85e867a346ea77cdc65935f6bc66e2cec41a66cb6d67f6d54d4348e34380663702022-04-01 23:34:33178 days 9 hrs ago 0x887fde9e7f1bdb3a862a43e2e028c3ceef51c1700xca26b5976e512e6d8ee9056d94ede8fd3beafffd0 AVAX
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TimeConditions

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 1 : TimeConditions.sol
pragma solidity 0.8.6;


/**
* @notice   This contract serves as a condition contract, to be used with Autonomy's
*           Automation Station and bundled with other calls to add conditions to
*           calls to contracts in a modular way without the need for duplicating
*           this logic elsewhere. It allows the called to specify that a request
*           is executed between 2 times (with `betweenTimes`, presumably for a
*           non-recurring request), aswell as to be called periodically every
*           X seconds (with `everyTimePeriod`, presumably for recurring requests).
* @author   @pldespaigne (Pierre-Louis Despaigne), @quantafire (James Key)
*/
contract TimeConditions {

    event Started(address indexed user, uint callId);
    

    // Mapping a user to last execution date of its ongoing requests
    // - because a user can have multiple requests, we introduce an arbitrary requestID (also refered as `callId`)
    // - users can know their previous `callId`s by looking at emitted `Started` events
    mapping(address => mapping(uint => uint)) public userToIdToLastExecTime;
    // The forwarder address through which calls are forwarded that guarantee the 1st argument, `user`, is accurate
    address public immutable routerUserVeriForwarder;


    constructor(address routerUserVeriForwarder_) {
        routerUserVeriForwarder = routerUserVeriForwarder_;
    }

    /**
    * @notice Ensure that the tx is being executed between 2 times (inclusive)
    *
    * @param afterTime  The 1st unix time from which the execution will succeed (inclusive).
    * @param beforeTime The last unix time from which the execution will succeed (inclusive).
    */
    function betweenTimes(uint afterTime, uint beforeTime) external view {
        require(block.timestamp >= afterTime, "TimeConditions: too early");
        require(block.timestamp <= beforeTime, "TimeConditions: too late");
    }

    /**
    * @notice       Ensure the tx is executed periodically, beginning from `startTime`, and
    *               occurring every `periodLength` after that.
    * @dev          The execution will never occur exactly at `startTime`, nor exactly at the
    *               beginning of the next period, but the average execution time should be
    *               around the same time with the proper period and should not drift because
    *               `block.timestamp` is never used to refer to the last execution time.
    * @param user   The address of the user who made the request. This is guaranteed to be
    *               accurate by `msg.sender` being `routerUserVeriForwarder` and is needed
    *               to ensure that different users can't affect the requests of other users.
    * @param callId An arbitrary request ID, used to differentiate between different requests
    *               from the same `user`.
    * @param periodLength   The number of seconds that should have passed inbetween calls.
    */
    function everyTimePeriod(
        address user,
        uint callId,
        uint startTime,
        uint periodLength
    ) external {
        require(msg.sender == routerUserVeriForwarder, "TimeConditions: not userForw");

        uint lastExecTime = userToIdToLastExecTime[user][callId];

        // immediately execute the first time
        if (lastExecTime == 0) {
            require(block.timestamp >= startTime, "TimeConditions: not passed start");
            userToIdToLastExecTime[user][callId] = startTime;
            emit Started(user, callId);

        } else {
            uint nextExecTime = lastExecTime + periodLength;
            require(block.timestamp >= nextExecTime, "TimeConditions: too early period");
            userToIdToLastExecTime[user][callId] = nextExecTime;
        }
    }
}

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

Contract ABI

[{"inputs":[{"internalType":"address","name":"routerUserVeriForwarder_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"callId","type":"uint256"}],"name":"Started","type":"event"},{"inputs":[{"internalType":"uint256","name":"afterTime","type":"uint256"},{"internalType":"uint256","name":"beforeTime","type":"uint256"}],"name":"betweenTimes","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"callId","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"periodLength","type":"uint256"}],"name":"everyTimePeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"routerUserVeriForwarder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userToIdToLastExecTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60a060405234801561001057600080fd5b5060405161050138038061050183398101604081905261002f91610044565b60601b6001600160601b031916608052610074565b60006020828403121561005657600080fd5b81516001600160a01b038116811461006d57600080fd5b9392505050565b60805160601c61046a61009760003960008181607e015260fe015261046a6000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80632d8eaa7c14610051578063367d781414610066578063a97d542b14610079578063cc0893f1146100bd575b600080fd5b61006461005f3660046103b3565b6100f3565b005b6100646100743660046103ec565b6102c9565b6100a07f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6100e56100cb366004610389565b600060208181529281526040808220909352908152205481565b6040519081526020016100b4565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101705760405162461bcd60e51b815260206004820152601c60248201527f54696d65436f6e646974696f6e733a206e6f742075736572466f72770000000060448201526064015b60405180910390fd5b6001600160a01b0384166000908152602081815260408083208684529091529020548061024157824210156101e75760405162461bcd60e51b815260206004820181905260248201527f54696d65436f6e646974696f6e733a206e6f74207061737365642073746172746044820152606401610167565b6001600160a01b03851660008181526020818152604080832088845282529182902086905590518681527fec650fcc375710553756d538ba0b333d528957ad95af9ec6d1a23481441dfd22910160405180910390a26102c2565b600061024d838361040e565b90508042101561029f5760405162461bcd60e51b815260206004820181905260248201527f54696d65436f6e646974696f6e733a20746f6f206561726c7920706572696f646044820152606401610167565b6001600160a01b0386166000908152602081815260408083208884529091529020555b5050505050565b814210156103195760405162461bcd60e51b815260206004820152601960248201527f54696d65436f6e646974696f6e733a20746f6f206561726c79000000000000006044820152606401610167565b804211156103695760405162461bcd60e51b815260206004820152601860248201527f54696d65436f6e646974696f6e733a20746f6f206c61746500000000000000006044820152606401610167565b5050565b80356001600160a01b038116811461038457600080fd5b919050565b6000806040838503121561039c57600080fd5b6103a58361036d565b946020939093013593505050565b600080600080608085870312156103c957600080fd5b6103d28561036d565b966020860135965060408601359560600135945092505050565b600080604083850312156103ff57600080fd5b50508035926020909101359150565b6000821982111561042f57634e487b7160e01b600052601160045260246000fd5b50019056fea26469706673582212200b56a9883acab7c60f3b61c86a21a7edae8bb0ba83432a6e1e05e3bb69f4ad8d64736f6c634300080600330000000000000000000000002b25c05a64fc279d57e5a80ade773e8dd5a88e6e

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

0000000000000000000000002b25c05a64fc279d57e5a80ade773e8dd5a88e6e

-----Decoded View---------------
Arg [0] : routerUserVeriForwarder_ (address): 0x2b25c05a64fc279d57e5a80ade773e8dd5a88e6e

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 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