Comments (2)
Adding contract code for easy debugging
pragma solidity <=0.8.0;
pragma experimental ABIEncoderV2;
// This interface is designed to be compatible with the Vyper version.
/// @notice This is the Ethereum 2.0 deposit contract interface.
/// For more information see the Phase 0 specification under https://github.com/ethereum/eth2.0-specs
interface IDepositContract {
/// @notice A processed deposit event.
event DepositEvent(
bytes pubkey,
bytes withdrawal_credentials,
bytes amount,
bytes signature,
bytes index
);
/// @notice Submit a Phase 0 DepositData object.
/// @param pubkey A BLS12-381 public key.
/// @param withdrawal_credentials Commitment to a public key for withdrawals.
/// @param signature A BLS12-381 signature.
/// @param deposit_data_root The SHA-256 hash of the SSZ-encoded DepositData object.
/// Used as a protection against malformed input.
function deposit(
bytes calldata pubkey,
bytes calldata withdrawal_credentials,
bytes calldata signature,
bytes32 deposit_data_root
) external payable;
/// @notice Query the current deposit root hash.
/// @return The deposit root hash.
function get_deposit_root() external view returns (bytes32);
/// @notice Query the current deposit count.
/// @return The deposit count encoded as a little endian 64-bit number.
function get_deposit_count() external view returns (bytes memory);
}
contract MD {
IDepositContract public deposit_contract;
constructor() {
deposit_contract = IDepositContract(0x07b39F4fDE4A38bACe212b546dAc87C58DfE3fDC); // Medalla deposit contract address
}
function DepMulti(bytes[] memory pubkey, bytes[] memory withdrawal_credentials, bytes[] memory signature, bytes32[] memory deposit_data_root) public payable {
require(pubkey.length == withdrawal_credentials.length);
require(pubkey.length == signature.length);
require(pubkey.length == deposit_data_root.length);
for (uint i = 0; i < pubkey.length; i++) {
deposit_contract.deposit{value:32000000000000000000}(pubkey[i], withdrawal_credentials[i],signature[i],deposit_data_root[i]);
}
}
}
from eth2-beaconchain-explorer.
Thank you very much, I did not think about multiple deposits in a single tx!
from eth2-beaconchain-explorer.
Related Issues (20)
- Bug
- Would like to pay someone who can help to run this project locally HOT 3
- Building fails on arm64
- --monitoring-endpoint 'https://beaconcha.in/api/v1/client/metrics?apikey=
- Error when broadcasting message to set withdrawal address using WAGYU HOT 1
- #8 writing image sha256:136e285e879326283bb03a63bc19d904068621785a73665b06cdc3fd4e98f209 done
- build failed: "swag: command not found" HOT 1
- Does the explorer support besu client? HOT 2
- Local deployment failed HOT 1
- Connect to local besu client failed: Connection Refused
- ApiValidatorAttestationEfficiency does not return pubKey as it used to do sometime ago HOT 3
- Slack and Telegram webhook issue HOT 1
- Feature Request: API that would return the next ~ scheduled withdrawal time/slot/epoch? HOT 1
- No data for deposited validator using /api/v1/validator/ endpoint HOT 1
- detail HOT 1
- Validator daily stats with unexpectedly high CL rewards HOT 2
- Currency value becomes incorrect when switching back to tab
- Cannot adjust withdrawal amount. HOT 4
- Returns charts from the page https://beaconcha.in/charts as PNG HOT 1
- #2876
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eth2-beaconchain-explorer.