Method: IOSTSdk::Main#transfer

Defined in:
lib/iost_sdk.rb

#transfer(token:, from:, to:, amount:, memo:) ⇒ Object

Create an instance IOSTSdk::Models::Transaction with an action to transfer tokens



115
116
117
118
119
120
121
122
123
124
# File 'lib/iost_sdk.rb', line 115

def transfer(token:, from:, to:, amount:, memo:)
  call_abi(
    contract_id: 'token.iost',
    abi_name: :transfer,
    abi_args: [token, from, to, amount.to_s, memo]
  )
  @transaction.add_approve(token: :iost, amount: amount)

  self
end