Skip to content

Commit

Permalink
Set special opcode for plugin->beneficiar transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
EmelyanenkoK committed Dec 9, 2021
1 parent 2443dc0 commit 71b7db7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion func/simple-subscription-plugin.fc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ int wallet_processing_amount() asm "16777216 PUSHINT";
int op:destruct() asm "0x64737472 PUSHINT";
int op:payment_request() asm "0x706c7567 PUSHINT";
int op:fallback() asm "0x756e6b77 PUSHINT";
int op:subscription() asm "0x73756273 PUSHINT";

;; storage$_ wallet:MsgAddressInt
;; beneficiary:MsgAddressInt
Expand Down Expand Up @@ -128,7 +129,7 @@ int op:fallback() asm "0x756e6b77 PUSHINT";
(int from_wc, _) = s_addr.parse_std_addr();
if( ~(flags & 1) & (msg_value > amount - chain::short_msg_fwd_fee(from_wc) ) ) {
last_payment = now();
forward_funds(beneficiary, false, op:payment_request());
forward_funds(beneficiary, false, op:subscription());
}
if (~ start_at) {
start_at = now();
Expand Down

0 comments on commit 71b7db7

Please sign in to comment.