Expand description
Generated by the following Solidity interface…
interface Voting {
struct VotingInfo {
uint256 threshold;
uint256 deadline;
uint256 nonce;
address owner;
}
event Voted(bytes32 indexed votingId, address indexed voter, uint256 indexed choice);
event Winner(bytes32 indexed votingId, uint256 indexed choice);
function register(VotingInfo memory v) external;
function setWinner(VotingInfo memory v, uint256 choice) external;
function vote(VotingInfo memory v, uint256 choice) external;
function votingId(VotingInfo memory v) external pure returns (bytes32);
}…which was generated by the following JSON ABI:
[
{
"type": "function",
"name": "register",
"inputs": [
{
"name": "v",
"type": "tuple",
"internalType": "struct Voting.VotingInfo",
"components": [
{
"name": "threshold",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "deadline",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "nonce",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "owner",
"type": "address",
"internalType": "address"
}
]
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setWinner",
"inputs": [
{
"name": "v",
"type": "tuple",
"internalType": "struct Voting.VotingInfo",
"components": [
{
"name": "threshold",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "deadline",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "nonce",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "owner",
"type": "address",
"internalType": "address"
}
]
},
{
"name": "choice",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "vote",
"inputs": [
{
"name": "v",
"type": "tuple",
"internalType": "struct Voting.VotingInfo",
"components": [
{
"name": "threshold",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "deadline",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "nonce",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "owner",
"type": "address",
"internalType": "address"
}
]
},
{
"name": "choice",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "votingId",
"inputs": [
{
"name": "v",
"type": "tuple",
"internalType": "struct Voting.VotingInfo",
"components": [
{
"name": "threshold",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "deadline",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "nonce",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "owner",
"type": "address",
"internalType": "address"
}
]
}
],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "pure"
},
{
"type": "event",
"name": "Voted",
"inputs": [
{
"name": "votingId",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "voter",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "choice",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Winner",
"inputs": [
{
"name": "votingId",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "choice",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
}
],
"anonymous": false
}
]Structs§
- Voted
- Event with signature
Voted(bytes32,address,uint256)and selector0xe4abc5380fa6939d1dc23b5e90b3a8a0e328f0f1a82a5f42bfb795bf9c717505. - Voting
Info - Voting
Instance - A
Votinginstance. - Winner
- Event with signature
Winner(bytes32,uint256)and selector0x269d3a24712436f77df15d63de7d2337a060c9102dee6f46c909fb0fa2d52f0c. - register
Call - Function with signature
register((uint256,uint256,uint256,address))and selector0x8f253c75. - register
Return - Container type for the return parameters of the
register((uint256,uint256,uint256,address))function. - setWinner
Call - Function with signature
setWinner((uint256,uint256,uint256,address),uint256)and selector0x9747a952. - setWinner
Return - Container type for the return parameters of the
setWinner((uint256,uint256,uint256,address),uint256)function. - vote
Call - Function with signature
vote((uint256,uint256,uint256,address),uint256)and selector0x152d18c4. - vote
Return - Container type for the return parameters of the
vote((uint256,uint256,uint256,address),uint256)function. - voting
IdCall - Function with signature
votingId((uint256,uint256,uint256,address))and selector0x39db6659. - voting
IdReturn - Container type for the return parameters of the
votingId((uint256,uint256,uint256,address))function.
Enums§
- Voting
Calls - Container for all the
Votingfunction calls. - Voting
Events - Container for all the
Votingevents.