Skip to content

Commit

Permalink
Merge pull request #514 from nervosnetwork/rc/v0.38.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY authored Nov 20, 2020
2 parents 9e4d525 + 77f1d47 commit 3439615
Show file tree
Hide file tree
Showing 14 changed files with 344 additions and 34 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [0.38.0](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.37.0...v0.38.0) (2020-11-20)


### Bug Fixes

* **core:** use change lock script instead of change public key hash ([b16bfc8](https://github.com/nervosnetwork/ckb-sdk-js/commit/b16bfc8788c551730e42179b43d6b5625ee3ed7c))


### BREAKING CHANGES

* **core:** `changePublicKeyHash` in `generateRawTransaction` is replaced with
`changeLockScript`





# [0.37.0](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.36.1...v0.37.0) (2020-10-25)


Expand Down
6 changes: 4 additions & 2 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"packages": ["packages/*"],
"packages": [
"packages/*"
],
"npmClient": "yarn",
"useWorkspaces": true,
"version": "0.37.0"
"version": "0.38.0"
}
17 changes: 17 additions & 0 deletions packages/ckb-sdk-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [0.38.0](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.37.0...v0.38.0) (2020-11-20)


### Bug Fixes

* **core:** use change lock script instead of change public key hash ([b16bfc8](https://github.com/nervosnetwork/ckb-sdk-js/commit/b16bfc8788c551730e42179b43d6b5625ee3ed7c))


### BREAKING CHANGES

* **core:** `changePublicKeyHash` in `generateRawTransaction` is replaced with
`changeLockScript`





# [0.37.0](https://github.com/nervosnetwork/ckb-sdk-js/compare/v0.36.1...v0.37.0) (2020-10-25)


Expand Down
270 changes: 262 additions & 8 deletions packages/ckb-sdk-core/__tests__/generateRawTransaction/fixtures.json
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
"capacity": "0x88cb4e12e",
"lock": {
"args": "0xe2fa82e70b062c8644b80ad7ecf6e015e5f352f6",
"codeHash": "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",
"codeHash": "0x1892ea40d82b53c678ff88312450bbb17e164d7a3e0a90941aa58839f56f8df2",
"hashType": "type"
}
}
Expand Down Expand Up @@ -470,7 +470,7 @@
"capacity": "0x88cb4e12e",
"lock": {
"args": "0xe2fa82e70b062c8644b80ad7ecf6e015e5f352f6",
"codeHash": "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",
"codeHash": "0x1892ea40d82b53c678ff88312450bbb17e164d7a3e0a90941aa58839f56f8df2",
"hashType": "type"
}
}
Expand Down Expand Up @@ -716,7 +716,7 @@
"capacity": "0x88cb4e12e",
"lock": {
"args": "0xe2fa82e70b062c8644b80ad7ecf6e015e5f352f6",
"codeHash": "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",
"codeHash": "0x1892ea40d82b53c678ff88312450bbb17e164d7a3e0a90941aa58839f56f8df2",
"hashType": "type"
}
}
Expand Down Expand Up @@ -969,7 +969,7 @@
"capacity": "0x20001c425c",
"lock": {
"args": "0xe2fa82e70b062c8644b80ad7ecf6e015e5f352f6",
"codeHash": "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",
"codeHash": "0x1892ea40d82b53c678ff88312450bbb17e164d7a3e0a90941aa58839f56f8df2",
"hashType": "type"
}
}
Expand All @@ -991,6 +991,256 @@
]
}
},
"should use secp256k1 lock when change lock script is set": {
"params": {
"inputScript": {
"args": "0xe2fa82e70b062c8644b80ad7ecf6e015e5f352f6",
"codeHash": "0x1892ea40d82b53c678ff88312450bbb17e164d7a3e0a90941aa58839f56f8df2",
"hashType": "type"
},
"outputScript": {
"args": "0xddbd7f09eb480450c1b1ed2c8696248de91c6802",
"codeHash": "0x1892ea40d82b53c678ff88312450bbb17e164d7a3e0a90941aa58839f56f8df2",
"hashType": "type"
},
"changeLockScript": {
"codeHash": "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",
"hashType": "type",
"args": "0xe2fa82e70b062c8644b80ad7ecf6e015e5f352f0"
},
"capacity": 783602000000,
"fee": 13670,
"cells": [
{
"lock": {
"codeHash": "0x1892ea40d82b53c678ff88312450bbb17e164d7a3e0a90941aa58839f56f8df2",
"hashType": "type",
"args": "0xe2fa82e70b062c8644b80ad7ecf6e015e5f352f6"
},
"outPoint": {
"txHash": "0x9160bef8b6a9e388a99184bfd8bea0e7795b487c77fe784120fb2bc3fb25d1b2",
"index": "0x0"
},
"capacity": "0x1fd52bc92e",
"data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
},
{
"lock": {
"codeHash": "0x1892ea40d82b53c678ff88312450bbb17e164d7a3e0a90941aa58839f56f8df2",
"hashType": "type",
"args": "0xe2fa82e70b062c8644b80ad7ecf6e015e5f352f6"
},
"outPoint": {
"txHash": "0x9160bef8b6a9e388a99184bfd8bea0e7795b487c77fe784120fb2bc3fb25d1b2",
"index": "0x1"
},
"capacity": "0x1fd52bc92e",
"data": "0x"
},
{
"lock": {
"codeHash": "0x1892ea40d82b53c678ff88312450bbb17e164d7a3e0a90941aa58839f56f8df2",
"hashType": "type",
"args": "0xe2fa82e70b062c8644b80ad7ecf6e015e5f352f6"
},
"outPoint": {
"txHash": "0x9160bef8b6a9e388a99184bfd8bea0e7795b487c77fe784120fb2bc3fb25d1b2",
"index": "0x2"
},
"capacity": "0x1fd52bc92e",
"data": "0x"
},
{
"lock": {
"codeHash": "0x1892ea40d82b53c678ff88312450bbb17e164d7a3e0a90941aa58839f56f8df2",
"hashType": "type",
"args": "0xe2fa82e70b062c8644b80ad7ecf6e015e5f352f6"
},
"outPoint": {
"txHash": "0x9160bef8b6a9e388a99184bfd8bea0e7795b487c77fe784120fb2bc3fb25d1b2",
"index": "0x3"
},
"capacity": "0x1fd52bc92e",
"data": "0x"
},
{
"lock": {
"codeHash": "0x1892ea40d82b53c678ff88312450bbb17e164d7a3e0a90941aa58839f56f8df2",
"hashType": "type",
"args": "0xe2fa82e70b062c8644b80ad7ecf6e015e5f352f6"
},
"outPoint": {
"txHash": "0x9160bef8b6a9e388a99184bfd8bea0e7795b487c77fe784120fb2bc3fb25d1b2",
"index": "0x4"
},
"capacity": "0x1fd52bc92e",
"data": "0x"
},
{
"lock": {
"codeHash": "0x1892ea40d82b53c678ff88312450bbb17e164d7a3e0a90941aa58839f56f8df2",
"hashType": "type",
"args": "0xe2fa82e70b062c8644b80ad7ecf6e015e5f352f6"
},
"outPoint": {
"txHash": "0x9160bef8b6a9e388a99184bfd8bea0e7795b487c77fe784120fb2bc3fb25d1b2",
"index": "0x5"
},
"capacity": "0x1fd52bc92e",
"data": "0x"
},
{
"lock": {
"codeHash": "0x1892ea40d82b53c678ff88312450bbb17e164d7a3e0a90941aa58839f56f8df2",
"hashType": "type",
"args": "0xe2fa82e70b062c8644b80ad7ecf6e015e5f352f6"
},
"outPoint": {
"txHash": "0x9160bef8b6a9e388a99184bfd8bea0e7795b487c77fe784120fb2bc3fb25d1b2",
"index": "0x6"
},
"capacity": "0x1fd52bc92e",
"data": "0x"
},
{
"lock": {
"codeHash": "0x1892ea40d82b53c678ff88312450bbb17e164d7a3e0a90941aa58839f56f8df2",
"hashType": "type",
"args": "0xe2fa82e70b062c8644b80ad7ecf6e015e5f352f6"
},
"outPoint": {
"txHash": "0x9160bef8b6a9e388a99184bfd8bea0e7795b487c77fe784120fb2bc3fb25d1b2",
"index": "0x7"
},
"capacity": "0x1fd52bc92e",
"data": "0x"
},
{
"lock": {
"codeHash": "0x1892ea40d82b53c678ff88312450bbb17e164d7a3e0a90941aa58839f56f8df2",
"hashType": "type",
"args": "0xe2fa82e70b062c8644b80ad7ecf6e015e5f352f6"
},
"outPoint": {
"txHash": "0x9160bef8b6a9e388a99184bfd8bea0e7795b487c77fe784120fb2bc3fb25d1b2",
"index": "0x8"
},
"capacity": "0x1fd52bc92e",
"data": "0x"
},
{
"lock": {
"codeHash": "0x1892ea40d82b53c678ff88312450bbb17e164d7a3e0a90941aa58839f56f8df2",
"hashType": "type",
"args": "0xe2fa82e70b062c8644b80ad7ecf6e015e5f352f6"
},
"outPoint": {
"txHash": "0x9160bef8b6a9e388a99184bfd8bea0e7795b487c77fe784120fb2bc3fb25d1b2",
"index": "0x9"
},
"capacity": "0x1fd52bc92e",
"data": "0x"
}
],
"deps": {
"hashType": "type",
"codeHash": "0x1892ea40d82b53c678ff88312450bbb17e164d7a3e0a90941aa58839f56f8df2",
"outPoint": {
"txHash": "0x6347ee7ce5fc6828133590558b867097b895149a66e51cf353c361f7128e2091",
"index": "0x0"
},
"depType": "depGroup"
}
},
"expected": {
"cellDeps": [
{
"depType": "depGroup",
"outPoint": {
"index": "0x0",
"txHash": "0x6347ee7ce5fc6828133590558b867097b895149a66e51cf353c361f7128e2091"
}
}
],
"headerDeps": [],
"inputs": [
{
"previousOutput": {
"index": "0x1",
"txHash": "0x9160bef8b6a9e388a99184bfd8bea0e7795b487c77fe784120fb2bc3fb25d1b2"
},
"since": "0x0"
},
{
"previousOutput": {
"index": "0x2",
"txHash": "0x9160bef8b6a9e388a99184bfd8bea0e7795b487c77fe784120fb2bc3fb25d1b2"
},
"since": "0x0"
},
{
"previousOutput": {
"index": "0x3",
"txHash": "0x9160bef8b6a9e388a99184bfd8bea0e7795b487c77fe784120fb2bc3fb25d1b2"
},
"since": "0x0"
},
{
"previousOutput": {
"index": "0x4",
"txHash": "0x9160bef8b6a9e388a99184bfd8bea0e7795b487c77fe784120fb2bc3fb25d1b2"
},
"since": "0x0"
},
{
"previousOutput": {
"index": "0x5",
"txHash": "0x9160bef8b6a9e388a99184bfd8bea0e7795b487c77fe784120fb2bc3fb25d1b2"
},
"since": "0x0"
},
{
"previousOutput": {
"index": "0x6",
"txHash": "0x9160bef8b6a9e388a99184bfd8bea0e7795b487c77fe784120fb2bc3fb25d1b2"
},
"since": "0x0"
}
],
"outputs": [
{
"capacity": "0xb67251a080",
"lock": {
"args": "0xddbd7f09eb480450c1b1ed2c8696248de91c6802",
"codeHash": "0x1892ea40d82b53c678ff88312450bbb17e164d7a3e0a90941aa58839f56f8df2",
"hashType": "type"
}
},
{
"capacity": "0x88cb4e12e",
"lock": {
"args": "0xe2fa82e70b062c8644b80ad7ecf6e015e5f352f0",
"codeHash": "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",
"hashType": "type"
}
}
],
"outputsData": ["0x", "0x"],
"version": "0x0",
"witnesses": [
{
"inputType": "",
"outputType": "",
"lock": ""
},
"0x",
"0x",
"0x",
"0x",
"0x"
]
}
},
"multi inputs": {
"params": {
"inputScripts": [
Expand All @@ -1005,7 +1255,11 @@
"hashType": "type"
}
],
"changePublicKeyHash": "0xe2fa82e70b062c8644b80ad7ecf6e015e5f352f0",
"changeLockScript": {
"codeHash": "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",
"hashType": "type",
"args": "0xe2fa82e70b062c8644b80ad7ecf6e015e5f352f0"
},
"outputs": [
{
"lock": {
Expand Down Expand Up @@ -1401,7 +1655,7 @@
"capacity": "0x88cb4e12e",
"lock": {
"args": "0xe2fa82e70b062c8644b80ad7ecf6e015e5f352f6",
"codeHash": "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",
"codeHash": "0x1892ea40d82b53c678ff88312450bbb17e164d7a3e0a90941aa58839f56f8df2",
"hashType": "type"
}
}
Expand Down Expand Up @@ -1649,7 +1903,7 @@
"capacity": "0x88cb4e12e",
"lock": {
"args": "0xe2fa82e70b062c8644b80ad7ecf6e015e5f352f6",
"codeHash": "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",
"codeHash": "0x1892ea40d82b53c678ff88312450bbb17e164d7a3e0a90941aa58839f56f8df2",
"hashType": "type"
}
}
Expand Down Expand Up @@ -1793,7 +2047,7 @@
{
"capacity": "0x16b969d00",
"lock": {
"codeHash": "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",
"codeHash": "0x1892ea40d82b53c678ff88312450bbb17e164d7a3e0a90941aa58839f56f8df2",
"hashType": "type",
"args": "0xe2fa82e70b062c8644b80ad7ecf6e015e5f352f6"
}
Expand Down
Loading

0 comments on commit 3439615

Please sign in to comment.