KyberSwap Docs
  • Introduction to KyberSwap
  • Getting Started
    • Quickstart
      • FAQ
    • Supported Exchanges And Networks
    • Foundational Topics
      • Decentralized Finance
        • Tokens
        • Stablecoins
        • DEX/DeFi Aggregator
        • Slippage
        • Price Impact
        • Zap
        • Maximal Extractable Value (MEV)
      • Decentralized Technologies
        • Wallets
        • Dapps
        • RPC
        • Oracles
        • On-Chain vs Off-Chain Data
      • Other Valuable Resources
  • KyberSwap Solutions
    • KyberSwap Interface
      • User Guides
        • Connect Your Wallet
        • Switching Networks
        • Instantly Swap At Superior Rates
        • Swap At Your Preferred Rates
        • Cross-chain Swap
        • Add Your Favourite Tokens
        • Get Crypto With Fiat
        • Bridge Your Assets Across Multiple Chains
      • Profiles
        • Profile Creation
        • Profile Customization
        • Sync Profile Across Devices
      • Notifications
        • Notification Center
    • KyberSwap Aggregator
      • Concepts
        • Dynamic Trade Routing
      • User Guides
        • Instantly Swap At Superior Rates
      • Developer Guides
        • Execute A Swap With The Aggregator API
        • Upgrading To APIv1
      • Aggregator API Specification
        • EVM Swaps
        • Permit
      • Contracts
        • Aggregator Contract Addresses
      • DEX IDs
      • Subgraphs
      • FAQ
    • KyberSwap Zap as a Service
      • KyberSwap Zap as a Service (ZaaS) API
        • ZaaS HTTP API
        • ZaaS GRPC API
      • KyberSwap Zap Liquidity Widget
      • Zap Fee Model
      • Zap's Supported Chains/Dexes
      • Zap's Deployed Contract Addresses
      • Zap's DEX IDs
    • KyberSwap Widget
      • Developer Guides
        • Integrating The KyberSwap Widget
        • Customizing The KyberSwap Widget
      • iFrame Alternative
      • Widget/iFrame Fee
    • KyberSwap Liquidity Widget
      • Integrating The KyberSwap Liquidity Widget
    • Limit Order
      • Concepts
        • Off-Chain Relay, On-Chain Settlement
        • Gasless Cancellation
      • User Guides
        • Swap At Your Preferred Rates
        • Update Limit Orders
        • Cancel Limit Orders
      • Developer Guides
        • Create Limit Order
        • Gasless Cancel
        • Hard Cancel
        • Fill Limit Order
      • Contracts
        • Limit Order Contract Addresses
      • Limit Order API Specification
        • General APIs
        • Maker APIs
        • Taker APIs
      • FAQ
    • KyberSwap OnChain Price Service
    • Fee Schedule
  • Governance
    • KyberDAO
      • User Guides
        • Participating in KyberDAO
        • Staking
        • Voting
        • Stake KNC And Enjoy Gas Savings
      • Fees to KyberDAO
      • KyberDAO Operator MultiSig
      • Contracts
        • KyberDAO Contract Repo
        • KyberDAO Contract Addresses
      • FAQ - Others
    • KNC Token
      • KNC Tokenomics & Utility
      • Gas Refund Program
      • KNC Contract Addresses
  • Security
    • Audits
  • Reference
    • Legacy
      • KyberSwap Classic
        • Concepts
          • Programmable Pricing Curves
          • Dynamic Auto-Adjusting Fees
          • Virtual Balances
          • Protocol Fees
        • Contracts
          • Classic Contract Repo
          • Classic Contract Addresses
          • Classic Contract Farming Addresses
      • KyberSwap Elastic
        • Concepts
          • Concentrated Liquidity
          • Reinvestment Curve
          • Tick-Range Mechanism
          • Pool Process Flows
          • Anti-Sniping Mechanism
          • Tick-Based Farming
          • Elastic Zap
          • TWAP Oracle
          • Elastic APR Calculations
        • Contracts
          • Elastic Contract Repo
          • Elastic Contract Addresses
          • Elastic Farming Contract Addresses
          • Elastic Zap Contract Addresses
          • Elastic Core Contracts
          • Elastic Core Libraries
          • Elastic Periphery Core Contracts
          • Elastic Peripheral Library Contracts
          • Elastic Peripheral Base Contracts
        • Subgraphs
      • Whitepapers
      • Audits
      • KyberAI
        • KyberScore
        • Concepts
        • On-Chain Indicators
          • Number Of Trades
          • Trading Volume
          • Netflow To Whale Wallets
          • Netflow To CEX
          • Number Of Transfers
          • Volume Of Transfers
          • Number Of Holders
          • Top Holders
        • Technical Indicators
          • Live Charts
          • Support & Resistance Levels
          • Live Trades
          • Funding Rate On CEX
          • Liquidations On CEX
        • Liquidity Analysis
      • Elastic Legacy
        • Elastic Legacy Contract Repo
        • Elastic Legacy Contract Addresses
        • Elastic Legacy Farming Contract Addresses
        • Remove Elastic Legacy Liquidity
      • Protocol
        • Overview
        • Smart Contract Architecture
        • Trust and Security Model
      • Integrations
        • Getting Started
        • Use Cases
        • Integration Types
        • Smart Contracts
        • Ethers JS
        • RESTful API
        • Slippage Rate Protection
        • Price Feed Security
        • Contract Events
        • Platform Fees
      • Reserves
        • Getting Started
          • Overview
          • Why Develop On Kyber
          • Create New Reserve
          • Existing Reserves
          • Customising Existing Reserves
        • Development Guides
          • Fed Price Reserve
          • Automated Price Reserve
          • Reserves with Ganache
          • Orderbook Reserve
        • Operations
          • Listing Policies
          • Reserve IDs
          • Reserve Rebates
          • Sanity Rates
      • Addresses
        • Introduction
        • Mainnet
        • Kovan
        • Rinkeby
        • Ropsten
      • API/ABI
        • Introduction
        • RESTful API
          • RESTful API Overview
          • RESTful API
        • Core Smart Contracts
          • IKyberNetworkProxy
          • KyberNetworkProxy
          • IKyberNetwork
          • ISimpleKyberProxy
          • IKyberMatchingEngine
          • KyberMatchingEngine
          • IKyberHint
          • KyberHintHandler
          • IKyberHintHandler
          • IKyberFeeHandler
          • IKyberStaking
          • KyberStaking
          • IKyberDao
          • KyberDao
          • IKyberStorage
          • KyberStorage
          • IKyberHistory
          • KyberHistory
          • IKyberReserve
          • KyberReserve
          • ConversionRates
          • LiquidityConversionRates
          • EpochUtils
          • IEpochUtils
          • KyberFeeHandler
        • Contract ABIs
          • ABIs
        • Code Snippets
          • Token Quantity Conversion
        • Misc Contracts
          • KyberNetwork
          • ConversionRatesInterface
          • PermissionGroups
          • SanityRates
          • Withdrawable
          • OrderbookReserveInterface
          • OrderbookReserveLister
    • KyberSwap Operator MultiSig
    • Permitable Tokens
    • Third-Party Integrations
    • KyberSwap Analytics
    • KyberSwap App
    • GitHub
    • KyberSwap Analytics
    • KyberSwap Blog
    • Kyber Network Press Kit
  • Socials
    • X
    • Discord
    • Telegram
    • LinkedIn
    • Reddit
    • Instagram
    • Tik Tok
  • Support
    • KyberSwap Help Center
    • Complaints Handling Process
Powered by GitBook
On this page
  • contract PermissionGroups
  • INDEX​
  • REFERENCE​

Was this helpful?

  1. Reference
  2. Legacy
  3. API/ABI
  4. Misc Contracts

PermissionGroups

PreviousConversionRatesInterfaceNextSanityRates

Last updated 2 years ago

Was this helpful?

You are referring to the Legacy version of KyberSwap docs.

For the most updated information, please refer to:

contract PermissionGroups

Source:

The PermissionGroups contract's maintains function modifiers that makes sure permission conditions are met before executing any proceeding body of code.


INDEX

<AUTOGENERATED_TABLE_OF_CONTENTS>

REFERENCE

Events

AdminClaimed

Event for logging of the change of admin address.


event AdminClaimed(address newAdmin, address previousAdmin) | Parameter | Type | Description | | --------------- |:-------:|:------------------------------:| | newAdmin | address | address of the new admin | | previousAdmin | address | address of the previous admin |\

Event for logging the addition of an address with alerter role.


event AlerterAdded(address newAlerter, bool isAdd) | Parameter | Type | Description | | ------------ |:-------:|:--------------------------------------------------------------------------:| | newAlerter | address | address of the new alerter | | isAdd | bool | if true, new alerter was added, otherwise false if alerter was removed |\

Event for logging the addition of an address with operator role.


event OperatorAdded(address newOperator, bool isAdd) | Parameter | Type | Description | | ------------- |:-------:|:----------------------------------------------------------------------------:| | newOperator | address | address of the new operator | | isAdd | bool | if true, new operator was added, otherwise false if operator was removed |

<br />

### `TransferAdminPending`
Event for logging for the transfer of the current admin address to the new address .
___
event __TransferAdminPending__(address pendingAdmin)
| Parameter      | Type     | Description                  |
| -------------- |:--------:|:----------------------------:|
| `pendingAdmin` | address  | address of the pending admin |
<br />

### Modifiers

### `onlyAdmin`
Modifier that ensures only an address with admin role can execute a function.

modifier __onlyAdmin__()
___
invokable functions: [addToken](api_abi-conversionrates.md#addtoken), [setValidRateDurationInBlocks](api_abi-conversionrates.md#setvalidratedurationinblocks), [enableTokenTrade](api_abi-conversionrates.md#enabletokentrade), [setReserveAddress](api_abi-conversionrates.md#setreserveaddress), [setReserveData](api_abi-feeburner.md#setreservedata), [setWalletFees](api_abi-feeburner.md#setwalletfees), [setTaxInBps](api_abi-feeburner.md#settaxinbps), [setTaxWallet](api_abi-feeburner.md#settaxwallet), [setKNCRate](api_abi-feeburner.md#setkncrate), [addReserve](api_abi-kybernetwork.md#addreserve), [listPairForReserve](api_abi-kybernetwork.md#listpairforreserve), [setEnable](api_abi-kybernetwork.md#setenable), [enableTrade](api_abi-kyberreserve.md#enabletrade), [approveWithdrawAddress](api_abi-kyberreserve.md#approvewithdrawaddress), [setReasonableDiff](api_abi-sanityrates.md#setreasonablediff), [setTokenControlInfo](api_abi-volumeimbalancerecorder.md#settokencontrolinfo), [withdrawToken](api_abi-withdrawable.md#withdrawtoken), [withdrawEther](api_abi-withdrawable.md#withdrawether), [addAlerter](api_abi-permissiongroups.md#addalerter), [addOperator](api_abi-permissiongroups.md#addoperator), [removeAlerter](api_abi-permissiongroups.md#removealerter), [removeOperator](api_abi-permissiongroups.md#removeoperator), [transferAdmin](api_abi-permissiongroups.md#transferadmin), [transferAdminQuickly](api_abi-permissiongroups.md#transferadminquickly)


<br />

### `onlyAlerter`
Modifier that ensures only an address with alerter role can execute a function.

modifier __onlyAlerter__()
___
invokable functions: [disableTokenTrade](api_abi-conversionrates.md#disabletokentrade), [disableTrade](api_abi-kyberreserve.md#disabletrade)
<br />

### `onlyOperator`
Modifier that ensures only an address with operator role can execute a function.

modifier __onlyOperator__()
___
invokable functions: [setCompactData](api_abi-conversionrates.md#setcompactdata), [setBaseRate](api_abi-conversionrates.md#setbaserate), [setQtyStepFunction](api_abi-conversionrates.md#setqtystepfunction), [setImbalanceStepFunction](api_abi-conversionrates.md#setimbalancestepfunction), [setQuantityFactor](api_abi-expectedrate.md#setquantityfactor), [setMinSlippageFactor](api_abi-expectedrate.md#setminslippagefactor), [setInfo](api_abi-kybernetwork.md#setinfo), [withdraw](api_abi-kyberreserve.md#withdraw), [setSanityRates](api_abi-sanityrates.md#setsanityrates), [setUserCategory](api_abi-whitelist.md#setusercategory), [setCategoryCap](api_abi-whitelist.md#setcategorycap), [setSgdToEthRate](api_abi-whitelist.md#setsgdtoethrate)
<br />

### Functions

### `PermissionGroups`
Contract constructor. Note that constructor methods are called exactly once during contract instantiation and cannot be called again.
___
function __PermissionGroups__() public

<br />

### `addAlerter`
Adds a new address to the list of alerters
___
function __addAlerter__(address newAlerter) public
| Parameter    | Type    | Description                |
| -------------|:-------:|:--------------------------:|
| `newAlerter` | address | address of the new alerter |
Modifiers: [onlyAdmin](api_abi-permissiongroups.md#onlyadmin)

<br />

### `addOperator`
Adds a new address to the list of operators
___
function __addOperator__(address newOperator) public
| Parameter     | Type    | Description                 |
| --------------|:-------:|:---------------------------:|
| `newOperator` | address | address of the new operator |
Modifiers: [onlyAdmin](api_abi-permissiongroups.md#onlyadmin)

<br />

### `claimAdmin`
Allows the pendingAdmin address to finalize the change admin process
___
function __claimAdmin__() public

<br />

### `getAlerters`
Gets the list of alerters
___
function __getAlerters__() public
**Returns:**\
List of alerters

<br />

### `getOperators`
Gets the list of operators
___
function __getOperators__() public
**Returns:**\
List of operators

<br />

### `removeAlerter`
Removes an address from the list of alerters
___
function __removeAlerter__(address newOperator) public
| Parameter | Type    | Description            |
| ----------|:-------:|:----------------------:|
| `alerter` | address | address of the alerter |
Modifiers: [onlyAdmin](api_abi-permissiongroups.md#onlyadmin)

<br />

### `removeOperator`
Removes an address from the list of operators
___
function __removeOperator__(address newOperator) public
| Parameter  | Type    | Description             |
| -----------|:-------:|:-----------------------:|
| `operator` | address | address of the operator |
Modifiers: [onlyAdmin](api_abi-permissiongroups.md#onlyadmin)

<br />

### `transferAdmin`
Allows the current admin to set the new admin address
___
function __transferAdmin__(address newAdmin) public
| Parameter  | Type    | Description                          |
| -----------|:-------:|:------------------------------------:|
| `newAdmin` | address | the address to transfer ownership to |
Modifiers: [onlyAdmin](api_abi-permissiongroups.md#onlyadmin)

<br />

### `transferAdminQuickly`
Allows the current admin to set the new admin address in one tx
___
function __transferAdminQuickly__(address newAdmin) public
| Parameter  | Type    | Description                          |
| -----------|:-------:|:------------------------------------:|
| `newAdmin` | address | the address to transfer ownership to |
Modifiers: [onlyAdmin](api_abi-permissiongroups.md#onlyadmin)

<br />

AlerterAdded

OperatorAdded

Classic
Elastic
Limit Order
Aggregator
PermissionGroups.sol
​
​
​
​
​
​