Flex
Flex exchange system
Public Member Functions | List of all members
IUserIdIndex Interface Reference

UserIdIndex contract interface. There is no way to understand which wallets were created for some FlexClient. So we need UserID Index for it. This contract contains FlexClient address in code salt and we can find all such contracts for specified FlexClient by code hash. It can be deployed only by its corresponding FlexClient. More...

#include <UserIdIndex.hpp>

Public Member Functions

void onDeploy (uint256 lend_pubkey, string name, uint128 evers_to_auth_idx, uint128 refill_wallet, uint128 min_refill)
 Check that msg.sender is an owner (from configuration salt). Deploy AuthIndex with lend_pubkey. More...
 
void reLendPubkey (uint256 new_lend_pubkey, uint128 evers_to_remove, uint128 evers_to_auth_idx)
 Remove AuthIndex with lend_pubkey. Deploy AuthIndex with new_lend_pubkey. Set lend_pubkey = new_lend_pubkey. More...
 
void remove ()
 
uint256 requestLendPubkey (uint128 evers_balance)
 Request lend pubkey (current app pubkey). More...
 
void transfer (address dest, uint128 value, bool bounce)
 Transfer evers. More...
 
void setRefillWallet (uint128 refill_wallet, uint128 min_refill)
 Set re-fill wallet value. More...
 
UserIdIndexSalt getConfig ()
 Get config from code salt.
 

Detailed Description

UserIdIndex contract interface. There is no way to understand which wallets were created for some FlexClient. So we need UserID Index for it. This contract contains FlexClient address in code salt and we can find all such contracts for specified FlexClient by code hash. It can be deployed only by its corresponding FlexClient.

Member Function Documentation

◆ onDeploy()

void onDeploy ( uint256  lend_pubkey,
string  name,
uint128  evers_to_auth_idx,
uint128  refill_wallet,
uint128  min_refill 
)

Check that msg.sender is an owner (from configuration salt). Deploy AuthIndex with lend_pubkey.

Parameters
lend_pubkeyLend public key
nameUser name (encoded)
evers_to_auth_idxEvers to AuthIndex deploy
refill_walletRe-fill wallet on transfer received
min_refillMinimum refill value

◆ reLendPubkey()

void reLendPubkey ( uint256  new_lend_pubkey,
uint128  evers_to_remove,
uint128  evers_to_auth_idx 
)

Remove AuthIndex with lend_pubkey. Deploy AuthIndex with new_lend_pubkey. Set lend_pubkey = new_lend_pubkey.

Parameters
new_lend_pubkeyNew lend public key
evers_to_removeEvers for `AuthIndex->remove` call. The remaining will return to the caller (FlexClient).
evers_to_auth_idxEvers for new AuthIndex deploy.

◆ remove()

void remove ( )

Remove AuthIndex with lend_pubkey. Redirects the rest of message evers to AuthIndex->remove call. AuthIndex will return the remaining to this method caller (FlexClient).

◆ requestLendPubkey()

uint256 requestLendPubkey ( uint128  evers_balance)

Request lend pubkey (current app pubkey).

Parameters
evers_balanceEvers balance of the wallet

◆ setRefillWallet()

void setRefillWallet ( uint128  refill_wallet,
uint128  min_refill 
)

Set re-fill wallet value.

Parameters
refill_walletRe-fill wallet on transfer received
min_refillMinimum refill value

◆ transfer()

void transfer ( address  dest,
uint128  value,
bool  bounce 
)

Transfer evers.

Parameters
destDestination address
valueAmount of evers
bounceBounce flag

The documentation for this interface was generated from the following file: