Skip to content

Commit

Permalink
feat(ethers): extract ethers.js related things to @ditto-network/ethe…
Browse files Browse the repository at this point in the history
…rs package
  • Loading branch information
isaldin committed Apr 30, 2024
1 parent c6aec41 commit e038042
Show file tree
Hide file tree
Showing 51 changed files with 7,766 additions and 527 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
node_modules
node_modules/
35 changes: 35 additions & 0 deletions .eslintrc.base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nx"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
]
}
]
}
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
}
]
}
7 changes: 2 additions & 5 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nx"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
Expand All @@ -23,13 +21,12 @@
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
}
]
],
"extends": ["./.eslintrc.base.json"]
}
28 changes: 28 additions & 0 deletions .verdaccio/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# path to a directory with all packages
storage: ../tmp/local-registry/storage

# a list of other known repositories we can talk to
uplinks:
npmjs:
url: https://registry.npmjs.org/
maxage: 60m

packages:
'**':
# give all users (including non-authenticated users) full access
# because it is a local registry
access: $all
publish: $all
unpublish: $all

# if package is not available locally, proxy requests to npm registry
proxy: npmjs

# log settings
logs:
type: stdout
format: pretty
level: warn

publish:
allow_offline: true # set offline to true to allow publish offline
2 changes: 1 addition & 1 deletion commitlint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default {
'test',
],
] as [RuleConfigSeverity, RuleConfigCondition, string[]],
'scope-enum': [RuleConfigSeverity.Error, 'always', ['global', 'core', 'examples']],
'scope-enum': [RuleConfigSeverity.Error, 'always', ['global', 'core', 'examples', 'ethers']],
},
prompt: {
questions: {
Expand Down
3 changes: 1 addition & 2 deletions examples/nodejs-example/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { ethers } from 'ethers';
import {
Chain,
CommonBuilderOptions,
EthersContractFactory,
EthersSigner,
InMemoryStorage,
PriceTrigger,
Provider,
Expand All @@ -14,6 +12,7 @@ import {
UniswapSwapActionCallDataBuilder,
WorkflowsFactory,
} from '@ditto-network/core';
import { EthersSigner, EthersContractFactory } from '@ditto-network/ethers';

(async () => {
const chainId = Chain.Polygon;
Expand Down
5 changes: 5 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,10 @@
"dependsOn": ["^build"],
"inputs": ["production", "^production"]
}
},
"release": {
"version": {
"preVersionCommand": "npx nx run-many -t build"
}
}
}
Loading

0 comments on commit e038042

Please sign in to comment.