🛡️Sample ERC20 protected by Timekeeper

Protect transfers

You haven't created your token yet and want to protect it from being transferred when your market is closed with the Woken Exchange's Timekeeper?

We provide a free ERC20 template that allows you to protect your token from being transferred when your market is closed on the DEX.

modifier tradingMustBeOpen
exampletoken.sol
modifier tradingMustBeOpen() { //to check the trading status on the Woken Exchange
        if (timekeeperEnabled) {
            require(IWokenFactory(wokenFactory).isTradingOpen(pairAddress), "WokenExchange : Trading / Transfer is Closed");
        }

Of course, you can customize it with the functions you want: name, supply, mint, burn, buy or sell taxes, etc...

The WKN, the erc20 token of Woken Exchange, is protected in the same way.

Benefits

How to setup the ERC20 Timekeeper ?

You just have to set your pair address and enable the erc20 timekeeper

Step 1 : find your pair address

At the creation of your liquidity on Woken Exchange. Once you've created your LP, go to Arbiscan and find your Tx.

and click on Woken LP Token (WLP) to open the WLP token details page on Arbiscan to get your pair address

Step 2 : set the pair address on your erc20 token

Now that you have your pair address, go to Arbiscan to set it on your erc20 token

On your contract token address, go to "contract", "white contract" and "setPairAddress" Past here your pair address you get on the step 1 and click on "write" (be sure to be connected to your contract address on Arbiscan with the deployer address of your erc20 token)

Step 3 : enable the erc20 timekeeper

Once the pair address has been set on your erc20 token, open "enableTimkeeper" and write "true". And click on "Write"

Your erc20 token is now protected by the WokenExchange Timekeeper *the woken factory address is already set to the exampletoken contract constructor, so you don't have to set it. If you need some help, do not hesitate to contact the Team on the Discord server, we will help you !

Last updated