Mumbai Testnet

Contract

0xCf73231F28B7331BBe3124B907840A94851f9f11

Overview

MATIC Balance

Token Holdings

Multichain Info

N/A
Transaction Hash
Method
Block
From
To
Value
Set Fx Root298606592022-12-18 22:01:21519 days ago1671400881IN
0xCf73231F...4851f9f11
0 MATIC0.000071483.00000001
Set Fx Root291854722022-11-16 16:42:11551 days ago1668616931IN
0xCf73231F...4851f9f11
0 MATIC0.000035741.50000001
On State Receive253015632022-02-27 9:41:19814 days ago1645954879IN
0xCf73231F...4851f9f11
0 MATIC0.000031111.25047501
On State Receive253015632022-02-27 9:41:19814 days ago1645954879IN
0xCf73231F...4851f9f11
0 MATIC0.000031111.25047501
Withdraw184700732021-09-03 19:17:09990 days ago1630696629IN
0xCf73231F...4851f9f11
0 MATIC0.0192708900
On State Receive114137292021-03-10 17:04:431167 days ago1615395883IN
0xCf73231F...4851f9f11
0 MATIC0.000026391
Set Fx Root94717922021-01-17 14:23:151219 days ago1610893395IN
0xCf73231F...4851f9f11
0 MATIC0.00004341
0x6080604094717792021-01-17 14:22:491219 days ago1610893369IN
 Create: FxChild
0 MATIC0.000365481

Parent Transaction Hash Block From To Value
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FxChild

Compiler Version
v0.7.3+commit.9bfce1f6

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at mumbai.polygonscan.com on 2021-07-14
*/

// SPDX-License-Identifier: MIT
pragma solidity 0.7.3;

// IStateReceiver represents interface to receive state
interface IStateReceiver {
    function onStateReceive(uint256 stateId, bytes calldata data) external;
}

// IFxMessageProcessor represents interface to process message
interface IFxMessageProcessor {
    function processMessageFromRoot(uint256 stateId, address rootMessageSender, bytes calldata data) external;
}

/**
 * @title FxChild child contract for state receiver
 */
contract FxChild is IStateReceiver {
    address public fxRoot;

    event NewFxMessage(address rootMessageSender, address receiver, bytes data);

    function setFxRoot(address _fxRoot) public {
        require(fxRoot == address(0x0));
        fxRoot = _fxRoot;
    }

    function onStateReceive(uint256 stateId, bytes calldata _data) external override {
        require(msg.sender == address(0x0000000000000000000000000000000000001001), "Invalid sender");
        (address rootMessageSender, address receiver, bytes memory data) = abi.decode(_data, (address, address, bytes));
        emit NewFxMessage(rootMessageSender, receiver, data);
        IFxMessageProcessor(receiver).processMessageFromRoot(stateId, rootMessageSender, data);
    }
}

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"rootMessageSender","type":"address"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"NewFxMessage","type":"event"},{"inputs":[],"name":"fxRoot","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"stateId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"onStateReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_fxRoot","type":"address"}],"name":"setFxRoot","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b506105a9806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806326c53bea146100465780634c8ff99e146100c9578063de9b771f1461010d575b600080fd5b6100c76004803603604081101561005c57600080fd5b81019080803590602001909291908035906020019064010000000081111561008357600080fd5b82018360208201111561009557600080fd5b803590602001918460018302840111640100000000831117156100b757600080fd5b9091929391929390505050610141565b005b61010b600480360360208110156100df57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104b3565b005b61011561054f565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61100173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101e4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f496e76616c69642073656e64657200000000000000000000000000000000000081525060200191505060405180910390fd5b6000806060848460608110156101f957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561025657600080fd5b82018360208201111561026857600080fd5b8035906020019184600183028401116401000000008311171561028a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050509250925092507ff091cd9cbbaff01426d8183042dff452ef18e6690f19816d5dd114e00761e0e8838383604051808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561037957808201518184015260208101905061035e565b50505050905090810190601f1680156103a65780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a18173ffffffffffffffffffffffffffffffffffffffff16639a7c4b718785846040518463ffffffff1660e01b8152600401808481526020018373ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561044557808201518184015260208101905061042a565b50505050905090810190601f1680156104725780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561049357600080fd5b505af11580156104a7573d6000803e3d6000fd5b50505050505050505050565b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461050c57600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fea26469706673582212200bdcfd65315e64d5f0ec860741e1cc6695c5e01920326ec06cadc7f8a48e45ff64736f6c63430007030033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100415760003560e01c806326c53bea146100465780634c8ff99e146100c9578063de9b771f1461010d575b600080fd5b6100c76004803603604081101561005c57600080fd5b81019080803590602001909291908035906020019064010000000081111561008357600080fd5b82018360208201111561009557600080fd5b803590602001918460018302840111640100000000831117156100b757600080fd5b9091929391929390505050610141565b005b61010b600480360360208110156100df57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104b3565b005b61011561054f565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61100173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101e4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f496e76616c69642073656e64657200000000000000000000000000000000000081525060200191505060405180910390fd5b6000806060848460608110156101f957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561025657600080fd5b82018360208201111561026857600080fd5b8035906020019184600183028401116401000000008311171561028a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050509250925092507ff091cd9cbbaff01426d8183042dff452ef18e6690f19816d5dd114e00761e0e8838383604051808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561037957808201518184015260208101905061035e565b50505050905090810190601f1680156103a65780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a18173ffffffffffffffffffffffffffffffffffffffff16639a7c4b718785846040518463ffffffff1660e01b8152600401808481526020018373ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561044557808201518184015260208101905061042a565b50505050905090810190601f1680156104725780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801561049357600080fd5b505af11580156104a7573d6000803e3d6000fd5b50505050505050505050565b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461050c57600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fea26469706673582212200bdcfd65315e64d5f0ec860741e1cc6695c5e01920326ec06cadc7f8a48e45ff64736f6c63430007030033

Deployed Bytecode Sourcemap

503:761:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;787:474;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;659:120;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;545:21;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;787:474;909:42;887:65;;:10;:65;;;879:92;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;983:25;1010:16;1028:17;1060:5;;1049:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;982:111;;;;;;1109:47;1122:17;1141:8;1151:4;1109:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1187:8;1167:52;;;1220:7;1229:17;1248:4;1167:86;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;787:474;;;;;;:::o;659:120::-;739:3;721:22;;:6;;;;;;;;;;:22;;;713:31;;;;;;764:7;755:6;;:16;;;;;;;;;;;;;;;;;;659:120;:::o;545:21::-;;;;;;;;;;;;:::o

Swarm Source

ipfs://0bdcfd65315e64d5f0ec860741e1cc6695c5e01920326ec06cadc7f8a48e45ff

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

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.