Restore the coins pallet to the runtime

This commit is contained in:
Luke Parker
2025-03-06 05:53:18 -05:00
parent b08ae8e6a7
commit d3d539553c
12 changed files with 273 additions and 215 deletions

View File

@@ -6,6 +6,10 @@ use crate::{address::ExternalAddress, balance::ExternalBalance};
/// An instruction on how to transfer coins out.
#[derive(Clone, PartialEq, Eq, Debug, Zeroize, BorshSerialize, BorshDeserialize)]
#[cfg_attr(
feature = "non_canonical_scale_derivations",
derive(scale::Encode, scale::Decode, scale::MaxEncodedLen)
)]
pub enum OutInstruction {
/// Transfer to the specified address.
Transfer(ExternalAddress),
@@ -13,6 +17,10 @@ pub enum OutInstruction {
/// An instruction on how to transfer coins out with the balance to use for the transfer out.
#[derive(Clone, PartialEq, Eq, Debug, Zeroize, BorshSerialize, BorshDeserialize)]
#[cfg_attr(
feature = "non_canonical_scale_derivations",
derive(scale::Encode, scale::Decode, scale::MaxEncodedLen)
)]
pub struct OutInstructionWithBalance {
/// The instruction on how to transfer coins out.
pub instruction: OutInstruction,