From 2c01068b868b0c092ce3b8869ed5185c7e6a93e8 Mon Sep 17 00:00:00 2001 From: CedarMist <134699267+CedarMist@users.noreply.github.com> Date: Wed, 18 Oct 2023 17:32:40 +0100 Subject: [PATCH] contracts: formatting --- contracts/contracts/tests/EIP155Tests.sol | 7 +++---- contracts/test/eip155.ts | 2 +- examples/onchain-signer/contracts/CommentBox.sol | 2 +- examples/onchain-signer/test/CommentBox.ts | 7 ++++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/contracts/contracts/tests/EIP155Tests.sol b/contracts/contracts/tests/EIP155Tests.sol index 3aebc462c..7fad44f7c 100644 --- a/contracts/contracts/tests/EIP155Tests.sol +++ b/contracts/contracts/tests/EIP155Tests.sol @@ -14,14 +14,13 @@ contract EIP155Tests { payable(publicAddr).transfer(msg.value); } - function getChainId () external view returns (uint) - { + function getChainId() external view returns (uint256) { return block.chainid; } - event HasChainId (uint); + event HasChainId(uint256); - function emitChainId () external { + function emitChainId() external { emit HasChainId(block.chainid); } diff --git a/contracts/test/eip155.ts b/contracts/test/eip155.ts index 2596b5871..fd31b006b 100644 --- a/contracts/test/eip155.ts +++ b/contracts/test/eip155.ts @@ -27,7 +27,7 @@ function entropy(str: string) { function getWallet(index: number) { const accounts = hre.network.config .accounts as HardhatNetworkHDAccountsConfig; - if( ! accounts.mnemonic ) { + if (!accounts.mnemonic) { return new ethers.Wallet((accounts as unknown as string[])[0]); } return ethers.Wallet.fromMnemonic( diff --git a/examples/onchain-signer/contracts/CommentBox.sol b/examples/onchain-signer/contracts/CommentBox.sol index 2f1f53561..82c84b164 100644 --- a/examples/onchain-signer/contracts/CommentBox.sol +++ b/examples/onchain-signer/contracts/CommentBox.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.19; contract CommentBox { string[] public comments; - function commentCount() external view returns (uint) { + function commentCount() external view returns (uint256) { return comments.length; } diff --git a/examples/onchain-signer/test/CommentBox.ts b/examples/onchain-signer/test/CommentBox.ts index 48d08b96e..b7b64ee2c 100644 --- a/examples/onchain-signer/test/CommentBox.ts +++ b/examples/onchain-signer/test/CommentBox.ts @@ -4,8 +4,8 @@ import { CommentBox, Gasless } from '../typechain-types'; import { HDAccountsUserConfig } from 'hardhat/types'; describe('CommentBox', function () { - let commentBox : CommentBox; - let gasless : Gasless; + let commentBox: CommentBox; + let gasless: Gasless; before(async () => { const CommentBoxFactory = await ethers.getContractFactory('CommentBox'); @@ -17,7 +17,8 @@ describe('CommentBox', function () { await gasless.deployed(); // Derive the private key of the 1st (counting from 0) builtin hardhat test account. - const accounts = (config.networks.hardhat.accounts as unknown) as HDAccountsUserConfig; + const accounts = config.networks.hardhat + .accounts as unknown as HDAccountsUserConfig; const wallet1 = ethers.Wallet.fromMnemonic( accounts.mnemonic, accounts.path + `/1`,