-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(sdk): switch to patch bigdeimal for better clarity (#312)
- Loading branch information
Showing
7 changed files
with
67 additions
and
8 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export { BigNumber as BigDecimal } from 'bignumber.js' | ||
export { BigDecimal } from '@sentio/bigdecimal' |
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,50 @@ | ||
/* eslint-disable */ | ||
const path = require('path') | ||
|
||
module.exports = { | ||
entry: { | ||
lib: './src/processor.ts', | ||
}, | ||
devtool: 'inline-source-map', | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.tsx?$/, | ||
use: 'ts-loader', | ||
exclude: /node_modules/, | ||
}, | ||
], | ||
}, | ||
resolve: { | ||
extensions: ['.ts', '.js'], | ||
}, | ||
output: { | ||
filename: '[name].js', | ||
path: path.resolve(process.cwd(), 'dist'), | ||
}, | ||
target: 'node', | ||
mode: 'production', | ||
externals: [ | ||
{ | ||
protobufjs: 'commonjs2 protobufjs', | ||
aptos: 'commonjs2 aptos-sdk', | ||
ethers: 'commonjs2 ethers', | ||
bs58: 'commonjs2 bs58', | ||
"bignumber.js": 'commonjs2 bignumber.js', | ||
'bn.js': 'commonjs2 bn.js', | ||
'csv-parse': 'commonjs2 csv-parse', | ||
}, | ||
function ({ context, request }, callback) { | ||
if (/^@(ethersproject|solana|project-serum|nice-grpc).*$/.test(request)) { | ||
return callback(null, 'commonjs ' + request) | ||
} | ||
if (/^nice-grpc.*$/.test(request)) { | ||
return callback(null, 'commonjs ' + request) | ||
} | ||
if (/^@sentio\/(sdk|runtime|base|protos|bigdecimal).*$/.test(request)) { | ||
return callback(null, 'commonjs ' + request) | ||
} | ||
callback() | ||
}, | ||
], | ||
} |
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 |
---|---|---|
|
@@ -2701,6 +2701,11 @@ | |
lodash "^4.17.4" | ||
read-pkg-up "^7.0.0" | ||
|
||
"@sentio/[email protected]": | ||
version "9.1.1-patch.1" | ||
resolved "https://registry.yarnpkg.com/@sentio/bigdecimal/-/bigdecimal-9.1.1-patch.1.tgz#0dfab1fcd85fc3b6e8c81c7d628455d6c113d9a9" | ||
integrity sha512-jdqGsnxy+BwCGH1g1Qw5RAnSBsYAyNzOr2HQAc7q9MW2oluegQsMC8GTz4YahL8OdYQT2B42gQA3lloDdaOxZw== | ||
|
||
"@sinclair/typebox@^0.24.1": | ||
version "0.24.51" | ||
resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.24.51.tgz#645f33fe4e02defe26f2f5c0410e1c094eac7f5f" | ||
|
@@ -3979,7 +3984,7 @@ bigint-buffer@^1.1.5: | |
dependencies: | ||
bindings "^1.3.0" | ||
|
||
bignumber.js@^9.0.0, bignumber.js@^9.0.1, bignumber.js@^9.1.0: | ||
bignumber.js@^9.0.0, bignumber.js@^9.0.1: | ||
version "9.1.1" | ||
resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.1.tgz#c4df7dc496bd849d4c9464344c1aa74228b4dac6" | ||
integrity sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig== | ||
|