ETH Price: $3,406.30 (+2.59%)

Contract

0x8c30f3061C736538Ba71Fd8955CE1a811ED0D668
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Bridge212519562024-11-23 17:32:473 hrs ago1732383167IN
0x8c30f306...11ED0D668
0 ETH0.002109320.15585215
Bridge212509832024-11-23 14:17:236 hrs ago1732371443IN
0x8c30f306...11ED0D668
0 ETH0.0018172520.74445905
Bridge212484202024-11-23 5:43:1115 hrs ago1732340591IN
0x8c30f306...11ED0D668
0 ETH0.000963939.20929294
Bridge212468942024-11-23 0:36:4720 hrs ago1732322207IN
0x8c30f306...11ED0D668
0 ETH0.0003732213.07920493
Bridge212468942024-11-23 0:36:4720 hrs ago1732322207IN
0x8c30f306...11ED0D668
0 ETH0.0013689513.07880493
Bridge212335262024-11-21 3:48:472 days ago1732160927IN
0x8c30f306...11ED0D668
0 ETH0.000984349.40611456
Bridge212307962024-11-20 18:40:233 days ago1732128023IN
0x8c30f306...11ED0D668
0 ETH0.001547617.66874528
Bridge212233962024-11-19 17:52:594 days ago1732038779IN
0x8c30f306...11ED0D668
0 ETH0.0019357422.10814825
Bridge212196982024-11-19 5:30:474 days ago1731994247IN
0x8c30f306...11ED0D668
0 ETH0.000829567.92457688
Bridge212196582024-11-19 5:22:474 days ago1731993767IN
0x8c30f306...11ED0D668
0 ETH0.000686217.83436367
Bridge212166232024-11-18 19:13:475 days ago1731957227IN
0x8c30f306...11ED0D668
0 ETH0.0018277420.87471258
Bridge212088472024-11-17 17:13:356 days ago1731863615IN
0x8c30f306...11ED0D668
0 ETH0.0015955715.24504537
Bridge212032242024-11-16 22:23:356 days ago1731795815IN
0x8c30f306...11ED0D668
0 ETH0.000822269.38853426
Bridge211979472024-11-16 4:44:237 days ago1731732263IN
0x8c30f306...11ED0D668
0 ETH0.0015005517.13785571
Bridge211971462024-11-16 2:03:357 days ago1731722615IN
0x8c30f306...11ED0D668
0 ETH0.0013418312.8211815
Bridge211895982024-11-15 0:45:238 days ago1731631523IN
0x8c30f306...11ED0D668
0 ETH0.0017397816.62164631
Bridge211889762024-11-14 22:40:238 days ago1731624023IN
0x8c30f306...11ED0D668
0 ETH0.0018684121.33628957
Bridge211739332024-11-12 20:16:4711 days ago1731442607IN
0x8c30f306...11ED0D668
0 ETH0.0024349927.81384588
Bridge211714852024-11-12 12:04:5911 days ago1731413099IN
0x8c30f306...11ED0D668
0 ETH0.0021925325.03753038
Bridge211671842024-11-11 21:39:4711 days ago1731361187IN
0x8c30f306...11ED0D668
0 ETH0.0044779542.77669736
Bridge211671832024-11-11 21:39:3511 days ago1731361175IN
0x8c30f306...11ED0D668
0 ETH0.003862844.12114022
Bridge211642032024-11-11 11:39:5912 days ago1731325199IN
0x8c30f306...11ED0D668
0 ETH0.0012963714.8052703
Bridge211624832024-11-11 5:55:1112 days ago1731304511IN
0x8c30f306...11ED0D668
0 ETH0.0018068420.63782883
Bridge211603892024-11-10 22:54:3512 days ago1731279275IN
0x8c30f306...11ED0D668
0 ETH0.0011941213.63933093
Bridge211567392024-11-10 10:42:1113 days ago1731235331IN
0x8c30f306...11ED0D668
0 ETH0.0003482512.20414531
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.