ETH Price: $1,981.38 (-5.10%)

Contract

0xdeb033832Bbd3ecE762d43338573D6aC3e85c338
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

Advanced mode:
Parent Transaction Hash Method Block
From
To
View All Internal Transactions
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CallComparator

Compiler Version
vyper:0.4.3

Optimization Enabled:
Yes

Other Settings:
default evmVersion, None license
File 1 of 1 : CallComparator.vy
# @version 0.4.3
"""
@title CallComparator
@author Yield Basis
@license MIT
@notice Calls a view method by selector and asserts the result satisfies a comparison against an expected value
"""


@external
def check_equal(target: address, selector: Bytes[4], expected: uint256):
    """
    @notice Call a view method and revert if the result != expected
    @param target Contract to call
    @param selector 4-byte function selector of a view method returning uint256
    @param expected Value the result must equal
    """
    response: Bytes[32] = raw_call(target, selector, max_outsize=32, is_static_call=True)
    assert convert(response, uint256) == expected, "Not equal"


@external
def check_nonequal(target: address, selector: Bytes[4], expected: uint256):
    """
    @notice Call a view method and revert if the result == expected
    @param target Contract to call
    @param selector 4-byte function selector of a view method returning uint256
    @param expected Value the result must not equal
    """
    response: Bytes[32] = raw_call(target, selector, max_outsize=32, is_static_call=True)
    assert convert(response, uint256) != expected, "Equal"


@external
def check_gt(target: address, selector: Bytes[4], expected: uint256):
    """
    @notice Call a view method and revert if the result <= expected
    @param target Contract to call
    @param selector 4-byte function selector of a view method returning uint256
    @param expected Value the result must be greater than
    """
    response: Bytes[32] = raw_call(target, selector, max_outsize=32, is_static_call=True)
    assert convert(response, uint256) > expected, "Not greater"


@external
def check_lt(target: address, selector: Bytes[4], expected: uint256):
    """
    @notice Call a view method and revert if the result >= expected
    @param target Contract to call
    @param selector 4-byte function selector of a view method returning uint256
    @param expected Value the result must be less than
    """
    response: Bytes[32] = raw_call(target, selector, max_outsize=32, is_static_call=True)
    assert convert(response, uint256) < expected, "Not less"


@external
def check_timestamp_gt(expected: uint256):
    """
    @notice Revert if block.timestamp <= expected
    @param expected Value that block.timestamp must be greater than
    """
    assert block.timestamp > expected, "Timestamp not greater"


@external
def check_timestamp_lt(expected: uint256):
    """
    @notice Revert if block.timestamp >= expected
    @param expected Value that block.timestamp must be less than
    """
    assert block.timestamp < expected, "Timestamp not less"

Settings
{
  "outputSelection": {
    "contracts/dao/CallComparator.vy": [
      "evm.bytecode",
      "evm.deployedBytecode",
      "abi"
    ]
  },
  "search_paths": [
    "."
  ]
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"name":"target","type":"address"},{"name":"selector","type":"bytes"},{"name":"expected","type":"uint256"}],"name":"check_equal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"target","type":"address"},{"name":"selector","type":"bytes"},{"name":"expected","type":"uint256"}],"name":"check_nonequal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"target","type":"address"},{"name":"selector","type":"bytes"},{"name":"expected","type":"uint256"}],"name":"check_gt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"target","type":"address"},{"name":"selector","type":"bytes"},{"name":"expected","type":"uint256"}],"name":"check_lt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"expected","type":"uint256"}],"name":"check_timestamp_gt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"expected","type":"uint256"}],"name":"check_timestamp_lt","outputs":[],"stateMutability":"nonpayable","type":"function"}]

61055d6100116100003961055d610000f35f3560e01c60026007820660011b61054f01601e395f51565b6377fa3f1281186105475760643610341761054b576004358060a01c61054b5760405260243560040180356004811161054b5750602481606037506040515a606050602061010060605160808585fa90509050610077573d5f5f3e3d5ffd5b3d602081183d602010021860e05260e060408160a05e5060443560c05160a05160200360031b1c181561011a5760208061014052600960e0527f4e6f7420657175616c00000000000000000000000000000000000000000000006101005260e08161014001602982825e8051806020830101601f825f03163682375050601f19601f8251602001011690509050810190506308c379a0610120528060040161013cfd5b005b63d8abf53981186105475760643610341761054b576004358060a01c61054b5760405260243560040180356004811161054b5750602481606037506040515a606050602061010060605160808585fa9050905061017b573d5f5f3e3d5ffd5b3d602081183d602010021860e05260e060408160a05e5060443560c05160a05160200360031b1c1861021d5760208061014052600560e0527f457175616c0000000000000000000000000000000000000000000000000000006101005260e08161014001602582825e8051806020830101601f825f03163682375050601f19601f8251602001011690509050810190506308c379a0610120528060040161013cfd5b005b63fd45356681186105475760643610341761054b576004358060a01c61054b5760405260243560040180356004811161054b5750602481606037506040515a606050602061010060605160808585fa9050905061027e573d5f5f3e3d5ffd5b3d602081183d602010021860e05260e060408160a05e5060443560c05160a05160200360031b1c116103205760208061014052600b60e0527f4e6f7420677265617465720000000000000000000000000000000000000000006101005260e08161014001602b82825e8051806020830101601f825f03163682375050601f19601f8251602001011690509050810190506308c379a0610120528060040161013cfd5b005b63e583204d81186105475760643610341761054b576004358060a01c61054b5760405260243560040180356004811161054b5750602481606037506040515a606050602061010060605160808585fa90509050610381573d5f5f3e3d5ffd5b3d602081183d602010021860e05260e060408160a05e5060443560c05160a05160200360031b1c106104235760208061014052600860e0527f4e6f74206c6573730000000000000000000000000000000000000000000000006101005260e08161014001602882825e8051806020830101601f825f03163682375050601f19601f8251602001011690509050810190506308c379a0610120528060040161013cfd5b005b636879217681186105475760243610341761054b5760043542116104b45760208060a05260156040527f54696d657374616d70206e6f742067726561746572000000000000000000000060605260408160a001603582825e8051806020830101601f825f03163682375050601f19601f8251602001011690509050810190506308c379a060805280600401609cfd5b005b63dd91ea5f81186105475760243610341761054b5760043542106105455760208060a05260126040527f54696d657374616d70206e6f74206c657373000000000000000000000000000060605260408160a001603282825e8051806020830101601f825f03163682375050601f19601f8251602001011690509050810190506308c379a060805280600401609cfd5b005b5f5ffd5b5f80fd0018042504b603220547021f011c855820e321130611f959f2c223273f9223b3f94fab6344e3dbeeb751f05a69b6fbdad519055d810e00a1657679706572830004030036

Deployed Bytecode

0x5f3560e01c60026007820660011b61054f01601e395f51565b6377fa3f1281186105475760643610341761054b576004358060a01c61054b5760405260243560040180356004811161054b5750602481606037506040515a606050602061010060605160808585fa90509050610077573d5f5f3e3d5ffd5b3d602081183d602010021860e05260e060408160a05e5060443560c05160a05160200360031b1c181561011a5760208061014052600960e0527f4e6f7420657175616c00000000000000000000000000000000000000000000006101005260e08161014001602982825e8051806020830101601f825f03163682375050601f19601f8251602001011690509050810190506308c379a0610120528060040161013cfd5b005b63d8abf53981186105475760643610341761054b576004358060a01c61054b5760405260243560040180356004811161054b5750602481606037506040515a606050602061010060605160808585fa9050905061017b573d5f5f3e3d5ffd5b3d602081183d602010021860e05260e060408160a05e5060443560c05160a05160200360031b1c1861021d5760208061014052600560e0527f457175616c0000000000000000000000000000000000000000000000000000006101005260e08161014001602582825e8051806020830101601f825f03163682375050601f19601f8251602001011690509050810190506308c379a0610120528060040161013cfd5b005b63fd45356681186105475760643610341761054b576004358060a01c61054b5760405260243560040180356004811161054b5750602481606037506040515a606050602061010060605160808585fa9050905061027e573d5f5f3e3d5ffd5b3d602081183d602010021860e05260e060408160a05e5060443560c05160a05160200360031b1c116103205760208061014052600b60e0527f4e6f7420677265617465720000000000000000000000000000000000000000006101005260e08161014001602b82825e8051806020830101601f825f03163682375050601f19601f8251602001011690509050810190506308c379a0610120528060040161013cfd5b005b63e583204d81186105475760643610341761054b576004358060a01c61054b5760405260243560040180356004811161054b5750602481606037506040515a606050602061010060605160808585fa90509050610381573d5f5f3e3d5ffd5b3d602081183d602010021860e05260e060408160a05e5060443560c05160a05160200360031b1c106104235760208061014052600860e0527f4e6f74206c6573730000000000000000000000000000000000000000000000006101005260e08161014001602882825e8051806020830101601f825f03163682375050601f19601f8251602001011690509050810190506308c379a0610120528060040161013cfd5b005b636879217681186105475760243610341761054b5760043542116104b45760208060a05260156040527f54696d657374616d70206e6f742067726561746572000000000000000000000060605260408160a001603582825e8051806020830101601f825f03163682375050601f19601f8251602001011690509050810190506308c379a060805280600401609cfd5b005b63dd91ea5f81186105475760243610341761054b5760043542106105455760208060a05260126040527f54696d657374616d70206e6f74206c657373000000000000000000000000000060605260408160a001603282825e8051806020830101601f825f03163682375050601f19601f8251602001011690509050810190506308c379a060805280600401609cfd5b005b5f5ffd5b5f80fd0018042504b603220547021f011c

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.