This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // creating a state dump file (one time job), later on it's uploaded to S3 or something. | |
| // We could build an API service with an archive node that can compute state dumps at any block you request and then cache them. | |
| remote_externalities::Builder::new() | |
| .module("PhragmenElection") | |
| .uri(URI.to_owned()) | |
| .at(now) | |
| .dump_to_file(format!("PhragmenElection-at-{}-polkadot.statedump", now, URI)) | |
| .await; | |
| /// actual test (can be re-run as many times you want, without the need to access an actual node) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// A helper type to allow using arbitrary SCALE-encoded leaf data in the RuntimeApi. | |
| /// | |
| /// The point is to be able to verify MMR proofs from external MMRs, where we don't | |
| /// know the exact leaf type, but it's enough for us to have it SCALE-encoded. | |
| /// | |
| /// Note the leaf type should be encoded in it's compact form when passed through this type. | |
| /// See [FullLeaf] documentation for details. | |
| #[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))] | |
| #[derive(RuntimeDebug, Clone, PartialEq)] | |
| pub struct OpaqueLeaf( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type PayloadType = { | |
| }; | |
| type EstimateFeeType = {}; | |
| class ApiCalls { | |
| async estimateFee(chain: Chain, laneId: LaneId, payload: PayloadType): EstimateFeeType { | |
| const payloadType = createType(chain, "OutboundPayload", payload); |
OlderNewer