AdminWallet
Helper contract for our backend servers to whitelist users and to fill their Fuse network gas.
Events
AdminsAdded
Emitted when new admins were added.
admins
The addresses of the admins that were added.
AdminsRemoved
Emitted when old admins were removed.
admins
The addresses of the admins that were removed.
WalletTopped
Emitted when the specific user address was topped.
user
The users address that was topped.
amount
The amount that was sent.
GenericCall
Emitted when the wallet is performing some tx.
_contract
The contract that was called.
_data
The data of the tx.
_value
The amount of the native token that was sent.
_success
The status of the performed tx.
setBonusContract
Sets the SignUpBonus contract address.
_bonus
The new address of the SignUpBonus contract.
Can only be called by the admin.
addAdmins
Function to add list of addresses to admins list.
_admins
The list of addresses to add as admins list.
Can only be called by the admin.
removeAdmins
Function to remove list of addresses from admins list.
_admins
The list of addresses to remove from admins list.
Can only be called by the admin.
topAdmins
Function to top group of admins by indicies with amount of G$ given in constructor. The amount of times per day specified in the constructor.
startIndex
Starting index in the admins list.
endIndex
Ending index in the admins list.
Below there is the overriden variant which performs like the original except the endIndex
is set to 50 by default.
isAdmin
Function to check if given account is the admin.
_user
The account address to check.
Returns: true
if _user
is the admin, false
elsewise.
whitelist
Function to add given address to whitelist of identity contract.
_user
The account address to be added to whitelist.
_did
The DID of the _user
.
Can only be called by admins of wallet and if wallet is an IdentityAdmin.
removeWhitelist
Function to remove given address from whitelist of identity contract.
_user
The account address to whitelist.
Can only be called by admins of wallet and if wallet is an IdentityAdmin.
blacklist
Function to add given address to blacklist of identity contract.
_user
The account address to be added to blacklist.
Can only be called by admins of wallet and if wallet is an IdentityAdmin.
removeBlacklist
Function to remove given address from blacklist of identity contract.
_user
The account address to be removed from blacklist.
Can only be called by admins of wallet and if wallet is an IdentityAdmin.
topWallet
Function to top given address with amount of G$ given in constructor.
_user
The address to transfer to.
Can only be done by admin. The amount of times per day specified in constructor.
whitelistAndAwardUser
Function to whitelist user and also award him pending bonuses, it can be used also later when the user is already whitelisted to just award pending bonuses.
_user
The address to transfer to and whitelist.
_amount
The bonus amount to give.
_did
Decentralized ID of user, pointer to some profile.
Can only be done by admin.
awardUser
Function to award user with pending bonuses, can only be done by admin.
_user
The address to transfer to and whitelist.
_amount
The bonus amount to give.
genericCall
Perform a generic call to an arbitrary contract.
_contract
The contract's address to call.
_data
ABI-encoded contract call to call _contract
address.
_value
Value (native token) to transfer with the transaction.
Returns: pair of bool and bytes - success or fail and bytes of the called contract's function.
destroy
Destroy wallet and return funds to owner. Can only be executed by the admin.
Last updated