forked from DimensionDev/MysteryBox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* removed safemath, removed unused contracts * refactoring test * update dependencies, added missing dependencies * implemented contract types * fixed generate-readme * added prettier settings for .sol, replaced getLogs with event queryFilter, added error messages, removed toString() on type string, removed redundant code * implemented type checks for addTxParameters() * optimized code, added error msg Co-authored-by: Li-Qing Wang <[email protected]>
- Loading branch information
Showing
55 changed files
with
45,477 additions
and
10,438 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
root = true | ||
|
||
[*] | ||
indent_size = 2 | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*] | ||
tab_width = 4 | ||
insert_final_newline = true | ||
indent_style = space | ||
|
||
[*.md] | ||
tab_width = 2 | ||
|
||
[*.sol] | ||
indent_size = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
{ | ||
"$schema": "https://dimensiondev.github.io/eslint-plugin/src/schema.json", | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"sourceType": "module", | ||
"project": "./tsconfig.json" | ||
}, | ||
"plugins": ["@dimensiondev", "@typescript-eslint"], | ||
"rules": { | ||
"eqeqeq": ["error", "smart"], | ||
"no-unsafe-negation": "error", | ||
"no-unsafe-optional-chaining": "error", | ||
"no-irregular-whitespace": [ | ||
"warn", | ||
{ | ||
"skipComments": true, | ||
"skipRegExps": true | ||
} | ||
], | ||
"@dimensiondev/array/no-implicit-sort": "error", | ||
"@dimensiondev/array/no-unneeded-flat-map": "error", | ||
"@dimensiondev/array/prefer-from": "error", | ||
"@dimensiondev/string/no-interpolation": "error", | ||
"@dimensiondev/string/no-locale-case": "error", | ||
"@dimensiondev/string/no-simple-template-literal": "error", | ||
"@dimensiondev/string/no-unneeded-to-string": "error", | ||
"@dimensiondev/type/no-bigint": "off", | ||
"@dimensiondev/type/no-const-enum": "off", | ||
"@dimensiondev/type/no-force-cast-via-top-type": "error", | ||
"unicorn/no-instanceof-array": "off", | ||
"@dimensiondev/type/no-instanceof-wrapper": "error", | ||
"@dimensiondev/type/no-number-constructor": "error", | ||
"@dimensiondev/type/no-wrapper-type-reference": "error", | ||
"@dimensiondev/type/prefer-return-type-annotation": "error", | ||
"@dimensiondev/unicode/no-bidi": "off", | ||
"@dimensiondev/unicode/no-invisible": "error", | ||
"@dimensiondev/unicode/specific-set": "off", | ||
"@dimensiondev/ban-eslint-disable": "error", | ||
"@dimensiondev/no-builtin-base64": "error", | ||
"@dimensiondev/no-default-error": "error", | ||
"@dimensiondev/no-redundant-variable": "error", | ||
"@dimensiondev/no-single-return": "error", | ||
"@dimensiondev/no-then": "error", | ||
"@dimensiondev/no-timer": "off", | ||
"@dimensiondev/no-top-level": "off", | ||
"@dimensiondev/no-unsafe-date": "error", | ||
"@dimensiondev/prefer-default-export": "off", | ||
"@dimensiondev/prefer-early-return": "error", | ||
"@dimensiondev/prefer-fetch": "error", | ||
"@dimensiondev/prefer-timer-id": "error", | ||
"@typescript-eslint/adjacent-overload-signatures": "error", | ||
"@typescript-eslint/array-type": [ | ||
"warn", | ||
{ | ||
"default": "array", | ||
"readonly": "array" | ||
} | ||
], | ||
"@typescript-eslint/await-thenable": "error", | ||
"@typescript-eslint/no-empty-interface": "error", | ||
"@typescript-eslint/no-extra-non-null-assertion": "error", | ||
"@typescript-eslint/no-misused-promises": [ | ||
"error", | ||
{ | ||
"checksConditionals": true, | ||
"checksVoidReturn": true | ||
} | ||
], | ||
"@typescript-eslint/no-inferrable-types": [ | ||
"error", | ||
{ | ||
"ignoreParameters": false, | ||
"ignoreProperties": false | ||
} | ||
], | ||
"@typescript-eslint/no-non-null-asserted-optional-chain": "error", | ||
"@typescript-eslint/no-unnecessary-boolean-literal-compare": [ | ||
"warn", | ||
{ | ||
"allowComparingNullableBooleansToTrue": true | ||
} | ||
], | ||
"@typescript-eslint/strict-boolean-expressions": "error", | ||
"@typescript-eslint/no-unnecessary-condition": "warn", | ||
"@typescript-eslint/no-unnecessary-type-constraint": "warn", | ||
"@typescript-eslint/prefer-for-of": "warn", | ||
"@typescript-eslint/restrict-plus-operands": "error" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,27 @@ | ||
.github/ | ||
package.json | ||
package-lock.json | ||
truffle-config.js | ||
tsconfig.json | ||
README.md | ||
contracts/** | ||
migrations/** | ||
|
||
# VSCode personal settings | ||
.vscode/launch.json | ||
.vscode/tasks.json | ||
|
||
# Dependency directories | ||
node_modules/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# dotenv environment variables file | ||
.env | ||
.env.test | ||
|
||
# Generated files | ||
artifacts/ | ||
cache/ | ||
SmartContractProjectConfig/ | ||
types/ | ||
.openzeppelin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,27 @@ | ||
{ | ||
"trailingComma": "all", | ||
"printWidth": 120, | ||
"semi": true, | ||
"singleQuote": true, | ||
"jsxBracketSameLine": true, | ||
"tabWidth": 4, | ||
"overrides": [ | ||
{ | ||
"files": "*.md", | ||
"options": { | ||
"tabWidth": 2 | ||
} | ||
} | ||
] | ||
"trailingComma": "all", | ||
"printWidth": 120, | ||
"semi": true, | ||
"singleQuote": false, | ||
"jsxBracketSameLine": true, | ||
"tabWidth": 2, | ||
"overrides": [ | ||
{ | ||
"files": "*.md", | ||
"options": { | ||
"tabWidth": 2 | ||
} | ||
}, | ||
{ | ||
"files": "*.sol", | ||
"options": { | ||
"printWidth": 80, | ||
"tabWidth": 4, | ||
"useTabs": false, | ||
"singleQuote": false, | ||
"bracketSpacing": false, | ||
"explicitTypes": "always" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module.exports = { | ||
configureYulOptimizer: true, | ||
configureYulOptimizer: true, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule SmartContractProjectConfig
updated
14 files
+9 −0 | .editorconfig | |
+3 −0 | .env.example | |
+0 −1 | .gitignore | |
+32 −0 | Chains.csv | |
+11 −1 | README.md | |
+44 −0 | chains.ts | |
+0 −300 | config.js | |
+61 −0 | config.ts | |
+26 −0 | info/chainlinkVRF.json | |
+23 −0 | info/contractAddress.json | |
+174 −0 | info/networks.json | |
+0 −11 | project.secret.sample.js | |
+8 −0 | tsconfig.json | |
+115 −0 | types.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.