Skip to content

Commit

Permalink
Merge pull request #143 from blocknative/release/3.5.0
Browse files Browse the repository at this point in the history
Release 3.5.0
  • Loading branch information
lnbc1QWFyb24 authored Aug 15, 2021
2 parents a5c9f53 + a665a11 commit 8c5e011
Show file tree
Hide file tree
Showing 5 changed files with 508 additions and 439 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bnc-sdk",
"version": "3.4.1",
"version": "3.5.0",
"description": "SDK to connect to the blocknative backend via a websocket connection",
"keywords": [
"ethereum",
Expand All @@ -26,7 +26,7 @@
"prepare": "npm run build"
},
"devDependencies": {
"@babel/cli": "^7.7.0",
"@babel/cli": "^7.14.8",
"@babel/core": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"@rollup/plugin-commonjs": "^11.0.2",
Expand All @@ -35,7 +35,7 @@
"@typescript-eslint/eslint-plugin": "^2.30.0",
"@typescript-eslint/parser": "^2.30.0",
"babel-plugin-external-helpers": "^6.18.0",
"eslint": "^6.8.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.3",
"prettier": "^2.0.5",
Expand Down
7 changes: 7 additions & 0 deletions pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### Description
<!-- Add a description of the fix or feature here -->

### Checklist
- [ ] The version field in `package.json` is incremented following [semantic versioning](https://semver.org/)
- [ ] The box that allows repo maintainers to update this PR is checked
- [ ] I tested locally to make sure this feature/fix works
3 changes: 2 additions & 1 deletion src/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ export const networks: { [key: string]: { [key: string]: string } } = {
'5': 'goerli',
'42': 'kovan',
'56': 'bsc-main',
'100': 'xdai'
'100': 'xdai',
'137': 'matic-main'
}
}

Expand Down
40 changes: 37 additions & 3 deletions src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ export interface NotificationObject {

export interface ContractCall {
methodName: string
params: {
[key: string]: string
}
params: Record<string, unknown>
contractAddress?: string
contractType?: string
contractDecimals: number
Expand Down Expand Up @@ -47,6 +45,8 @@ export interface EthereumTransactionData extends CommonTransactionData {
blockHash: string
blockNumber: number
contractCall: ContractCall
internalTransactions: InternalTransaction[]
netBalanceChanges: NetBalanceChange[]
to: string
from: string
gas: string
Expand All @@ -67,6 +67,39 @@ export interface EthereumTransactionData extends CommonTransactionData {
direction?: string
}

export interface InternalTransaction {
type: string
from: string
to: string
input: string
gas: number
gasUsed: number
value: string
contractCall: ContractCall
}

export interface NetBalanceChange {
address: string
balanceChanges: BalanceChange[]
}

export interface BalanceChange {
delta: string
asset: Asset
breakdown: BreakDown[]
}

export interface Asset {
type: string
symbol: string
contractAddress: string
}

export interface BreakDown {
counterparty: string
amount: string
}

export type TransactionData = BitcoinTransactionData | EthereumTransactionData

export interface TransactionEvent {
Expand All @@ -84,6 +117,7 @@ export type Network =
| 'kovan'
| 'xdai'
| 'bsc-main'
| 'matic-main'
| 'local'

export type Status =
Expand Down
Loading

0 comments on commit 8c5e011

Please sign in to comment.