Child chain side of a Polygon data bridge meant to execute commands on the child chain
This can be used to execute commands forwarded from the DAO on the root chain
Note this contains internal vars as well due to a bug in the docgen procedure
Var | Type |
---|---|
latestStateId | uint256 |
latestRootMessageSender | address |
latestData | bytes |
PolygonDAOChild constructor
calls FxBaseChildTunnel(_fxChild)
function constructor(
address _fxChild
) public FxBaseChildTunnel
Modifier |
---|
FxBaseChildTunnel |
Arg | Type | Description |
---|---|---|
_fxChild |
address | Address of FxStateChildTunnel from https://docs.matic.network/docs/develop/l1-l2-communication/state-transfer/ |
Enables contract to receive ETH
function receive(
) external
No modifiers
Called when there is a message from the root chain
This executes a DAO command on the child chain
function _processMessageFromRoot(
uint256 _stateId,
address _sender,
bytes _data
) internal validateSender
Modifier |
---|
validateSender |
Arg | Type | Description |
---|---|---|
_stateId |
uint256 | StateId |
_sender |
address | This should be the root chain end of the tunnel |
_data |
bytes | ABI encoded payload to execute |