• Wei Tang's avatar
    Pallet: Atomic Swap (#6349) · bd72cb62
    Wei Tang authored
    
    
    * Init atomic swap pallet
    
    * Implement module swap operations
    
    * Add successful swap test
    
    * Bump node spec_version
    
    * Fix storage name
    
    * Add ProofLimit parameter to prevent proof size being too large
    
    * Add missing events
    
    * Basic weight support
    
    * Add basic docs
    
    * Mark swap on claim
    
    This handles the additional case if `repatriate_reserved` fails.
    
    * Add additional expire handler
    
    * Update frame/atomic-swap/src/lib.rs
    
    Co-authored-by: default avatarShawn Tabrizi <[email protected]>
    
    * Add docs on ProofLimit
    
    * Fix test
    
    * Return Ok(()) even when the transfer fails
    
    Because we need to mark the swap as claimed no matter what.
    
    * Remove retry logic
    
    It's overkill. Swap is about something being executed, not necessarily successful.
    Although there should be logic (reserve and unreserve) to make it so that both parties *believes*
    that the execution is successful.
    
    * succeed -> succeeded
    
    * Add docs on duration -- revealer should use duration shorter than counterparty
    
    * Missing trait type
    
    Co-authored-by: default avatarShawn Tabrizi <[email protected]>
    bd72cb62