{"id":26582974,"url":"https://github.com/capybara003/antibot-contract","last_synced_at":"2025-03-23T08:19:13.704Z","repository":{"id":281890918,"uuid":"946511748","full_name":"Capybara003/Antibot-contract","owner":"Capybara003","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-11T09:01:09.000Z","size":51,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T17:54:07.836Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Capybara003.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-11T08:58:58.000Z","updated_at":"2025-03-11T09:01:14.000Z","dependencies_parsed_at":"2025-03-11T17:54:13.657Z","dependency_job_id":"5b426ead-de2e-491e-bca6-5e2dd82ead27","html_url":"https://github.com/Capybara003/Antibot-contract","commit_stats":null,"previous_names":["capybara003/antibot-contract"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Capybara003%2FAntibot-contract","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Capybara003%2FAntibot-contract/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Capybara003%2FAntibot-contract/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Capybara003%2FAntibot-contract/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Capybara003","download_url":"https://codeload.github.com/Capybara003/Antibot-contract/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245072967,"owners_count":20556462,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-23T08:19:13.178Z","updated_at":"2025-03-23T08:19:13.663Z","avatar_url":"https://github.com/Capybara003.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"## PinkAntiBot Contract Address:\n\n1. MAINNET: 0xf4f071EB637b64fC78C9eA87DaCE4445D119CA35\n2. BSC: 0x8EFDb3b642eb2a20607ffe0A56CFefF6a95Df002\n3. BSC_TESTNET: 0xbb06F5C7689eA93d9DeACCf4aF8546C4Fe0Bf1E5\n4. MATIC: 0x56a79881b65B03F27b088B753B6c128485642FC3\n5. KCC_MAINNET: 0x2A7F08C820f3382D38B855ba59ad26444938a2b5\n6. AVAX: 0x18F349aD12d7d7f029B3b22e0B01c6D88a0D2066\n7. FTM: 0xcA461AcF6A9E68FA6D53410eba43cefde7dF5466\n8. CRONOS: 0x785A195F7b6a0dDaf7E41EBcBddE7a98F4Cb24A9\n\n## PinkAntiBot integration guide\n\n1. Add this interface to your codebase:\n\n`IPinkAntiBot.sol`\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity \u003e=0.5.0;\n\ninterface IPinkAntiBot {\n  function setTokenOwner(address owner) external;\n\n  function onPreTransferCheck(\n    address from,\n    address to,\n    uint256 amount\n  ) external;\n}\n```\n\n2. Update your token contract:\n\n```diff\n+import \"path/to/IPinkAntiBot.sol\";\n\ncontract MyToken {\n+ IPinkAntiBot public pinkAntiBot;\n\n  constructor(\n    string memory name_,\n    string memory symbol_,\n    uint8 decimals_,\n    uint256 totalSupply_,\n+   address pinkAntiBot_ \n  ) {\n    ... omitted for clarity\n\n    // Create an instance of the PinkAntiBot variable from the provided address\n+   pinkAntiBot = IPinkAntiBot(pinkAntiBot_);\n    // Register the deployer to be the token owner with PinkAntiBot. You can\n    // later change the token owner in the PinkAntiBot contract\n+   pinkAntiBot.setTokenOwner(msg.sender);\n  }\n\n  // Inside ERC20's _transfer function:\n  function _transfer(\n    address sender,\n    address recipient,\n    uint256 amount\n  ) internal virtual {\n    require(sender != address(0), \"ERC20: transfer from the zero address\");\n    require(recipient != address(0), \"ERC20: transfer to the zero address\");\n+   pinkAntiBot.onPreTransferCheck(sender, recipient, amount);\n  }\n}\n```\n\n3. Visit https://www.pinksale.finance/#/antibot, update your settings. After that please enable Pink Anti-Bot (Pay 1 BNB fee at first time)\n\n![alt text](https://github.com/pinkmoonfinance/pink-antibot-guide/blob/main/pink-anti-bot-dashboard.png)\n\n4. (Optional): If you want more control over how `PinkAntiBot` is enabled or disabled, you can do it inside your contract instead of relying on `PinkAntiBot` contract's configuration:\n\n\n```diff\nimport \"path/to/IPinkAntiBot.sol\";\n\ncontract MyToken {\n  IPinkAntiBot public pinkAntiBot;\n+ bool public antiBotEnabled;\n\n  constructor(\n    string memory name_,\n    string memory symbol_,\n    uint8 decimals_,\n    uint256 totalSupply_,\n    address pinkAntiBot_ \n  ) {\n    ... omitted for clarity\n\n    // Create an instance of the PinkAntiBot variable from the provided address\n    pinkAntiBot = IPinkAntiBot(pinkAntiBot_);\n    // Register the deployer to be the token owner with PinkAntiBot. You can\n    // later change the token owner in the PinkAntiBot contract\n    pinkAntiBot.setTokenOwner(msg.sender);\n+   antiBotEnabled = true;\n  }\n\n  // Use this function to control whether to use PinkAntiBot or not instead\n  // of managing this in the PinkAntiBot contract\n+ function setEnableAntiBot(bool _enable) external onlyOwner {\n+   antiBotEnabled = _enable;\n+ }\n\n  // Inside ERC20's _transfer function:\n  function _transfer(\n    address sender,\n    address recipient,\n    uint256 amount\n  ) internal virtual {\n    require(sender != address(0), \"ERC20: transfer from the zero address\");\n    require(recipient != address(0), \"ERC20: transfer to the zero address\");\n    // Only use PinkAntiBot if this state is true\n+   if (antiBotEnabled) {\n      pinkAntiBot.onPreTransferCheck(sender, recipient, amount);\n+   }\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapybara003%2Fantibot-contract","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapybara003%2Fantibot-contract","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapybara003%2Fantibot-contract/lists"}