ITurtleShellFirewallIncreaser

ITurtleShellFirewallIncreaser Interface

The ITurtleShellFirewallIncreaser is an extension interface for the ITurtleShellFirewall contract. It offers methods for automatically increasing and decreasing the parameters for a given protocol. This document describes the methods provided by the interface and provides examples of how to integrate these into your contracts.

This interface was written in Solidity, a statically-typed programming language used for Ethereum smart contracts.

Contract Methods


decreaseParameter(uint256 amount)

This function decreases the security parameter for the calling protocol by a given amount.

The function will return true if the operation was successful.


contract MyContract {
    ITurtleShellFirewallIncreaser firewall;

    function decreaseParam(uint256 amount) public {
        bool status = firewall.decreaseParameter(amount);
    }
}

increaseParameter(uint256 amount)

This function increases the security parameter for the calling protocol by a given amount.

The function will return true if the operation was successful.


contract MyContract {
    ITurtleShellFirewallIncreaser firewall;

    function increaseParam(uint256 amount) public {
        bool status = firewall.increaseParameter(amount);
    }
}

As with the ITurtleShellFirewall interface, to use this interface you should have the contract address of the deployed ITurtleShellFirewallIncreaser implementation. You should instantiate the ITurtleShellFirewallIncreaser with this address:


ITurtleShellFirewallIncreaser firewall = ITurtleShellFirewallIncreaser(deployed_firewall_address_here);

The ITurtleShellFirewallIncreaser interface extends the ITurtleShellFirewall interface. Therefore, all methods defined in ITurtleShellFirewall are also available in ITurtleShellFirewallIncreaser. The examples provided in the previous ITurtleShellFirewall interface documentation can be used with an ITurtleShellFirewallIncreaser instance.

Remember, before you can call increaseParameter or decreaseParameter, the security parameter must be set using the setParameter function. This initial parameter acts as a baseline that the increaseParameter and decreaseParameter functions will increase or decrease, respectively.

Last updated