Skip to content

Commit

Permalink
formatting sol files
Browse files Browse the repository at this point in the history
  • Loading branch information
pruales committed Sep 17, 2022
1 parent 2298c00 commit 57e07c8
Show file tree
Hide file tree
Showing 14 changed files with 644 additions and 652 deletions.
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
packages/contracts/lib
cache
out
16 changes: 16 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"printWidth": 100,
"trailingComma": "es5",
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"overrides": [
{
"files": "*.sol",
"options": {
"semi": true,
"printWidth": 100
}
}
]
}
4 changes: 2 additions & 2 deletions .solhint.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "solhint:recommended",
"plugins": ["prettier"],
"rules": {
"compiler-version": ["error", "^0.8.0"]
"prettier/prettier": "error"
}
}
16 changes: 10 additions & 6 deletions packages/contracts/src/Config.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@
pragma solidity ^0.8.13;

contract Config {
// function signature of "postProcess()"
bytes4 public constant POSTPROCESS_SIG = 0xc2722916;
// function signature of "postProcess()"
bytes4 public constant POSTPROCESS_SIG = 0xc2722916;

// The base amount of percentage function
uint256 public constant PERCENTAGE_BASE = 1 ether;
// The base amount of percentage function
uint256 public constant PERCENTAGE_BASE = 1 ether;

// Handler post-process type. Others should not happen now.
enum HandlerType {Token, Custom, Others}
// Handler post-process type. Others should not happen now.
enum HandlerType {
Token,
Custom,
Others
}
}
16 changes: 8 additions & 8 deletions packages/contracts/src/Counter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ pragma solidity ^0.8.13;

// Credits to https://github.com/adrianmcli/web3-vs-ethers
contract Counter {
uint public count = 0;
uint256 public count = 0;

function increment() public {
count = count + 1;
}
function increment() public {
count = count + 1;
}

function getCount() public view returns (uint) {
return count;
}
}
function getCount() public view returns (uint256) {
return count;
}
}
Loading

0 comments on commit 57e07c8

Please sign in to comment.