这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: lint

on: push

env:
PNPM_VERSION: '8'
NODE_VERSION: '20.9'

jobs:
check:
strategy:
fail-fast: true

name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}

- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'

- name: Install dependencies
run: pnpm install
id: install

- name: Run linter
run: pnpm run check
id: lint
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ docs/

# Dotenv file
.env

# Dependencies
node_modules/
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
cache/
lib/
node_modules/
out/
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
trailingComma: 'es5'
tabWidth: 2
semi: false
singleQuote: true
21 changes: 21 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "tiny-web3",
"version": "1.0.0",
"description": "Tiny web3 protocols and applications.",
"main": "index.js",
"directories": {
"lib": "lib",
"test": "test"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"check": "pnpm exec prettier --plugin prettier-plugin-solidity --check .",
"lint": "pnpm exec prettier --plugin prettier-plugin-solidity --write ."
},
"author": "",
"license": "ISC",
"devDependencies": {
"prettier": "^3.0.3",
"prettier-plugin-solidity": "^1.1.3"
}
}
89 changes: 89 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/TinyENS.sol
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ contract TinyENS is ITinyENS {
return registry[name];
}

function reverse(address targetAddress) external view returns (string memory) {
function reverse(
address targetAddress
) external view returns (string memory) {
return reverseRegistry[targetAddress];
}
}