Expand description
Generated by the following Solidity interface…
interface FeeModel {
error AccessControlBadConfirmation();
error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);
event FeeBpsUpdated(uint256 feeBps);
event ProtocolFeeCollectorUpdated(address indexed collector);
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
constructor(address admin, uint256 _feeBps, address _protocolFeeCollector);
function DEFAULT_ADMIN_ROLE() external view returns (bytes32);
function MAX_BPS() external view returns (uint256);
function calculateFee(uint256 amount) external view returns (uint256 fee);
function feeBps() external view returns (uint256);
function getRoleAdmin(bytes32 role) external view returns (bytes32);
function grantRole(bytes32 role, address account) external;
function hasRole(bytes32 role, address account) external view returns (bool);
function protocolFeeCollector() external view returns (address);
function renounceRole(bytes32 role, address callerConfirmation) external;
function revokeRole(bytes32 role, address account) external;
function setFeeBps(uint256 _feeBps) external;
function setProtocolFeeCollector(address _collector) external;
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}…which was generated by the following JSON ABI:
[
{
"type": "constructor",
"inputs": [
{
"name": "admin",
"type": "address",
"internalType": "address"
},
{
"name": "_feeBps",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "_protocolFeeCollector",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "DEFAULT_ADMIN_ROLE",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "MAX_BPS",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "calculateFee",
"inputs": [
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "fee",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "feeBps",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getRoleAdmin",
"inputs": [
{
"name": "role",
"type": "bytes32",
"internalType": "bytes32"
}
],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "grantRole",
"inputs": [
{
"name": "role",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "account",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "hasRole",
"inputs": [
{
"name": "role",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "account",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "protocolFeeCollector",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "renounceRole",
"inputs": [
{
"name": "role",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "callerConfirmation",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "revokeRole",
"inputs": [
{
"name": "role",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "account",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setFeeBps",
"inputs": [
{
"name": "_feeBps",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setProtocolFeeCollector",
"inputs": [
{
"name": "_collector",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "supportsInterface",
"inputs": [
{
"name": "interfaceId",
"type": "bytes4",
"internalType": "bytes4"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "event",
"name": "FeeBpsUpdated",
"inputs": [
{
"name": "feeBps",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "ProtocolFeeCollectorUpdated",
"inputs": [
{
"name": "collector",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "RoleAdminChanged",
"inputs": [
{
"name": "role",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "previousAdminRole",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "newAdminRole",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
}
],
"anonymous": false
},
{
"type": "event",
"name": "RoleGranted",
"inputs": [
{
"name": "role",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "account",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "sender",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "RoleRevoked",
"inputs": [
{
"name": "role",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "account",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "sender",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "error",
"name": "AccessControlBadConfirmation",
"inputs": []
},
{
"type": "error",
"name": "AccessControlUnauthorizedAccount",
"inputs": [
{
"name": "account",
"type": "address",
"internalType": "address"
},
{
"name": "neededRole",
"type": "bytes32",
"internalType": "bytes32"
}
]
}
]Structs§
- Access
Control BadConfirmation - Custom error with signature
AccessControlBadConfirmation()and selector0x6697b232. - Access
Control Unauthorized Account - Custom error with signature
AccessControlUnauthorizedAccount(address,bytes32)and selector0xe2517d3f. - DEFAULT_
ADMIN_ ROLE Call - Function with signature
DEFAULT_ADMIN_ROLE()and selector0xa217fddf. - DEFAULT_
ADMIN_ ROLE Return - Container type for the return parameters of the
DEFAULT_ADMIN_ROLE()function. - FeeBps
Updated - Event with signature
FeeBpsUpdated(uint256)and selector0x0399aa81c69e33acc2ff42d0f7a0809e6bf4c10ff3c3a7e040b12fedc14602f2. - FeeModel
Instance - A
FeeModelinstance. - MAX_
BPSCall - Function with signature
MAX_BPS()and selector0xfd967f47. - MAX_
BPSReturn - Container type for the return parameters of the
MAX_BPS()function. - Protocol
FeeCollector Updated - Event with signature
ProtocolFeeCollectorUpdated(address)and selector0x33837f672315b6cffcf11894714abfdec631a913c18d7738fcaf40c444376fb6. - Role
Admin Changed - Event with signature
RoleAdminChanged(bytes32,bytes32,bytes32)and selector0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. - Role
Granted - Event with signature
RoleGranted(bytes32,address,address)and selector0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. - Role
Revoked - Event with signature
RoleRevoked(bytes32,address,address)and selector0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. - calculate
FeeCall - Function with signature
calculateFee(uint256)and selector0x99a5d747. - calculate
FeeReturn - Container type for the return parameters of the
calculateFee(uint256)function. - constructor
Call - Constructor`.
- feeBps
Call - Function with signature
feeBps()and selector0x24a9d853. - feeBps
Return - Container type for the return parameters of the
feeBps()function. - getRole
Admin Call - Function with signature
getRoleAdmin(bytes32)and selector0x248a9ca3. - getRole
Admin Return - Container type for the return parameters of the
getRoleAdmin(bytes32)function. - grant
Role Call - Function with signature
grantRole(bytes32,address)and selector0x2f2ff15d. - grant
Role Return - Container type for the return parameters of the
grantRole(bytes32,address)function. - hasRole
Call - Function with signature
hasRole(bytes32,address)and selector0x91d14854. - hasRole
Return - Container type for the return parameters of the
hasRole(bytes32,address)function. - protocol
FeeCollector Call - Function with signature
protocolFeeCollector()and selector0x850a1501. - protocol
FeeCollector Return - Container type for the return parameters of the
protocolFeeCollector()function. - renounce
Role Call - Function with signature
renounceRole(bytes32,address)and selector0x36568abe. - renounce
Role Return - Container type for the return parameters of the
renounceRole(bytes32,address)function. - revoke
Role Call - Function with signature
revokeRole(bytes32,address)and selector0xd547741f. - revoke
Role Return - Container type for the return parameters of the
revokeRole(bytes32,address)function. - setFee
BpsCall - Function with signature
setFeeBps(uint256)and selector0x72c27b62. - setFee
BpsReturn - Container type for the return parameters of the
setFeeBps(uint256)function. - setProtocol
FeeCollector Call - Function with signature
setProtocolFeeCollector(address)and selector0xcfca3147. - setProtocol
FeeCollector Return - Container type for the return parameters of the
setProtocolFeeCollector(address)function. - supports
Interface Call - Function with signature
supportsInterface(bytes4)and selector0x01ffc9a7. - supports
Interface Return - Container type for the return parameters of the
supportsInterface(bytes4)function.
Enums§
- FeeModel
Calls - Container for all the
FeeModelfunction calls. - FeeModel
Errors - Container for all the
FeeModelcustom errors. - FeeModel
Events - Container for all the
FeeModelevents.