Skip to content

Commit

Permalink
contracts: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
CedarMist committed Oct 18, 2023
1 parent 539679f commit 2c01068
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
7 changes: 3 additions & 4 deletions contracts/contracts/tests/EIP155Tests.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion contracts/test/eip155.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion examples/onchain-signer/contracts/CommentBox.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
7 changes: 4 additions & 3 deletions examples/onchain-signer/test/CommentBox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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`,
Expand Down

0 comments on commit 2c01068

Please sign in to comment.