Skip to content

Commit

Permalink
add deposit rgas coin from module address
Browse files Browse the repository at this point in the history
  • Loading branch information
mx819812523 committed Dec 19, 2024
1 parent 089bb48 commit f8af999
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions apps/invitation_record/sources/invitation.move
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module invitation_record::invitation {
use std::option;
use std::string::String;
use std::vector;
use moveos_std::signer::module_signer;
use moveos_std::signer;
use moveos_std::consensus_codec;
use twitter_binding::tweet_v2;
Expand Down Expand Up @@ -117,6 +118,16 @@ module invitation_record::invitation {
deposit_to_rgas_store(account, &mut faucet.rgas_store, amount);
}

public entry fun deposit_rgas_coin_from_module_address(
faucet_obj: &mut Object<InvitationConf>,
amount: u256,
_admin: &mut Object<AdminCap>,
){
let account = module_signer<InvitationConf>();
let faucet = object::borrow_mut(faucet_obj);
deposit_to_rgas_store(&account, &mut faucet.rgas_store, amount);
}

public entry fun withdraw_rgas_coin(
faucet_obj: &mut Object<InvitationConf>,
amount: u256,
Expand Down

0 comments on commit f8af999

Please sign in to comment.