Zilliqa / marketplace-contracts

GNU General Public License v3.0
2 stars 4 forks source link

[fixed price] Use AddFunds convention for ZIL transfer #12

Closed bb111189 closed 2 years ago

bb111189 commented 2 years ago
      is_native_zil = builtin eq payment_token_address zero_address;
      match is_native_zil with
        | False =>
        | True =>
          msg = {
            _tag: "TransferNativeZIL";
            _recipient: _sender;
            _amount: sale_price
          };
          msgs = one_msg msg;
          send msgs
      end;

Use AddFunds instead of TransferNativeZIL as per ZRC-5

bb111189 commented 2 years ago

Same for

    msg_to_royalty_recipient = {
      _tag: "TransferNativeZIL";
      _recipient: royalty_recipient;
      _amount: royalty_amount
    };

    msg_to_svc_fee_recipient = {
      _tag: "TransferNativeZIL";
      _recipient: svc_fee_recipient;
      _amount: svc_fee
    };

    msg_to_seller = {
      _tag: "TransferNativeZIL";
      _recipient: seller;
      _amount: seller_profit
    };