propose() :
This function is used to propose a new governance action. It takes an array of transactions and ancillary data as parameters. It stores the request time and ancillary data in the proposal storage, and then loops through the transactions to ensure that the 'to' address is not 0x0 and that EOA accounts cannot accept transactions with data. It then calls the _getOracle() function to request the governance action, and emits an event with the proposal ID and transactions. (autogenerated documentation)
executeProposal(uint256,uint256) :
This function executes a proposal with a given ID and transaction index. It first retrieves the price of the proposal from the oracle, then checks that the previous transaction has been executed, that the current transaction has not been executed yet, that the price is not 0, and that the amount of ETH sent is equal to the transaction value. It then deletes the transaction from the proposal, executes the call, and emits an event. (autogenerated documentation)
emergencyExecute() :
This function allows the Emergency Proposer role to execute a transaction on behalf of the contract. It takes a Transaction memory object as an argument, which contains the address of the recipient, the value of the transaction, and the data associated with the transaction. The function then calls the _executeCall() function, which sends the transaction to the recipient address with the specified value and data. If the transaction is successful, an EmergencyExecution event is emitted. (autogenerated documentation)
getCurrentTime() :
This function is a public view function that returns the current block timestamp in the form of a uint256. It works by accessing the block timestamp from the blockchain and returning it as an output. (autogenerated documentation)
numProposals() :
This function returns the number of proposals stored in the proposals array. It works by looping through the array and counting the number of elements in it. (autogenerated documentation)
getProposal(uint256) :
This function is used to retrieve a proposal from the proposals mapping. It takes an id as an argument and returns a Proposal memory object. The function is marked as external and view, meaning that it can be called from outside the contract and does not modify the state of the contract. (autogenerated documentation)
_executeCall(address,uint256) :
This function is used to execute a call to another contract. It takes in an address to call, the value to send, and the data to be sent as parameters. It then uses assembly code to add the data size to the data, and then calls the other contract with the gas, address, value, data, data size, and two 0s as parameters. It returns a boolean value indicating whether the call was successful or not. (autogenerated documentation)
_getOracle() :
This function is a private view function that returns the address of the Oracle Governance Interface contract. It does this by using the finder contract to get the address of the Oracle Interface contract, and then returning the Oracle Governance Interface contract associated with that address. (autogenerated documentation)
_getIdentifierWhitelist() :
This function is a private view function that returns an instance of the IdentifierWhitelistInterface contract. It does this by using the finder contract to get the address of the IdentifierWhitelistInterface contract and then returning an instance of that contract. (autogenerated documentation)