WokenExchange
Woken Exchange
  • 👋Welcome to Woken Exchange
  • Preface
    • 💡Birth of the idea
    • ⏮️Project genesis
  • Predefined Trading Hours?
    • 👷For Web3 Builders
    • 👨‍💼For Investors
    • 🏬For IRL companies
    • 🌍To boost the adoption
    • 🏢For Institutionals ?
    • ⚖️To seduce the States ?
  • Woken V1 : our solution
    • 🔬Overview
    • 🔃Swap open/closed
    • 🅿️Pool open/closed
    • ⏳Timekeeper
      • 🕓Settings Trading Hours
      • ⚙️Safety Tools
    • ✅Certified Projects
    • 👥DAO : vote
      • 🗳️Woken Protocol Votes
        • 📓How to submit and vote for the Woken Protocol?
      • ✅Woken Certified Projects : vote market
        • 📓How to submit and vote market?
      • ⚙️Snapshot API
  • PROTOCOL & Tokenomic
    • 🪙$WKN Woken DAO Token
    • 📊Tokenomic
    • 💲DAO Rewards
    • 🔁Fees
    • ⛓️Multi-chain
    • 🛣️Roadmap
  • Woken V2 : evolutions
    • 🚀Woken V2
  • Tools
    • 🤖Woken Timekeeper Events BOT
    • 🛡️Sample ERC20 protected by Timekeeper
  • Team
    • 👨‍💻Core Team and Contributors
  • Security
    • 🔐Audit & Verifications
    • 📔Contracts and wallets
  • FAQ
    • ❔Frequently Asked Questions
  • Media kit
    • 📸Logo
    • 📩Contact
  • Official Links
    • 🌐Links
  • Legal
    • Legal Disclaimer
Powered by GitBook
On this page
  • Benefits
  • How to setup the ERC20 Timekeeper ?
  • Step 1 : find your pair address
  • Step 2 : set the pair address on your erc20 token
  • Step 3 : enable the erc20 timekeeper
  1. Tools

Sample ERC20 protected by Timekeeper

Protect transfers

PreviousWoken Timekeeper Events BOTNextCore Team and Contributors

Last updated 1 year ago

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 !

🛡️
Timekeeper
https://github.com/WokenExchange/example-erc20-tokengithub.com
Your Tx after pair creation (example with the WKN token)
Pair Address (example with the pair address of the WKN token)
add your pair address
write true