Skip to content

Latest commit

 

History

History
430 lines (363 loc) · 11.6 KB

IProtocol.md

File metadata and controls

430 lines (363 loc) · 11.6 KB

IProtocol.sol

View Source: contracts/interfaces/IProtocol.sol

↗ Extends: IMember, IAccessControl ↘ Derived Contracts: Protocol

IProtocol

Structs

AccountWithRoles

struct AccountWithRoles {
 address account,
 bytes32[] roles
}

InitializeArgs

struct InitializeArgs {
 address burner,
 address uniswapV2RouterLike,
 address uniswapV2FactoryLike,
 address npm,
 address treasury,
 address priceOracle,
 uint256 coverCreationFee,
 uint256 minCoverCreationStake,
 uint256 firstReportingStake,
 uint256 claimPeriod,
 uint256 reportingBurnRate,
 uint256 governanceReporterCommission,
 uint256 claimPlatformFee,
 uint256 claimReporterCommission,
 uint256 flashLoanFee,
 uint256 flashLoanFeeProtocol,
 uint256 resolutionCoolDownPeriod,
 uint256 stateUpdateInterval,
 uint256 maxLendingRatio
}

Events

event Initialized(struct IProtocol.InitializeArgs  args);
event ContractAdded(bytes32 indexed namespace, bytes32 indexed key, address indexed contractAddress);
event ContractUpgraded(bytes32 indexed namespace, bytes32 indexed key, address  previous, address indexed current);
event MemberAdded(address  member);
event MemberRemoved(address  member);

Functions

addContract

function addContract(bytes32 namespace, address contractAddress) external nonpayable

Arguments

Name Type Description
namespace bytes32
contractAddress address
Source Code
function addContract(bytes32 namespace, address contractAddress) external;

addContracts

function addContracts(bytes32[] namespaces, bytes32[] keys, address[] contractAddresses) external nonpayable

Arguments

Name Type Description
namespaces bytes32[]
keys bytes32[]
contractAddresses address[]
Source Code
function addContracts(
    bytes32[] calldata namespaces,
    bytes32[] calldata keys,
    address[] calldata contractAddresses
  ) external;

addContractWithKey

function addContractWithKey(bytes32 namespace, bytes32 coverKey, address contractAddress) external nonpayable

Arguments

Name Type Description
namespace bytes32
coverKey bytes32
contractAddress address
Source Code
function addContractWithKey(
    bytes32 namespace,
    bytes32 coverKey,
    address contractAddress
  ) external;

initialize

function initialize(struct IProtocol.InitializeArgs args) external nonpayable

Arguments

Name Type Description
args struct IProtocol.InitializeArgs
Source Code
function initialize(InitializeArgs calldata args) external;

upgradeContract

function upgradeContract(bytes32 namespace, address previous, address current) external nonpayable

Arguments

Name Type Description
namespace bytes32
previous address
current address
Source Code
function upgradeContract(
    bytes32 namespace,
    address previous,
    address current
  ) external;

upgradeContractWithKey

function upgradeContractWithKey(bytes32 namespace, bytes32 coverKey, address previous, address current) external nonpayable

Arguments

Name Type Description
namespace bytes32
coverKey bytes32
previous address
current address
Source Code
function upgradeContractWithKey(
    bytes32 namespace,
    bytes32 coverKey,
    address previous,
    address current
  ) external;

addMember

function addMember(address member) external nonpayable

Arguments

Name Type Description
member address
Source Code
function addMember(address member) external;

removeMember

function removeMember(address member) external nonpayable

Arguments

Name Type Description
member address
Source Code
function removeMember(address member) external;

grantRoles

function grantRoles(struct IProtocol.AccountWithRoles[] detail) external nonpayable

Arguments

Name Type Description
detail struct IProtocol.AccountWithRoles[]
Source Code
function grantRoles(AccountWithRoles[] calldata detail) external;

Contracts