Icx

class Icx(context: IconScoreContext, address: Address)

Class for handling ICX coin transfer These functions are intended to be used for SCORE development.

get_balance(address: Address) → int

Returns the ICX balance of given address

Parameters:address – address
Returns:ICX balance of given address
send(addr_to: Address, amount: int) → bool

transfer the amount of icx to the given ‘addr_to’

Parameters:
  • addr_to – receiver address
  • amount – the amount of icx to transfer
Returns:

True(success) False(failed)

transfer(addr_to: Address, amount: int) → None

transfer the amount of icx to the given ‘addr_to’ If failed, an exception will be raised

Parameters:
  • addr_to – receiver address
  • amount – the amount of icx to transfer