mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 09:37:38 +00:00
529d359ca6
An update to the devnet to introduce a local heimdall to facilitate multiple validators without the need for an external process, and hence validator registration/staking etc. In this initial release only span generation is supported. It has the following changes: * Introduction of a local grpc heimdall interface * Allocation of accounts via a devnet account generator () * Introduction on 'Services' for the network config "--chain bor-devnet --bor.localheimdall" will run a 2 validator network with a local service "--chain bor-devnet --bor.withoutheimdall" will sun a single validator with no heimdall service as before --------- Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
29 lines
648 B
Solidity
29 lines
648 B
Solidity
// SPDX-License-Identifier: GPL-3.0
|
|
|
|
pragma solidity ^0.8.6;
|
|
|
|
import { TestStateSender } from "./teststatesender.sol";
|
|
|
|
contract RootSender {
|
|
TestStateSender stateSender;
|
|
address childStateReceiver;
|
|
mapping(address => uint) public sent;
|
|
|
|
constructor(
|
|
address stateSender_,
|
|
address childStateReceiver_
|
|
) {
|
|
stateSender = TestStateSender(stateSender_);
|
|
childStateReceiver = childStateReceiver_;
|
|
}
|
|
|
|
function sendToChild(uint amount) external {
|
|
uint total = sent[msg.sender];
|
|
sent[msg.sender] = total + amount;
|
|
|
|
stateSender.syncState(
|
|
childStateReceiver,
|
|
abi.encode(msg.sender, amount)
|
|
);
|
|
}
|
|
} |