RoC Stable Platform - Collateral RIF Token
  • Introduction
  • RIF On Chain platform
    • Main concepts
    • System states
    • Public actions
      • User actions
      • Process actions
    • Contracts architecture
      • MoC
      • CommissionSplitter
      • MoCState
      • MoCBucketContainer
      • MoCSettlement
      • MoCHelperLib
      • MoCLibConnection
      • MoCConverter
      • MoCExchange
      • MoCConnector
      • MoCRiskProxManager
      • MoCInrate
      • MoCVendors
      • MoCWhitelist
      • MoCBase
      • OwnerBurnableToken
      • RiskProToken
      • StableToken
      • MoCToken
      • PriceProvider
    • Contract mocks
    • Relevant patterns and choices
    • Data dictionary
    • Getting started
  • Integration with RoC platform
    • Introduction to RoC
      • The MoC Contract
      • RoC Precisions
      • RoC State Contracts
    • Getting RIFPros
      • Minting RIFPros
      • Redeeming RIFPros
    • Getting USDRIF
      • Minting USDRIF
      • Redeeming USDRIF
        • On Settlement: redeemStableTokenRequest
        • On Settlement: alterRedeemRequestAmount
        • Outside Settlement: redeemFreeStableToken
        • On Liquidation State: redeemAllStableToken
        • How-to
    • Commission fees values
    • Vendors
    • Fees calculation
    • From outside the blockchain
      • Using RSK nodes
      • Using web3
      • Official RIF On Chain ABIs
      • Events
      • Example code minting RIFPros
      • Example code minting RIFPros without Truffle
      • Example code redeeming RIFPros
      • Example code redeeming RIFPros without Truffle
      • Example code minting USDRIF
      • Example code redeeming free USDRIF
      • Example code redeeming USDRIF Request
      • Example code redeeming all USDRIF
  • Smart contracts
    • Contracts verification
    • ABIs documentation
      • Blockable
      • Blocker
      • ERC20Mintable
      • Governed
      • Initializable
      • MakeStoppable
      • MakeUnstoppable
      • MoC
      • MoCBucketContainer
      • MoCConnector
      • MoCConverter
      • MoCEMACalculator
      • MoCExchange
      • MoCHelperLib
      • MoCHelperLibMock
      • MoCInrate
      • MoCInrateRiskproxChanger
      • MoCLibConnection
      • MoCPriceProviderMock
      • MoCReserve
      • MoCRiskProxManager
      • MoCSettlement
      • MoCSettlementMock
      • MoCState
      • MoCStateMock
      • MoCToken
      • MoCVendors
      • MoCWhitelist
      • MocInrateStableChanger
      • MockBlocker
      • MockMakeStoppable
      • MockMakeUnstoppable
      • MockStopper
      • MockUpgradeDelegator
      • MockUpgraderTemplate
      • OwnerBurnableToken
      • Pausable
      • PriceFeed
      • PriceFeederAdder
      • PriceFeederRemover
      • PriceProvider
      • PriceProviderChanger
      • PriceProviderMock
      • ReserveToken
      • RiskProToken
      • StableToken
      • Stoppable
      • Stopper
      • UpgradeDelegator
      • UpgraderTemplate
Powered by GitBook
On this page
  • Contract Members
  • Modifiers
  • notBlocked
  • Functions
  • isBlocked
  • initialize
  • isAuthorizedToBlock
  • blockUntil
  1. Smart contracts
  2. ABIs documentation

Blockable

PreviousABIs documentationNextBlocker

Last updated 3 years ago

View Source:

↗ Extends:

Blockable - version: 0.1.10

Base contract to be able to define a blockable contract. The blocked contract is blocked until a certain date. That date cannot be changed while the contract is blocked so it is guaranteed that you will be blocked until that date

Contract Members

Constants & Variables

string private constant NOT_AUTHORIZED_TO_BLOCK;

string private constant BLOCKED;

string private constant THRESHOLD_TOO_LOW;

uint256[50] private upgradeGap;

uint256 public unblockDate;

Modifiers

notBlocked

Disables functions that should be disabled when the governor is blocked

modifier notBlocked() internal

Arguments

Functions

isBlocked

Returns true if no change can be executed in the current block

function isBlocked() public view
returns(bool)

Arguments

initialize

Initialize the contract with the basic settingsThis initialize replaces the constructor but it is not called automatically. It is necessary because of the upgradeability of the contracts

function initialize(uint256 _firstUnblockDate) public nonpayable initializer 

Arguments

Name
Type
Description

_firstUnblockDate

uint256

Timestamp of the first threshold that should be passed before the governor is activeagain

isAuthorizedToBlock

Defines which addresses are authorized to Block and which are notShould be defined by subclasses

function isAuthorizedToBlock(address who) public view
returns(bool)

Arguments

Name
Type
Description

who

address

Address that is being asked for

blockUntil

Blocks the governor until unblockAtThe new threshold should be big enough to block the governor after the tx and the contract should not be blocked, but that is enforced in the executeChange function which ALWAYS should be called before calling this function because it is the only one authorizing a changer

function blockUntil(uint256 newUnblockDate) public nonpayable notBlocked 

Arguments

Name
Type
Description

newUnblockDate

uint256

Timestamp of the next threshold that should be passed before the governor is activeagain

moc-governance/contracts/Blockability/Blockable.sol
Initializable
notBlocked
isBlocked()
initialize(uint256 _firstUnblockDate)
isAuthorizedToBlock(address who)
blockUntil(uint256 newUnblockDate)