Skip to content
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.

Commit

Permalink
Merge pull request #168 from ethereumjs/new-release-2.1.0
Browse files Browse the repository at this point in the history
New release: v2.1.0
  • Loading branch information
holgerd77 authored Jul 6, 2019
2 parents 343ea82 + c33ff1f commit 9a6324f
Show file tree
Hide file tree
Showing 10 changed files with 111 additions and 87 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
dist/
.idea/
test-build/
package-lock.json

# Created by https://www.gitignore.io/api/osx,node

Expand Down
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,29 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
(modification: no type change headlines) and this project adheres to
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [2.1.0] - 2018-06-28

**Using testnets and custom/private networks is now easier**

This release is focused on making this library easier to use in chains other than `mainnet`.

Using standard testnets can be as easy as passing their names to the `Transaction` constructor. For
example, `new Transaction(rawTx, {chain: 'ropsten', hardfork: 'byzantium'})` is enough to use this
library with Ropsten on Byzantium.

If you are using a custom network, you can take advantage of [ethereumjs-common](https://github.com/ethereumjs/ethereumjs-common),
which contains all the network parameters. In this version of `ethereumjs-tx` you can use its new
`Common.forCustomNetwork` to create a `Common` instance based on a standard network with some
parameters changed. You can see an example of how to do this [here](https://github.com/ethereumjs/ethereumjs-common/blob/9e624f86107cea904d8171524130d92c99bf9302/src/index.ts).

List of changes:

- Upgraded [ethereumjs-common](https://github.com/ethereumjs/ethereumjs-common) to `^1.3.0`
- Added more documentation and examples on how to create transactions for public testnets and
custom networks.

[2.1.0]: https://github.com/ethereumjs/ethereumjs-tx/compare/v2.0.0...v2.1.0

## [2.0.0] - 2019-06-03

**TypeScript / Module Import / Node Support**
Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

**Ƭ BufferLike**: _`Buffer` \| [TransformableToBuffer](interfaces/transformabletobuffer.md) \| [PrefixedHexString](#prefixedhexstring) \| `number`_

_Defined in [types.ts:19](https://github.com/ethereumjs/ethereumjs-tx/blob/5b72ca6/src/types.ts#L19)_
_Defined in [types.ts:19](https://github.com/ethereumjs/ethereumjs-tx/blob/5c81b38/src/types.ts#L19)_

A Buffer, hex string prefixed with `0x`, Number, or an object with a toBuffer method such as BN.

Expand All @@ -41,7 +41,7 @@ A Buffer, hex string prefixed with `0x`, Number, or an object with a toBuffer me

**Ƭ PrefixedHexString**: _`string`_

_Defined in [types.ts:14](https://github.com/ethereumjs/ethereumjs-tx/blob/5b72ca6/src/types.ts#L14)_
_Defined in [types.ts:14](https://github.com/ethereumjs/ethereumjs-tx/blob/5c81b38/src/types.ts#L14)_

A hex string prefixed with `0x`.

Expand Down
56 changes: 28 additions & 28 deletions docs/classes/faketransaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ _**see**_: Transaction

_Overrides [Transaction](transaction.md).[constructor](transaction.md#constructor)_

_Defined in [fake.ts:22](https://github.com/ethereumjs/ethereumjs-tx/blob/5b72ca6/src/fake.ts#L22)_
_Defined in [fake.ts:22](https://github.com/ethereumjs/ethereumjs-tx/blob/5c81b38/src/fake.ts#L22)_

**Parameters:**

Expand All @@ -88,7 +88,7 @@ _Defined in [fake.ts:22](https://github.com/ethereumjs/ethereumjs-tx/blob/5b72ca

_Inherited from [Transaction](transaction.md).[\_from](transaction.md#_from)_

_Defined in [transaction.ts:37](https://github.com/ethereumjs/ethereumjs-tx/blob/5b72ca6/src/transaction.ts#L37)_
_Defined in [transaction.ts:37](https://github.com/ethereumjs/ethereumjs-tx/blob/5c81b38/src/transaction.ts#L37)_

---

Expand All @@ -100,7 +100,7 @@ _Defined in [transaction.ts:37](https://github.com/ethereumjs/ethereumjs-tx/blob

_Inherited from [Transaction](transaction.md).[data](transaction.md#data)_

_Defined in [transaction.ts:30](https://github.com/ethereumjs/ethereumjs-tx/blob/5b72ca6/src/transaction.ts#L30)_
_Defined in [transaction.ts:30](https://github.com/ethereumjs/ethereumjs-tx/blob/5c81b38/src/transaction.ts#L30)_

---

Expand All @@ -110,7 +110,7 @@ _Defined in [transaction.ts:30](https://github.com/ethereumjs/ethereumjs-tx/blob

**● from**: _`Buffer`_

_Defined in [fake.ts:22](https://github.com/ethereumjs/ethereumjs-tx/blob/5b72ca6/src/fake.ts#L22)_
_Defined in [fake.ts:22](https://github.com/ethereumjs/ethereumjs-tx/blob/5c81b38/src/fake.ts#L22)_

Set from address to bypass transaction signing. This is not an optional property, as its getter never returns undefined.

Expand All @@ -124,7 +124,7 @@ Set from address to bypass transaction signing. This is not an optional property

_Inherited from [Transaction](transaction.md).[gasLimit](transaction.md#gaslimit)_

_Defined in [transaction.ts:26](https://github.com/ethereumjs/ethereumjs-tx/blob/5b72ca6/src/transaction.ts#L26)_
_Defined in [transaction.ts:26](https://github.com/ethereumjs/ethereumjs-tx/blob/5c81b38/src/transaction.ts#L26)_

---

Expand All @@ -136,7 +136,7 @@ _Defined in [transaction.ts:26](https://github.com/ethereumjs/ethereumjs-tx/blob

_Inherited from [Transaction](transaction.md).[gasPrice](transaction.md#gasprice)_

_Defined in [transaction.ts:27](https://github.com/ethereumjs/ethereumjs-tx/blob/5b72ca6/src/transaction.ts#L27)_
_Defined in [transaction.ts:27](https://github.com/ethereumjs/ethereumjs-tx/blob/5c81b38/src/transaction.ts#L27)_

---

Expand All @@ -148,7 +148,7 @@ _Defined in [transaction.ts:27](https://github.com/ethereumjs/ethereumjs-tx/blob

_Inherited from [Transaction](transaction.md).[nonce](transaction.md#nonce)_

_Defined in [transaction.ts:25](https://github.com/ethereumjs/ethereumjs-tx/blob/5b72ca6/src/transaction.ts#L25)_
_Defined in [transaction.ts:25](https://github.com/ethereumjs/ethereumjs-tx/blob/5c81b38/src/transaction.ts#L25)_

---

Expand All @@ -160,7 +160,7 @@ _Defined in [transaction.ts:25](https://github.com/ethereumjs/ethereumjs-tx/blob

_Inherited from [Transaction](transaction.md).[r](transaction.md#r)_

_Defined in [transaction.ts:32](https://github.com/ethereumjs/ethereumjs-tx/blob/5b72ca6/src/transaction.ts#L32)_
_Defined in [transaction.ts:32](https://github.com/ethereumjs/ethereumjs-tx/blob/5c81b38/src/transaction.ts#L32)_

---

Expand All @@ -172,7 +172,7 @@ _Defined in [transaction.ts:32](https://github.com/ethereumjs/ethereumjs-tx/blob

_Inherited from [Transaction](transaction.md).[raw](transaction.md#raw)_

_Defined in [transaction.ts:24](https://github.com/ethereumjs/ethereumjs-tx/blob/5b72ca6/src/transaction.ts#L24)_
_Defined in [transaction.ts:24](https://github.com/ethereumjs/ethereumjs-tx/blob/5c81b38/src/transaction.ts#L24)_

---

Expand All @@ -184,7 +184,7 @@ _Defined in [transaction.ts:24](https://github.com/ethereumjs/ethereumjs-tx/blob

_Inherited from [Transaction](transaction.md).[s](transaction.md#s)_

_Defined in [transaction.ts:33](https://github.com/ethereumjs/ethereumjs-tx/blob/5b72ca6/src/transaction.ts#L33)_
_Defined in [transaction.ts:33](https://github.com/ethereumjs/ethereumjs-tx/blob/5c81b38/src/transaction.ts#L33)_

---

Expand All @@ -196,7 +196,7 @@ _Defined in [transaction.ts:33](https://github.com/ethereumjs/ethereumjs-tx/blob

_Inherited from [Transaction](transaction.md).[to](transaction.md#to)_

_Defined in [transaction.ts:28](https://github.com/ethereumjs/ethereumjs-tx/blob/5b72ca6/src/transaction.ts#L28)_
_Defined in [transaction.ts:28](https://github.com/ethereumjs/ethereumjs-tx/blob/5c81b38/src/transaction.ts#L28)_

---

Expand All @@ -208,7 +208,7 @@ _Defined in [transaction.ts:28](https://github.com/ethereumjs/ethereumjs-tx/blob

_Inherited from [Transaction](transaction.md).[v](transaction.md#v)_

_Defined in [transaction.ts:31](https://github.com/ethereumjs/ethereumjs-tx/blob/5b72ca6/src/transaction.ts#L31)_
_Defined in [transaction.ts:31](https://github.com/ethereumjs/ethereumjs-tx/blob/5c81b38/src/transaction.ts#L31)_

---

Expand All @@ -220,7 +220,7 @@ _Defined in [transaction.ts:31](https://github.com/ethereumjs/ethereumjs-tx/blob

_Inherited from [Transaction](transaction.md).[value](transaction.md#value)_

_Defined in [transaction.ts:29](https://github.com/ethereumjs/ethereumjs-tx/blob/5b72ca6/src/transaction.ts#L29)_
_Defined in [transaction.ts:29](https://github.com/ethereumjs/ethereumjs-tx/blob/5c81b38/src/transaction.ts#L29)_

---

Expand All @@ -234,7 +234,7 @@ _Defined in [transaction.ts:29](https://github.com/ethereumjs/ethereumjs-tx/blob

_Inherited from [Transaction](transaction.md).[getBaseFee](transaction.md#getbasefee)_

_Defined in [transaction.ts:296](https://github.com/ethereumjs/ethereumjs-tx/blob/5b72ca6/src/transaction.ts#L296)_
_Defined in [transaction.ts:296](https://github.com/ethereumjs/ethereumjs-tx/blob/5c81b38/src/transaction.ts#L296)_

the minimum amount of gas the tx must have (DataFee + TxFee + Creation Fee)

Expand All @@ -250,7 +250,7 @@ the minimum amount of gas the tx must have (DataFee + TxFee + Creation Fee)

_Inherited from [Transaction](transaction.md).[getChainId](transaction.md#getchainid)_

_Defined in [transaction.ts:202](https://github.com/ethereumjs/ethereumjs-tx/blob/5b72ca6/src/transaction.ts#L202)_
_Defined in [transaction.ts:202](https://github.com/ethereumjs/ethereumjs-tx/blob/5c81b38/src/transaction.ts#L202)_

returns chain ID

Expand All @@ -266,7 +266,7 @@ returns chain ID

_Inherited from [Transaction](transaction.md).[getDataFee](transaction.md#getdatafee)_

_Defined in [transaction.ts:282](https://github.com/ethereumjs/ethereumjs-tx/blob/5b72ca6/src/transaction.ts#L282)_
_Defined in [transaction.ts:282](https://github.com/ethereumjs/ethereumjs-tx/blob/5c81b38/src/transaction.ts#L282)_

The amount of gas paid for the data in this tx

Expand All @@ -282,7 +282,7 @@ The amount of gas paid for the data in this tx

_Inherited from [Transaction](transaction.md).[getSenderAddress](transaction.md#getsenderaddress)_

_Defined in [transaction.ts:209](https://github.com/ethereumjs/ethereumjs-tx/blob/5b72ca6/src/transaction.ts#L209)_
_Defined in [transaction.ts:209](https://github.com/ethereumjs/ethereumjs-tx/blob/5c81b38/src/transaction.ts#L209)_

returns the sender's address

Expand All @@ -298,7 +298,7 @@ returns the sender's address

_Inherited from [Transaction](transaction.md).[getSenderPublicKey](transaction.md#getsenderpublickey)_

_Defined in [transaction.ts:221](https://github.com/ethereumjs/ethereumjs-tx/blob/5b72ca6/src/transaction.ts#L221)_
_Defined in [transaction.ts:221](https://github.com/ethereumjs/ethereumjs-tx/blob/5c81b38/src/transaction.ts#L221)_

returns the public key of the sender

Expand All @@ -314,7 +314,7 @@ returns the public key of the sender

_Inherited from [Transaction](transaction.md).[getUpfrontCost](transaction.md#getupfrontcost)_

_Defined in [transaction.ts:307](https://github.com/ethereumjs/ethereumjs-tx/blob/5b72ca6/src/transaction.ts#L307)_
_Defined in [transaction.ts:307](https://github.com/ethereumjs/ethereumjs-tx/blob/5c81b38/src/transaction.ts#L307)_

the up front amount that an account must have for this transaction to be valid

Expand All @@ -330,7 +330,7 @@ the up front amount that an account must have for this transaction to be valid

_Overrides [Transaction](transaction.md).[hash](transaction.md#hash)_

_Defined in [fake.ts:53](https://github.com/ethereumjs/ethereumjs-tx/blob/5b72ca6/src/fake.ts#L53)_
_Defined in [fake.ts:53](https://github.com/ethereumjs/ethereumjs-tx/blob/5c81b38/src/fake.ts#L53)_

Computes a sha3-256 hash of the serialized tx, using the sender address to generate a fake signature.

Expand All @@ -352,7 +352,7 @@ Computes a sha3-256 hash of the serialized tx, using the sender address to gener

_Inherited from [Transaction](transaction.md).[serialize](transaction.md#serialize)_

_Defined in [transaction.ts:337](https://github.com/ethereumjs/ethereumjs-tx/blob/5b72ca6/src/transaction.ts#L337)_
_Defined in [transaction.ts:337](https://github.com/ethereumjs/ethereumjs-tx/blob/5c81b38/src/transaction.ts#L337)_

Returns the rlp encoding of the transaction

Expand All @@ -368,7 +368,7 @@ Returns the rlp encoding of the transaction

_Inherited from [Transaction](transaction.md).[sign](transaction.md#sign)_

_Defined in [transaction.ts:262](https://github.com/ethereumjs/ethereumjs-tx/blob/5b72ca6/src/transaction.ts#L262)_
_Defined in [transaction.ts:262](https://github.com/ethereumjs/ethereumjs-tx/blob/5c81b38/src/transaction.ts#L262)_

sign a transaction with a given private key

Expand All @@ -390,7 +390,7 @@ sign a transaction with a given private key

_Inherited from [Transaction](transaction.md).[toCreationAddress](transaction.md#tocreationaddress)_

_Defined in [transaction.ts:169](https://github.com/ethereumjs/ethereumjs-tx/blob/5b72ca6/src/transaction.ts#L169)_
_Defined in [transaction.ts:169](https://github.com/ethereumjs/ethereumjs-tx/blob/5c81b38/src/transaction.ts#L169)_

If the tx's `to` is to the creation address

Expand All @@ -406,7 +406,7 @@ If the tx's `to` is to the creation address

_Inherited from [Transaction](transaction.md).[toJSON](transaction.md#tojson)_

_Defined in [transaction.ts:346](https://github.com/ethereumjs/ethereumjs-tx/blob/5b72ca6/src/transaction.ts#L346)_
_Defined in [transaction.ts:346](https://github.com/ethereumjs/ethereumjs-tx/blob/5c81b38/src/transaction.ts#L346)_

Returns the transaction in JSON format

Expand Down Expand Up @@ -434,15 +434,15 @@ _**see**_: [ethereumjs-util](https://github.com/ethereumjs/ethereumjs-util/blob/

_Inherited from [Transaction](transaction.md).[validate](transaction.md#validate)_

_Defined in [transaction.ts:314](https://github.com/ethereumjs/ethereumjs-tx/blob/5b72ca6/src/transaction.ts#L314)_
_Defined in [transaction.ts:314](https://github.com/ethereumjs/ethereumjs-tx/blob/5c81b38/src/transaction.ts#L314)_

Validates the signature and checks to see if it has enough gas.

**Returns:** `boolean`

_Inherited from [Transaction](transaction.md).[validate](transaction.md#validate)_

_Defined in [transaction.ts:315](https://github.com/ethereumjs/ethereumjs-tx/blob/5b72ca6/src/transaction.ts#L315)_
_Defined in [transaction.ts:315](https://github.com/ethereumjs/ethereumjs-tx/blob/5c81b38/src/transaction.ts#L315)_

**Parameters:**

Expand All @@ -454,7 +454,7 @@ _Defined in [transaction.ts:315](https://github.com/ethereumjs/ethereumjs-tx/blo

_Inherited from [Transaction](transaction.md).[validate](transaction.md#validate)_

_Defined in [transaction.ts:316](https://github.com/ethereumjs/ethereumjs-tx/blob/5b72ca6/src/transaction.ts#L316)_
_Defined in [transaction.ts:316](https://github.com/ethereumjs/ethereumjs-tx/blob/5c81b38/src/transaction.ts#L316)_

**Parameters:**

Expand All @@ -474,7 +474,7 @@ _Defined in [transaction.ts:316](https://github.com/ethereumjs/ethereumjs-tx/blo

_Inherited from [Transaction](transaction.md).[verifySignature](transaction.md#verifysignature)_

_Defined in [transaction.ts:233](https://github.com/ethereumjs/ethereumjs-tx/blob/5b72ca6/src/transaction.ts#L233)_
_Defined in [transaction.ts:233](https://github.com/ethereumjs/ethereumjs-tx/blob/5c81b38/src/transaction.ts#L233)_

Determines if the signature is valid

Expand Down
Loading

0 comments on commit 9a6324f

Please sign in to comment.