Skip to content

Commit

Permalink
feat(near-contract-standards): export ext_storage_management Promise …
Browse files Browse the repository at this point in the history
…shortcuts, so Storage Management interfaces can be used in contracts to call external contracts using the high-level cross-contract call interfaces (#1208)
  • Loading branch information
aleksuss authored Jun 26, 2024
1 parent 8c978a4 commit c843e9a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions near-contract-standards/src/storage_management/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use near_sdk::{near, AccountId, NearToken};
use near_sdk::{ext_contract, near, AccountId, NearToken};

#[near(serializers=[borsh, json])]
pub struct StorageBalance {
Expand Down Expand Up @@ -75,6 +75,7 @@ pub struct StorageBalanceBounds {
///
/// ```
///
#[ext_contract(ext_storage_management)]
pub trait StorageManagement {
// if `registration_only=true` MUST refund above the minimum balance if the account didn't exist and
// refund full deposit if the account exists.
Expand Down Expand Up @@ -106,7 +107,7 @@ pub trait StorageManagement {
///
/// If `force=true` the function SHOULD ignore account balances (burn them) and close the account.
/// Otherwise, MUST panic if caller has a positive registered balance (eg token holdings) or
/// the contract doesn't support force unregistration.
/// the contract doesn't support force deregistration.
/// MUST require exactly 1 yoctoNEAR attached balance to prevent restricted function-call access-key call
/// (UX wallet security)
/// Returns `true` iff the account was unregistered.
Expand Down

0 comments on commit c843e9a

Please sign in to comment.