Using Function Modifiers
Step By Step
Install the Ironblocks CLI Tool into your project by running:
npm install @ironblocks/cliFrom your project's root directory, run the Firewall Integration command:
npx ib fw integ -d ./contractsibis Ironblocks' CLI toolfw integruns the Integration command for the Firewall module of our tool-d ./contractspoints to your smart contracts directory
Running the command above will make the following changes in your project:
Auto-Install the Firewall's dependencies
Make your contracts inherit from
FirewallConsumerAdd the
firewallProtectedmodifier to any external function (excludingviewfunctions)
That's it! Your smart contracts are now ready to use Ironblocks' Firewall.
Example
The following smart contract shows a typical integration of our Firewall into a consumer protocol:
Next Steps
Head on to the Configuration section to learn more about security policy management.
Review our Smart Contracts
Last updated