ETH Price: $3,452.20 (+4.91%)

Contract

0xf79Ab7dBc00Ce40B3CB8E435a4c1Ac37f760c913
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Bridge212497762024-11-23 10:14:473 hrs ago1732356887IN
0xf79Ab7dB...7f760c913
0 ETH0.00103569.8951372
Bridge212486342024-11-23 6:25:597 hrs ago1732343159IN
0xf79Ab7dB...7f760c913
0 ETH0.000944429.02290216
Bridge212387242024-11-21 21:14:1140 hrs ago1732223651IN
0xf79Ab7dB...7f760c913
0 ETH0.001485916.97134668
Bridge212309992024-11-20 19:21:232 days ago1732130483IN
0xf79Ab7dB...7f760c913
0 ETH0.0013570915.4930218
Bridge212298412024-11-20 15:27:352 days ago1732116455IN
0xf79Ab7dB...7f760c913
0 ETH0.0013252815.13398063
Bridge212197212024-11-19 5:35:234 days ago1731994523IN
0xf79Ab7dB...7f760c913
0 ETH0.000641417.32294285
Bridge212193932024-11-19 4:29:354 days ago1731990575IN
0xf79Ab7dB...7f760c913
0 ETH0.001018529.73303115
Bridge212193832024-11-19 4:27:354 days ago1731990455IN
0xf79Ab7dB...7f760c913
0 ETH0.0010771410.28849255
Bridge212193682024-11-19 4:24:354 days ago1731990275IN
0xf79Ab7dB...7f760c913
0 ETH0.001015669.70348955
Bridge212193632024-11-19 4:23:354 days ago1731990215IN
0xf79Ab7dB...7f760c913
0 ETH0.0011296310.79113993
Bridge212193532024-11-19 4:21:354 days ago1731990095IN
0xf79Ab7dB...7f760c913
0 ETH0.0009377410.70854467
Bridge212191622024-11-19 3:43:234 days ago1731987803IN
0xf79Ab7dB...7f760c913
0 ETH0.000970249.26673897
Bridge211894692024-11-15 0:19:358 days ago1731629975IN
0xf79Ab7dB...7f760c913
0 ETH0.002104620.11090027
Bridge211832442024-11-14 3:27:599 days ago1731554879IN
0xf79Ab7dB...7f760c913
0 ETH0.0033744538.53435859
Bridge211832252024-11-14 3:24:119 days ago1731554651IN
0xf79Ab7dB...7f760c913
0 ETH0.0034712139.63383619
Bridge211831912024-11-14 3:17:119 days ago1731554231IN
0xf79Ab7dB...7f760c913
0 ETH0.0037540642.86538684
Bridge211831382024-11-14 3:06:359 days ago1731553595IN
0xf79Ab7dB...7f760c913
0 ETH0.0037991143.38379515
Bridge211831002024-11-14 2:58:599 days ago1731553139IN
0xf79Ab7dB...7f760c913
0 ETH0.0031277135.71671358
Bridge211594972024-11-10 19:55:2312 days ago1731268523IN
0xf79Ab7dB...7f760c913
0 ETH0.0025702929.35402128
Bridge211592992024-11-10 19:15:3512 days ago1731266135IN
0xf79Ab7dB...7f760c913
0 ETH0.0027240931.09202714
Bridge211575192024-11-10 13:18:3513 days ago1731244715IN
0xf79Ab7dB...7f760c913
0 ETH0.0019377318.51069818
Bridge211420382024-11-08 9:30:4715 days ago1731058247IN
0xf79Ab7dB...7f760c913
0 ETH0.0011338710.83405916
Bridge211366882024-11-07 15:32:1115 days ago1730993531IN
0xf79Ab7dB...7f760c913
0 ETH0.0018126420.69659524
Bridge211363872024-11-07 14:31:2315 days ago1730989883IN
0xf79Ab7dB...7f760c913
0 ETH0.0016546915.8056339
Bridge211350782024-11-07 10:07:5916 days ago1730974079IN
0xf79Ab7dB...7f760c913
0 ETH0.0015883418.13805318
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x4ba6990e...567a41809
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
BridgeMinter

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion, MIT license
File 1 of 2 : bridge_minter.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;

import "minter.sol";

contract BridgeMinter{
    address private notary;
    address private approver;
    address private tokenAddress;
    bool private bridging;
    uint256 private chainId;
    bytes32 private domainSeparator;

    mapping(bytes32 => bool) private nonces;

    event Bridged(address receiver, uint256 amount);
    event TransferOwnership(address indexed owner, bool indexed confirmed);

    constructor(address _approver, address _notary, address _tokenAddress, uint256 _chainId){
        require(_approver != address(0));     // dev: invalid approver
        require(_notary != address(0));       // dev: invalid notary
        require(_tokenAddress != address(0)); // dev: invalid notary
        approver = _approver;
        notary = _notary;
        tokenAddress = _tokenAddress;
        chainId = _chainId;

        domainSeparator = keccak256(
            abi.encode(
                keccak256("EIP712Domain(string name,string version,uint256 chainId)"),
                keccak256("Neptune Bridge"), 
                keccak256("0.0.1"), 
                _chainId
            )
        );
    }

    modifier checkNonce(bytes32 nonce) {
        require(nonces[nonce]==false); // dev: already processed
        _;
    }

    function bridge(address sender, uint256 bridgedAmount, bytes32 nonce, bytes32 messageHash, bytes calldata approvedMessage, bytes calldata notarizedMessage) 
    external checkNonce(nonce){
        require(bridging == false);                                                //dev: re-entrancy guard
        bridging = true;
        bytes32 hashToVerify = keccak256(
            abi.encode(keccak256("SignedMessage(bytes32 key,address sender,uint256 amount)"),nonce,sender,bridgedAmount)
        );

        require(checkEncoding(approvedMessage,messageHash,hashToVerify,approver)); //dev: invalid signature
        require(checkEncoding(notarizedMessage,messageHash,hashToVerify,notary));  //dev: invalid signature
        nonces[nonce]=true;

        IMinter(tokenAddress).mint(sender, bridgedAmount);

        emit Bridged(sender, bridgedAmount);
        bridging = false;
    }

    function checkEncoding(bytes memory signedMessage,bytes32 messageHash, bytes32 hashToVerify, address signer) 
    internal view returns(bool){

        bytes32 domainSeparatorHash = keccak256(abi.encodePacked("\x19\x01", domainSeparator, hashToVerify));
        require(messageHash == domainSeparatorHash); //dev: values do not match

        return signer == recoverSigner(messageHash, signedMessage);
    }

    function splitSignature(bytes memory sig)
    internal pure returns (uint8 v, bytes32 r, bytes32 s){
        require(sig.length == 65); // dev: signature invalid

        assembly {
            // first 32 bytes, after the length prefix.
            r := mload(add(sig, 32))
            // second 32 bytes.
            s := mload(add(sig, 64))
            // final byte (first byte of the next 32 bytes).
            v := byte(0, mload(add(sig, 96)))
        }

        return (v, r, s);
    }

    function recoverSigner(bytes32 message, bytes memory sig)
    internal pure returns (address){
        uint8 v;
        bytes32 r;
        bytes32 s;

        (v, r, s) = splitSignature(sig);

        return tryRecover(message, v, r, s);
    }

    function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s)
    internal 
    pure 
    returns (address) {
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return address(0);
        } else if (v != 27 && v != 28) {
            return address(0);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return address(0);
        }

        return signer;
    }
}

File 2 of 2 : minter.sol
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.10;

/**
 * @dev Interface of to mint ERC20 tokens.
 */
interface IMinter {
    function mint(address to, uint256 value) external;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_approver","type":"address"},{"internalType":"address","name":"_notary","type":"address"},{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"uint256","name":"_chainId","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Bridged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"bool","name":"confirmed","type":"bool"}],"name":"TransferOwnership","type":"event"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"bridgedAmount","type":"uint256"},{"internalType":"bytes32","name":"nonce","type":"bytes32"},{"internalType":"bytes32","name":"messageHash","type":"bytes32"},{"internalType":"bytes","name":"approvedMessage","type":"bytes"},{"internalType":"bytes","name":"notarizedMessage","type":"bytes"}],"name":"bridge","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80639e07f0db14610030575b600080fd5b61004361003e3660046104a0565b610045565b005b600086815260056020526040902054869060ff161561006357600080fd5b600254600160a01b900460ff161561007a57600080fd5b6002805460ff60a01b1916600160a01b179055604080517f3c1316138cd3c347ee70454f6b80926b84604f3f07629dbed9845a8c06cc9ea360208201529081018890526001600160a01b038a1660608201526080810189905260009060a00160405160208183030381529060405280519060200120905061013f86868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506001548b92508591506001600160a01b0316610292565b61014857600080fd5b61019484848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250548c93508692506001600160a01b03169050610292565b61019d57600080fd5b60008881526005602052604090819020805460ff1916600117905560025490517f40c10f190000000000000000000000000000000000000000000000000000000081526001600160a01b038c81166004830152602482018c9052909116906340c10f1990604401600060405180830381600087803b15801561021e57600080fd5b505af1158015610232573d6000803e3d6000fd5b5050604080516001600160a01b038e168152602081018d90527f48b87fc02925b37a6aefac60c14fa9d8e9988d7dfadf262d4bd845872ca40730935001905060405180910390a150506002805460ff60a01b191690555050505050505050565b6004546040517f1901000000000000000000000000000000000000000000000000000000000000602082015260228101919091526042810183905260009081906062016040516020818303038152906040528051906020012090508085146102f957600080fd5b6103038587610323565b6001600160a01b0316836001600160a01b0316149150505b949350505050565b6000806000806103328561034f565b919450925090506103458684848461037e565b9695505050505050565b6000806000835160411461036257600080fd5b5050506020810151604082015160609092015160001a92909190565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156103b05750600061031b565b8360ff16601b141580156103c857508360ff16601c14155b156103d55750600061031b565b6040805160008082526020820180845288905260ff871692820192909252606081018590526080810184905260019060a0016020604051602081039080840390855afa158015610429573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661044e57600091505061031b565b95945050505050565b60008083601f84011261046957600080fd5b50813567ffffffffffffffff81111561048157600080fd5b60208301915083602082850101111561049957600080fd5b9250929050565b60008060008060008060008060c0898b0312156104bc57600080fd5b88356001600160a01b03811681146104d357600080fd5b9750602089013596506040890135955060608901359450608089013567ffffffffffffffff8082111561050557600080fd5b6105118c838d01610457565b909650945060a08b013591508082111561052a57600080fd5b506105378b828c01610457565b999c989b509699509497939692959450505056fea2646970667358221220cdf67210038ad517c2c46f363f99a1bbe4cef893cd97d87a0370e3770dee4ba464736f6c634300080a0033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

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