Emission Manager
Constructor
constructor(address owner) Initializes the contract, setting the deployer (or provided address) as the contract owner.
Functions
configureAssets(config[]) Configures emission parameters for multiple assets and rewards. Each config entry includes emission rate, total supply, distribution end time, asset, reward token, transfer strategy, and reward price feed ID.
getEmissionAdmin(address reward) → address Returns the current emission admin for a given reward token.
getRewardsController() → address Returns the address of the RewardsController contract managing reward logic.
owner() → address Returns the current owner of the contract.
renounceOwnership() Allows the owner to renounce control, leaving the contract without an owner.
setClaimer(address user, address claimer) Assigns a claimer for a specific user. The claimer can claim rewards on behalf of that user.
setDistributionEnd(address asset, address reward, uint32 newDistributionEnd) Updates the distribution end timestamp for a specific asset-reward pair.
setEmissionAdmin(address reward, address admin) Changes the emission admin for a reward token.
setEmissionPerSecond(address asset, address[] rewards, uint88[] newEmissionsPerSecond) Updates reward emission rates per second for a given asset across multiple reward tokens.
setPyth(address pyth) Sets the Pyth oracle contract address used for price feeds.
setRewardPriceId(address reward, bytes32 rewardPriceId) Updates the price feed ID for a specific reward token.
setRewardsController(address controller) Sets a new RewardsController contract address.
setTransferStrategy(address reward, address transferStrategy) Defines the transfer strategy for how rewards are distributed for a reward token.
transferOwnership(address newOwner) Transfers ownership of the contract to a new address.
Events
EmissionAdminUpdated(reward, oldAdmin, newAdmin) Emitted when the admin of reward emissions (who can configure distribution) is changed.
OwnershipTransferred(previousOwner, newOwner) Emitted when ownership of the contract changes.
[
{
"inputs": [
{ "internalType": "address", "name": "owner", "type": "address" }
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{ "indexed": true, "internalType": "address", "name": "reward", "type": "address" },
{ "indexed": true, "internalType": "address", "name": "oldAdmin", "type": "address" },
{ "indexed": true, "internalType": "address", "name": "newAdmin", "type": "address" }
],
"name": "EmissionAdminUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{ "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" },
{ "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" }
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"inputs": [
{
"components": [
{ "internalType": "uint88", "name": "emissionPerSecond", "type": "uint88" },
{ "internalType": "uint256", "name": "totalSupply", "type": "uint256" },
{ "internalType": "uint32", "name": "distributionEnd", "type": "uint32" },
{ "internalType": "address", "name": "asset", "type": "address" },
{ "internalType": "address", "name": "reward", "type": "address" },
{ "internalType": "contract ITransferStrategyBase", "name": "transferStrategy", "type": "address" },
{ "internalType": "bytes32", "name": "rewardPriceId", "type": "bytes32" }
],
"internalType": "struct RewardsDataTypes.RewardsConfigInput[]",
"name": "config",
"type": "tuple[]"
}
],
"name": "configureAssets",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "reward", "type": "address" }],
"name": "getEmissionAdmin",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getRewardsController",
"outputs": [{ "internalType": "contract IRewardsController", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{ "inputs": [], "name": "owner", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" },
{ "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" },
{
"inputs": [
{ "internalType": "address", "name": "user", "type": "address" },
{ "internalType": "address", "name": "claimer", "type": "address" }
],
"name": "setClaimer",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{ "internalType": "address", "name": "asset", "type": "address" },
{ "internalType": "address", "name": "reward", "type": "address" },
{ "internalType": "uint32", "name": "newDistributionEnd", "type": "uint32" }
],
"name": "setDistributionEnd",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{ "internalType": "address", "name": "reward", "type": "address" },
{ "internalType": "address", "name": "admin", "type": "address" }
],
"name": "setEmissionAdmin",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{ "internalType": "address", "name": "asset", "type": "address" },
{ "internalType": "address[]", "name": "rewards", "type": "address[]" },
{ "internalType": "uint88[]", "name": "newEmissionsPerSecond", "type": "uint88[]" }
],
"name": "setEmissionPerSecond",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "pyth", "type": "address" }],
"name": "setPyth",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{ "internalType": "address", "name": "reward", "type": "address" },
{ "internalType": "bytes32", "name": "rewardPriceId", "type": "bytes32" }
],
"name": "setRewardPriceId",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "controller", "type": "address" }],
"name": "setRewardsController",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{ "internalType": "address", "name": "reward", "type": "address" },
{ "internalType": "contract ITransferStrategyBase", "name": "transferStrategy", "type": "address" }
],
"name": "setTransferStrategy",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]
Last updated
Was this helpful?