Skip to content

Commit

Permalink
V3.1.0 (#98)
Browse files Browse the repository at this point in the history
* adapt transaction request object to include gasPricePolicy

* upgrade snyk packages
  • Loading branch information
ggarri authored Sep 2, 2020
1 parent 649814f commit 9b88c39
Show file tree
Hide file tree
Showing 8 changed files with 314 additions and 304 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

All notable changes to this project will be documented in this file.

## 3.0.2 (unreleased)
## 3.1.0 (unreleased)

### 🛠 Bug fixes

- Fixes a search of transactions by idempotency key issue
- Adapt transaction request interfaces to include gasPricePolicy

## 3.0.1 (31-07-2020)

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ The PegaSys Orchestrate library provides convenient access to the PegaSys Orches
| SDK versions | Orchestrate versions |
| ------------------- | ---------------------------- |
| master/HEAD | Orchestrate v2.3.x or higher |
| SDK v3.x.x | Orchestrate v2.3.x or higher |
| SDK v3.1.x | Orchestrate v2.3.x or higher |
| SDK v3.0.x | Orchestrate v2.3.x-rcX |
| SDK v2.3.x | Orchestrate v2.1.x or higher |
| SDK v2.2.x | Orchestrate v2.1.x or higher |
| SDK v2.1.x | Orchestrate v2.1.x or higher |
Expand Down
4 changes: 1 addition & 3 deletions examples/send-onetimekey-tx/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ export const start = async () => {
to: '0x4a435585d27cd7e6dae2c714be8e414b5fd7d257',
methodSignature: 'transfer(address,uint256)',
args: ['0x6009608a02a7a15fd6689d6dad560c44e9ab61ff', 5000],
annotations: {
oneTimeKey: true
}
oneTimeKey: true
}
},
'ExampleOneTimeKey'
Expand Down
4 changes: 3 additions & 1 deletion examples/send-transfer-with-priority/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ export const start = async () => {
from: '0x7e654d251da770a068413677967f6d3ea2fea9e4', // Default Orchestrate account in development mode
to: '0x6009608a02a7a15fd6689d6dad560c44e9ab61ff',
value: '100000000',
priority: Priority.VeryHigh
gasPricePolicy: {
priority: Priority.VeryHigh
}
}
},
'ExampleTransferPriority'
Expand Down
574 changes: 288 additions & 286 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pegasys-orchestrate",
"version": "3.0.2",
"version": "3.1.0",
"description": "The PegaSys Orchestrate library provides convenient access to the PegaSys Orchestrate API from applications written in server-side JavaScript",
"main": "lib/index.js",
"files": [
Expand Down Expand Up @@ -69,16 +69,16 @@
"@grpc/grpc-js": "~1.1.3",
"axios": "~0.19.2",
"commander": "~5.1.0",
"ethers": "~5.0.7",
"ethers": "~5.0.8",
"kafkajs": "~1.12.0",
"protobufjs": "~6.9.0",
"protobufjs": "~6.10.1",
"qs": "~6.9.4",
"uuid": "~8.2.0"
"uuid": "~8.3.0"
},
"devDependencies": {
"@types/bn.js": "~4.11.6",
"@types/qs": "~6.9.4",
"@types/jest": "~26.0.0",
"@types/qs": "~6.9.4",
"@types/uuid": "~8.0.0",
"axios-mock-adapter": "~1.18.1",
"husky": "~4.2.5",
Expand All @@ -93,8 +93,8 @@
"tslint": "~6.1.2",
"tslint-config-prettier": "~1.18.0",
"typedoc": "~0.17.7",
"typescript": "~3.9.5",
"typedoc-plugin-pages": "~1.0.1"
"typedoc-plugin-pages": "~1.0.1",
"typescript": "~3.9.5"
},
"husky": {
"hooks": {
Expand Down
5 changes: 5 additions & 0 deletions src/http/types/IGasPricePolicy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { Priority } from './Priority'

export interface IGasPricePolicy {
priority?: Priority
}
11 changes: 6 additions & 5 deletions src/http/types/ITransaction.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { ParsedQs } from 'qs'

import { IAnnotations } from './IAnnotations'
import { IGasPricePolicy } from './IGasPricePolicy'
import { IScheduleResponse } from './ISchedule'
import { Priority } from './Priority'
import { ProtocolType } from './ProtocolType'

interface IBaseRequest {
Expand All @@ -16,7 +15,8 @@ export interface ISendTransactionRequest extends IBaseRequest {
interface ITransactionParams extends IBaseTransactionParams, IPrivateTransactionParams {
to: string
methodSignature: string
annotations?: IAnnotations
gasPricePolicy?: IGasPricePolicy
oneTimeKey?: boolean
}

export interface IDeployContractRequest extends IBaseRequest {
Expand All @@ -25,7 +25,8 @@ export interface IDeployContractRequest extends IBaseRequest {
interface IDeployContractParams extends IBaseTransactionParams, IPrivateTransactionParams {
contractName: string
contractTag?: string
annotations?: IAnnotations
gasPricePolicy?: IGasPricePolicy
oneTimeKey?: boolean
}

export interface ISendRawRequest extends IBaseRequest {
Expand All @@ -41,7 +42,7 @@ export interface ITransferRequest extends IBaseRequest {
value: string
gas?: string
gasPrice?: string
priority?: Priority
gasPricePolicy?: IGasPricePolicy
}
}

Expand Down

0 comments on commit 9b88c39

Please sign in to comment.