@mstable/protocol
Version:
mStable Contracts
708 lines (707 loc) • 13.8 kB
JSON
[
{
"inputs": [
{
"internalType": "address",
"name": "_nexus",
"type": "address"
},
{
"internalType": "address",
"name": "_rewardToken",
"type": "address"
},
{
"components": [
{
"internalType": "int256",
"name": "A",
"type": "int256"
},
{
"internalType": "int256",
"name": "B",
"type": "int256"
},
{
"internalType": "int256",
"name": "C",
"type": "int256"
},
{
"internalType": "int256",
"name": "D",
"type": "int256"
},
{
"internalType": "uint128",
"name": "EPOCHS",
"type": "uint128"
}
],
"internalType": "struct TopLevelConfig",
"name": "_config",
"type": "tuple"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "stakingContract",
"type": "address"
}
],
"name": "AddStakingContract",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "dialId",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "recipient",
"type": "address"
}
],
"name": "AddedDial",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "dialId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "DistributedReward",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "dialId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "DonatedRewards",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256[]",
"name": "amounts",
"type": "uint256[]"
}
],
"name": "PeriodRewards",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "voter",
"type": "address"
},
{
"components": [
{
"internalType": "uint256",
"name": "dialId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "weight",
"type": "uint256"
}
],
"indexed": false,
"internalType": "struct Preference[]",
"name": "preferences",
"type": "tuple[]"
}
],
"name": "PreferencesChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "voter",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "newVotesCast",
"type": "uint256"
}
],
"name": "SourcesPoked",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "dialId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bool",
"name": "disabled",
"type": "bool"
},
{
"indexed": false,
"internalType": "bool",
"name": "_notify",
"type": "bool"
}
],
"name": "UpdatedDial",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "stakingContract",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "VotesCast",
"type": "event"
},
{
"inputs": [],
"name": "REWARD_TOKEN",
"outputs": [
{
"internalType": "contract IERC20",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_recipient",
"type": "address"
},
{
"internalType": "uint8",
"name": "_cap",
"type": "uint8"
},
{
"internalType": "bool",
"name": "_notify",
"type": "bool"
}
],
"name": "addDial",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_stakingContract",
"type": "address"
}
],
"name": "addStakingContract",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "calculateRewards",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "dials",
"outputs": [
{
"internalType": "bool",
"name": "disabled",
"type": "bool"
},
{
"internalType": "bool",
"name": "notify",
"type": "bool"
},
{
"internalType": "uint8",
"name": "cap",
"type": "uint8"
},
{
"internalType": "uint96",
"name": "balance",
"type": "uint96"
},
{
"internalType": "address",
"name": "recipient",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256[]",
"name": "_dialIds",
"type": "uint256[]"
}
],
"name": "distributeRewards",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256[]",
"name": "_dialIds",
"type": "uint256[]"
},
{
"internalType": "uint256[]",
"name": "_amounts",
"type": "uint256[]"
}
],
"name": "donate",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "epochs",
"outputs": [
{
"internalType": "uint32",
"name": "startEpoch",
"type": "uint32"
},
{
"internalType": "uint32",
"name": "lastEpoch",
"type": "uint32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "dialId",
"type": "uint256"
}
],
"name": "getDialRecipient",
"outputs": [
{
"internalType": "address",
"name": "recipient",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "dialId",
"type": "uint256"
}
],
"name": "getDialVoteHistory",
"outputs": [
{
"components": [
{
"internalType": "uint128",
"name": "votes",
"type": "uint128"
},
{
"internalType": "uint32",
"name": "epoch",
"type": "uint32"
}
],
"internalType": "struct HistoricVotes[]",
"name": "voteHistory",
"type": "tuple[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getDialVotes",
"outputs": [
{
"internalType": "uint256[]",
"name": "dialVotes",
"type": "uint256[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "voter",
"type": "address"
}
],
"name": "getVoterPreferences",
"outputs": [
{
"components": [
{
"internalType": "uint256",
"name": "dialId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "weight",
"type": "uint256"
}
],
"internalType": "struct Preference[16]",
"name": "preferences",
"type": "tuple[16]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "getVotes",
"outputs": [
{
"internalType": "uint256",
"name": "votingPower",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address[]",
"name": "_recipients",
"type": "address[]"
},
{
"internalType": "uint8[]",
"name": "_caps",
"type": "uint8[]"
},
{
"internalType": "bool[]",
"name": "_notifies",
"type": "bool[]"
},
{
"internalType": "address[]",
"name": "_stakingContracts",
"type": "address[]"
}
],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "moveVotingPowerHook",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "nexus",
"outputs": [
{
"internalType": "contract INexus",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_voter",
"type": "address"
}
],
"name": "pokeSources",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "uint256",
"name": "dialId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "weight",
"type": "uint256"
}
],
"internalType": "struct Preference[]",
"name": "_preferences",
"type": "tuple[]"
}
],
"name": "setVoterDialWeights",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "stakingContractAddTime",
"outputs": [
{
"internalType": "uint32",
"name": "",
"type": "uint32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "stakingContracts",
"outputs": [
{
"internalType": "contract IVotes",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint32",
"name": "epoch",
"type": "uint32"
}
],
"name": "topLineEmission",
"outputs": [
{
"internalType": "uint256",
"name": "emissionForEpoch",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_dialId",
"type": "uint256"
},
{
"internalType": "bool",
"name": "_disabled",
"type": "bool"
},
{
"internalType": "bool",
"name": "_notify",
"type": "bool"
}
],
"name": "updateDial",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "voterPreferences",
"outputs": [
{
"internalType": "uint256",
"name": "dialWeights",
"type": "uint256"
},
{
"internalType": "uint128",
"name": "votesCast",
"type": "uint128"
},
{
"internalType": "uint32",
"name": "lastSourcePoke",
"type": "uint32"
}
],
"stateMutability": "view",
"type": "function"
}
]