squid_py.ocean.ocean_tokens module

Ocean module.

class squid_py.ocean.ocean_tokens.OceanTokens(keeper)

Bases: object

Ocean token class.

approve(spender_address, amount, sender_account)

Approve allowance of tokens to be spent by spender_address with the limit of the ‘amount’. Transaction is signed by sender_account.

Parameters
  • spender_address – hex str ethereum address to assign the allowance

  • amount – int number of tokens to approve

  • sender_account – Account instance to take the tokens from

Returns

bool

request(account, amount)

Request a number of tokens to be minted and transfered to account

Parameters
  • account – Account instance requesting the tokens

  • amount – int number of tokens to request

Returns

bool

transfer(receiver_address, amount, sender_account)

Transfer a number of tokens from sender_account to receiver_address

Parameters
  • receiver_address – hex str ethereum address to receive this transfer of tokens

  • amount – int number of tokens to transfer

  • sender_account – Account instance to take the tokens from

Returns

bool