FEG Token

Guide for "Write Contract" function

This function is meant for DEVELOPERS / OWNERS
The "Write Contract" function allows the owner or other whitelisted wallet addresses to make various changes to the contract in order to set it up properly for use as a time-locked wallet/faucet. In order to be able to edit all these options listed below in this page you will need to connect your wallet by clicking on the "Connect to Web3" button as shown in the ecample image. We recommend you connect with Metamask on a laptop/desktop for a good experience.

1. addClaimer

The owner of the contract can use this option to whitelist any other wallet address that he wants to turn into a second admin/owner of this contract. Use this option carefully and only whitelist wallets belonging to people you know and trust

2. addTeamTokens

This can be used to add more tokens to the contract, at any point in time, by taking tokens from the wallet of the owner or whoever is currently connected to the contract. The tokens added this way are added on top of the already existing ones and automatically locked. However keep in mind that in order to be able to use this option you first need to go to the contract address of the tokens you wish to lock and basically whitelist this time-locked contract, to give permission to this contract to move tokens, otherwise if you attempt to use this option you'll receive an error with a very large gas fee. In our example, the tokens locked inside here are FEG tokens, so we need to go on BSCscan to FEG's address, to the "Write Contract" function, connect the wallet, then in field "1. approve" copy/paste your time-locked contract address and type in some huge random amount too, then click "Write" button and wait for transaction to execute. After doing all this, NOW you can go back to your own time-locked contract and use the "2 addTeamTokens" option.

3. getReflections

This here is the main option that will most often get used, as it allows the owner or a whitelisted address to claim all current reflections available in the wallet. When clicking the "Write" button you'll be presented with a gas fee dialog from your wallet, accept it and wait for the transaction executes. Once that goes through you will notice all the tokens which were inside the contract as reflections are now inside the wallet of whoever initiated this operation.

4. increaseLockByDays

Say your locking time has expired, is zero or maybe you simply want to add more days to whatever the number may be for the current timer, well you can do that, you can add additional days to the locking period using this option. It's fairly simple to use, if you for example want to increase the lock time by 50 days, then just type 50 in the "amount" field and then click "Write". The timer will now be whatever it was before + the additional 50 days you just added now.

5. removeClaimer

You may use this option to remove a wallet address from the whitelist of admins for this contract, if you for example feel that you can no longer trust the owner of one of those wallets. It is always advisable that keep to an absolute minimum the number of people who have admin access granted to this contract, for obvious reasons.

6. setAddress

You need to use this option in order to let the system know what tokens are supposed to be locked, from the ones placed in the contract. Say you have already transferred 6 different tokens inside the contract but you only wish to lock just one of them, well then copy/paste the contract address of that particular token in this field and click "Write", then the system will know which tokens are supposed to be locked and which shouldn't be. You need to perform this step even if you only have a single token type in your contract.

7. sync

Say you have 2000 FEG locked in the contract, but also 500 FEG unlocked as reflections, you may use this "sync" option to add to the locked amount all the tokens which are currently unlocked, which you mean you now have 2500 locked FEG. So this option locks all the tokens currently inside the contract, regardless if those tokens arrived there as reflections, or if someone (anyone) sent them to this address manually for whatever reason. This is useful if maybe you have members inside your community who would like to increase the number of tokens inside the time-locked contract, in order for this contract to receive more reflections as a result of holding a bigger bag. So they send their tokens and then you, the owner, can "sync" the contract and lock everything up.

8. unlock

This option only works after the locking timer has reached zero, and it allows you, the owner, to unlock all the tokens in the contract, at which point you can withdraw them to your wallet using the "3. getReflections" function. If you try using this function while the locking period is not over, you will be met with a very high gas fee and the transaction will fail.