@alpsfinance/core
Version:
This is the official Alps Finance smart contract repository.
1,293 lines (1,292 loc) • 78 kB
JSON
{
"contractName": "IVotes",
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "delegator",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "fromDelegate",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "toDelegate",
"type": "address"
}
],
"name": "DelegateChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "delegate",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "previousBalance",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "newBalance",
"type": "uint256"
}
],
"name": "DelegateVotesChanged",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "getVotes",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
},
{
"internalType": "uint256",
"name": "blockNumber",
"type": "uint256"
}
],
"name": "getPastVotes",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "blockNumber",
"type": "uint256"
}
],
"name": "getPastTotalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "delegates",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "delegatee",
"type": "address"
}
],
"name": "delegate",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "delegatee",
"type": "address"
},
{
"internalType": "uint256",
"name": "nonce",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "expiry",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "v",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "r",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "s",
"type": "bytes32"
}
],
"name": "delegateBySig",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.8.11+commit.d7f03943\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromDelegate\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toDelegate\",\"type\":\"address\"}],\"name\":\"DelegateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBalance\",\"type\":\"uint256\"}],\"name\":\"DelegateVotesChanged\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"delegate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"delegateBySig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"delegates\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPastTotalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPastVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Common interface for {ERC20Votes}, {ERC721Votes}, and other {Votes}-enabled contracts. _Available since v4.5._\",\"events\":{\"DelegateChanged(address,address,address)\":{\"details\":\"Emitted when an account changes their delegate.\"},\"DelegateVotesChanged(address,uint256,uint256)\":{\"details\":\"Emitted when a token transfer or delegate change results in changes to a delegate's number of votes.\"}},\"kind\":\"dev\",\"methods\":{\"delegate(address)\":{\"details\":\"Delegates votes from the sender to `delegatee`.\"},\"delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"Delegates votes from signer to `delegatee`.\"},\"delegates(address)\":{\"details\":\"Returns the delegate that `account` has chosen.\"},\"getPastTotalSupply(uint256)\":{\"details\":\"Returns the total supply of votes available at the end of a past block (`blockNumber`). NOTE: This value is the sum of all available votes, which is not necessarily the sum of all delegated votes. Votes that have not been delegated are still part of total supply, even though they would not participate in a vote.\"},\"getPastVotes(address,uint256)\":{\"details\":\"Returns the amount of votes that `account` had at the end of a past block (`blockNumber`).\"},\"getVotes(address)\":{\"details\":\"Returns the current amount of votes that `account` has.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/governance/utils/IVotes.sol\":\"IVotes\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/governance/utils/IVotes.sol\":{\"keccak256\":\"0xf5324a55ee9c0b4a840ea57c055ac9d046f88986ceef567e1cf68113e46a79c0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f41fe2bddc33c17ccccfc25379b1869354e9ee62d8b28d2acc95229eeba37a86\",\"dweb:/ipfs/Qmb6SF2XL2uSvH6k5JSjtx4Xoqz41ACkhdAhtbW1Yh3RiY\"]}},\"version\":1}",
"bytecode": "0x",
"deployedBytecode": "0x",
"immutableReferences": {},
"generatedSources": [],
"deployedGeneratedSources": [],
"sourceMap": "",
"deployedSourceMap": "",
"source": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (governance/utils/IVotes.sol)\npragma solidity ^0.8.0;\n\n/**\n * @dev Common interface for {ERC20Votes}, {ERC721Votes}, and other {Votes}-enabled contracts.\n *\n * _Available since v4.5._\n */\ninterface IVotes {\n /**\n * @dev Emitted when an account changes their delegate.\n */\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n /**\n * @dev Emitted when a token transfer or delegate change results in changes to a delegate's number of votes.\n */\n event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);\n\n /**\n * @dev Returns the current amount of votes that `account` has.\n */\n function getVotes(address account) external view returns (uint256);\n\n /**\n * @dev Returns the amount of votes that `account` had at the end of a past block (`blockNumber`).\n */\n function getPastVotes(address account, uint256 blockNumber) external view returns (uint256);\n\n /**\n * @dev Returns the total supply of votes available at the end of a past block (`blockNumber`).\n *\n * NOTE: This value is the sum of all available votes, which is not necessarily the sum of all delegated votes.\n * Votes that have not been delegated are still part of total supply, even though they would not participate in a\n * vote.\n */\n function getPastTotalSupply(uint256 blockNumber) external view returns (uint256);\n\n /**\n * @dev Returns the delegate that `account` has chosen.\n */\n function delegates(address account) external view returns (address);\n\n /**\n * @dev Delegates votes from the sender to `delegatee`.\n */\n function delegate(address delegatee) external;\n\n /**\n * @dev Delegates votes from signer to `delegatee`.\n */\n function delegateBySig(\n address delegatee,\n uint256 nonce,\n uint256 expiry,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n}\n",
"sourcePath": "@openzeppelin/contracts/governance/utils/IVotes.sol",
"ast": {
"absolutePath": "@openzeppelin/contracts/governance/utils/IVotes.sol",
"exportedSymbols": {
"IVotes": [
610
]
},
"id": 611,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 534,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "110:23:4"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "IVotes",
"contractDependencies": [],
"contractKind": "interface",
"documentation": {
"id": 535,
"nodeType": "StructuredDocumentation",
"src": "135:132:4",
"text": " @dev Common interface for {ERC20Votes}, {ERC721Votes}, and other {Votes}-enabled contracts.\n _Available since v4.5._"
},
"fullyImplemented": false,
"id": 610,
"linearizedBaseContracts": [
610
],
"name": "IVotes",
"nameLocation": "278:6:4",
"nodeType": "ContractDefinition",
"nodes": [
{
"anonymous": false,
"documentation": {
"id": 536,
"nodeType": "StructuredDocumentation",
"src": "291:71:4",
"text": " @dev Emitted when an account changes their delegate."
},
"id": 544,
"name": "DelegateChanged",
"nameLocation": "373:15:4",
"nodeType": "EventDefinition",
"parameters": {
"id": 543,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 538,
"indexed": true,
"mutability": "mutable",
"name": "delegator",
"nameLocation": "405:9:4",
"nodeType": "VariableDeclaration",
"scope": 544,
"src": "389:25:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 537,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "389:7:4",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 540,
"indexed": true,
"mutability": "mutable",
"name": "fromDelegate",
"nameLocation": "432:12:4",
"nodeType": "VariableDeclaration",
"scope": 544,
"src": "416:28:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 539,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "416:7:4",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 542,
"indexed": true,
"mutability": "mutable",
"name": "toDelegate",
"nameLocation": "462:10:4",
"nodeType": "VariableDeclaration",
"scope": 544,
"src": "446:26:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 541,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "446:7:4",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "388:85:4"
},
"src": "367:107:4"
},
{
"anonymous": false,
"documentation": {
"id": 545,
"nodeType": "StructuredDocumentation",
"src": "480:124:4",
"text": " @dev Emitted when a token transfer or delegate change results in changes to a delegate's number of votes."
},
"id": 553,
"name": "DelegateVotesChanged",
"nameLocation": "615:20:4",
"nodeType": "EventDefinition",
"parameters": {
"id": 552,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 547,
"indexed": true,
"mutability": "mutable",
"name": "delegate",
"nameLocation": "652:8:4",
"nodeType": "VariableDeclaration",
"scope": 553,
"src": "636:24:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 546,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "636:7:4",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 549,
"indexed": false,
"mutability": "mutable",
"name": "previousBalance",
"nameLocation": "670:15:4",
"nodeType": "VariableDeclaration",
"scope": 553,
"src": "662:23:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 548,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "662:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 551,
"indexed": false,
"mutability": "mutable",
"name": "newBalance",
"nameLocation": "695:10:4",
"nodeType": "VariableDeclaration",
"scope": 553,
"src": "687:18:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 550,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "687:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "635:71:4"
},
"src": "609:98:4"
},
{
"documentation": {
"id": 554,
"nodeType": "StructuredDocumentation",
"src": "713:79:4",
"text": " @dev Returns the current amount of votes that `account` has."
},
"functionSelector": "9ab24eb0",
"id": 561,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getVotes",
"nameLocation": "806:8:4",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 557,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 556,
"mutability": "mutable",
"name": "account",
"nameLocation": "823:7:4",
"nodeType": "VariableDeclaration",
"scope": 561,
"src": "815:15:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 555,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "815:7:4",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "814:17:4"
},
"returnParameters": {
"id": 560,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 559,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 561,
"src": "855:7:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 558,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "855:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "854:9:4"
},
"scope": 610,
"src": "797:67:4",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"documentation": {
"id": 562,
"nodeType": "StructuredDocumentation",
"src": "870:114:4",
"text": " @dev Returns the amount of votes that `account` had at the end of a past block (`blockNumber`)."
},
"functionSelector": "3a46b1a8",
"id": 571,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getPastVotes",
"nameLocation": "998:12:4",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 567,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 564,
"mutability": "mutable",
"name": "account",
"nameLocation": "1019:7:4",
"nodeType": "VariableDeclaration",
"scope": 571,
"src": "1011:15:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 563,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1011:7:4",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 566,
"mutability": "mutable",
"name": "blockNumber",
"nameLocation": "1036:11:4",
"nodeType": "VariableDeclaration",
"scope": 571,
"src": "1028:19:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 565,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1028:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1010:38:4"
},
"returnParameters": {
"id": 570,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 569,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 571,
"src": "1072:7:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 568,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1072:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1071:9:4"
},
"scope": 610,
"src": "989:92:4",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"documentation": {
"id": 572,
"nodeType": "StructuredDocumentation",
"src": "1087:365:4",
"text": " @dev Returns the total supply of votes available at the end of a past block (`blockNumber`).\n NOTE: This value is the sum of all available votes, which is not necessarily the sum of all delegated votes.\n Votes that have not been delegated are still part of total supply, even though they would not participate in a\n vote."
},
"functionSelector": "8e539e8c",
"id": 579,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "getPastTotalSupply",
"nameLocation": "1466:18:4",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 575,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 574,
"mutability": "mutable",
"name": "blockNumber",
"nameLocation": "1493:11:4",
"nodeType": "VariableDeclaration",
"scope": 579,
"src": "1485:19:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 573,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1485:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1484:21:4"
},
"returnParameters": {
"id": 578,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 577,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 579,
"src": "1529:7:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 576,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1529:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1528:9:4"
},
"scope": 610,
"src": "1457:81:4",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"documentation": {
"id": 580,
"nodeType": "StructuredDocumentation",
"src": "1544:71:4",
"text": " @dev Returns the delegate that `account` has chosen."
},
"functionSelector": "587cde1e",
"id": 587,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "delegates",
"nameLocation": "1629:9:4",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 583,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 582,
"mutability": "mutable",
"name": "account",
"nameLocation": "1647:7:4",
"nodeType": "VariableDeclaration",
"scope": 587,
"src": "1639:15:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 581,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1639:7:4",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "1638:17:4"
},
"returnParameters": {
"id": 586,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 585,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 587,
"src": "1679:7:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 584,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1679:7:4",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "1678:9:4"
},
"scope": 610,
"src": "1620:68:4",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"documentation": {
"id": 588,
"nodeType": "StructuredDocumentation",
"src": "1694:71:4",
"text": " @dev Delegates votes from the sender to `delegatee`."
},
"functionSelector": "5c19a95c",
"id": 593,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "delegate",
"nameLocation": "1779:8:4",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 591,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 590,
"mutability": "mutable",
"name": "delegatee",
"nameLocation": "1796:9:4",
"nodeType": "VariableDeclaration",
"scope": 593,
"src": "1788:17:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 589,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1788:7:4",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "1787:19:4"
},
"returnParameters": {
"id": 592,
"nodeType": "ParameterList",
"parameters": [],
"src": "1815:0:4"
},
"scope": 610,
"src": "1770:46:4",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"documentation": {
"id": 594,
"nodeType": "StructuredDocumentation",
"src": "1822:67:4",
"text": " @dev Delegates votes from signer to `delegatee`."
},
"functionSelector": "c3cda520",
"id": 609,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "delegateBySig",
"nameLocation": "1903:13:4",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 607,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 596,
"mutability": "mutable",
"name": "delegatee",
"nameLocation": "1934:9:4",
"nodeType": "VariableDeclaration",
"scope": 609,
"src": "1926:17:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 595,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1926:7:4",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 598,
"mutability": "mutable",
"name": "nonce",
"nameLocation": "1961:5:4",
"nodeType": "VariableDeclaration",
"scope": 609,
"src": "1953:13:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 597,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1953:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 600,
"mutability": "mutable",
"name": "expiry",
"nameLocation": "1984:6:4",
"nodeType": "VariableDeclaration",
"scope": 609,
"src": "1976:14:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 599,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1976:7:4",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 602,
"mutability": "mutable",
"name": "v",
"nameLocation": "2006:1:4",
"nodeType": "VariableDeclaration",
"scope": 609,
"src": "2000:7:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
},
"typeName": {
"id": 601,
"name": "uint8",
"nodeType": "ElementaryTypeName",
"src": "2000:5:4",
"typeDescriptions": {
"typeIdentifier": "t_uint8",
"typeString": "uint8"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 604,
"mutability": "mutable",
"name": "r",
"nameLocation": "2025:1:4",
"nodeType": "VariableDeclaration",
"scope": 609,
"src": "2017:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 603,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "2017:7:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 606,
"mutability": "mutable",
"name": "s",
"nameLocation": "2044:1:4",
"nodeType": "VariableDeclaration",
"scope": 609,
"src": "2036:9:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 605,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "2036:7:4",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"src": "1916:135:4"
},
"returnParameters": {
"id": 608,
"nodeType": "ParameterList",
"parameters": [],
"src": "2060:0:4"
},
"scope": 610,
"src": "1894:167:4",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
}
],
"scope": 611,
"src": "268:1795:4",
"usedErrors": []
}
],
"src": "110:1954:4"
},
"legacyAST": {
"absolutePath": "@openzeppelin/contracts/governance/utils/IVotes.sol",
"exportedSymbols": {
"IVotes": [
610
]
},
"id": 611,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 534,
"literals": [
"solidity",
"^",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "110:23:4"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "IVotes",
"contractDependencies": [],
"contractKind": "interface",
"documentation": {
"id": 535,
"nodeType": "StructuredDocumentation",
"src": "135:132:4",
"text": " @dev Common interface for {ERC20Votes}, {ERC721Votes}, and other {Votes}-enabled contracts.\n _Available since v4.5._"
},
"fullyImplemented": false,
"id": 610,
"linearizedBaseContracts": [
610
],
"name": "IVotes",
"nameLocation": "278:6:4",
"nodeType": "ContractDefinition",
"nodes": [
{
"anonymous": false,
"documentation": {
"id": 536,
"nodeType": "StructuredDocumentation",
"src": "291:71:4",
"text": " @dev Emitted when an account changes their delegate."
},
"id": 544,
"name": "DelegateChanged",
"nameLocation": "373:15:4",
"nodeType": "EventDefinition",
"parameters": {
"id": 543,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 538,
"indexed": true,
"mutability": "mutable",
"name": "delegator",
"nameLocation": "405:9:4",
"nodeType": "VariableDeclaration",
"scope": 544,
"src": "389:25:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 537,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "389:7:4",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 540,
"indexed": true,
"mutability": "mutable",
"name": "fromDelegate",
"nameLocation": "432:12:4",
"nodeType": "VariableDeclaration",
"scope": 544,
"src": "416:28:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 539,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "416:7:4",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 542,
"indexed": true,
"mutability": "mutable",
"name": "toDelegate",
"nameLocation": "462:10:4",
"nodeType": "VariableDeclaration",
"scope": 544,
"src": "446:26:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 541,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "446:7:4",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "388:85:4"
},
"src": "367:107:4"
},
{
"anonymous": false,
"documentation": {
"id": 545,
"nodeType": "StructuredDocumentation",
"src": "480:124:4",
"text": " @dev Emitted when a token transfer or delegate change results in changes to a delegate's number of votes."
},
"id": 553,
"name": "DelegateVotesChanged",
"nameLocation": "615:20:4",
"nodeType": "EventDefinition",
"parameters": {
"id": 552,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 547,
"indexed": true,
"mutability": "mutable",
"name": "delegate",
"nameLocation": "652:8:4",
"nodeType": "VariableDeclaration",
"scope": 553,
"src": "636:24:4",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 546,