From 2c9ea4454b2d65fb6bb3feeb02c3a137942f90e2 Mon Sep 17 00:00:00 2001 From: Xi Zhang Date: Mon, 6 Nov 2023 19:53:11 -0600 Subject: [PATCH] Improve style --- docs/dapp/sapphire/security.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/dapp/sapphire/security.md b/docs/dapp/sapphire/security.md index 950230cf70..93e09970fc 100644 --- a/docs/dapp/sapphire/security.md +++ b/docs/dapp/sapphire/security.md @@ -82,21 +82,21 @@ in a transaction. ```solidity contract GasExample { - bytes32 tmp; + bytes32 tmp; - function constantMath(bool doMath, uint128 padGasAmount) external { - if (doMath) { - bytes32 x; + function constantMath(bool doMath, uint128 padGasAmount) external { + if (doMath) { + bytes32 x; - for (uint256 i = 0; i < 100; i++) { - x = keccak256(abi.encodePacked(x, tmp)); - } + for (uint256 i = 0; i < 100; i++) { + x = keccak256(abi.encodePacked(x, tmp)); + } - tmp = x; - } - - Sapphire.padGas(padGasAmount); + tmp = x; } + + Sapphire.padGas(padGasAmount); + } } ```