Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
55d72a8
In to_long(), validate return of Long.fromString()
abitmore Sep 3, 2022
7c05014
Bump cached-path-relative from 1.0.2 to 1.1.0
dependabot[bot] Sep 17, 2023
c255472
Bump @babel/traverse from 7.16.7 to 7.23.2
dependabot[bot] Oct 17, 2023
b91d5d5
Merge pull request #119 from bitshares/dependabot/npm_and_yarn/babel/…
abitmore Oct 17, 2023
4960537
Merge pull request #118 from bitshares/dependabot/npm_and_yarn/cached…
abitmore Oct 17, 2023
0902523
Bump crypto-js from 4.1.1 to 4.2.0
dependabot[bot] Oct 25, 2023
a1aff06
Merge pull request #121 from bitshares/dependabot/npm_and_yarn/crypto…
abitmore Oct 26, 2023
c47494f
Bump browserify-sign from 4.2.1 to 4.2.2
dependabot[bot] Oct 27, 2023
a4e92f1
Merge pull request #122 from bitshares/dependabot/npm_and_yarn/browse…
abitmore Oct 28, 2023
324565f
Update operations.js
grctest Nov 14, 2023
2b26fbb
Merge pull request #100 from bitshares/fix-to-long
sschiessl-bcp Nov 21, 2023
3280588
Merge pull request #125 from BTS-CM/suez
sschiessl-bcp Nov 21, 2023
81dc28e
Add missing extensions field in create_take_profit_order_action
abitmore Nov 24, 2023
e315579
Merge pull request #126 from bitshares/fix-oso-serialization
abitmore Nov 24, 2023
3d2d647
Update ChainTypes.js
grctest Dec 4, 2023
68d6909
Merge pull request #127 from BTS-CM/suez_fix
abitmore Dec 4, 2023
40a860b
Fix limit_order_update_operation serialization
abitmore Dec 6, 2023
9640cea
Merge pull request #128 from bitshares/fix-limit-order-update
abitmore Dec 6, 2023
c6f3eb7
Bump es5-ext from 0.10.53 to 0.10.63
dependabot[bot] Feb 27, 2024
7ae9426
Merge pull request #129 from bitshares/dependabot/npm_and_yarn/es5-ex…
abitmore Feb 27, 2024
81abdd7
Bump @babel/traverse from 7.16.7 to 7.24.1
dependabot[bot] Apr 5, 2024
fdbc36b
Merg dependabot/npm_and_yarn/babel/traverse-7.24.1
abitmore Apr 5, 2024
cc52c57
Merge pull request #131 from bitshares/bump-babel-traverse
abitmore Apr 5, 2024
7e07584
Bump braces from 3.0.2 to 3.0.3
dependabot[bot] Jun 18, 2024
9bcab29
Merge pull request #133 from bitshares/dependabot/npm_and_yarn/braces…
abitmore Jun 18, 2024
ad22f52
Bump ws from 8.4.0 to 8.17.1
dependabot[bot] Jun 18, 2024
74c1ca2
Merge pull request #134 from bitshares/dependabot/npm_and_yarn/ws-8.17.1
abitmore Jun 18, 2024
c0809c9
Bump webpack from 5.88.2 to 5.94.0
dependabot[bot] Aug 30, 2024
1a27da6
Merge pull request #135 from bitshares/dependabot/npm_and_yarn/webpac…
abitmore Aug 31, 2024
8b20851
Bump elliptic from 6.5.4 to 6.5.7
dependabot[bot] Aug 31, 2024
94f9887
Merge pull request #136 from bitshares/dependabot/npm_and_yarn/ellipt…
abitmore Aug 31, 2024
4f41a73
Update TransactionBuilder.js
grctest Oct 13, 2024
4d2f75e
Bump elliptic from 6.5.7 to 6.6.0
dependabot[bot] Oct 31, 2024
7739950
Merge pull request #139 from bitshares/dependabot/npm_and_yarn/ellipt…
abitmore Oct 31, 2024
a334b25
Update TransactionBuilder.js
grctest Nov 4, 2024
b5c0aab
Bump cross-spawn from 7.0.3 to 7.0.6
dependabot[bot] Nov 19, 2024
19073d6
Merge pull request #140 from bitshares/dependabot/npm_and_yarn/cross-…
abitmore Nov 19, 2024
14dd4cc
Bump elliptic from 6.6.0 to 6.6.1
dependabot[bot] Feb 15, 2025
b0d5c64
Merge pull request #141 from bitshares/dependabot/npm_and_yarn/ellipt…
abitmore Feb 15, 2025
f9ce28b
Bump base-x from 3.0.9 to 3.0.11
dependabot[bot] Apr 30, 2025
c855615
Merge pull request #142 from bitshares/dependabot/npm_and_yarn/base-x…
abitmore Apr 30, 2025
3a97993
Merge pull request #138 from grctest/develop
abitmore May 26, 2025
83b4179
Bump pbkdf2 from 3.1.2 to 3.1.3
dependabot[bot] Jun 24, 2025
1e1f21f
Merge pull request #143 from bitshares/dependabot/npm_and_yarn/pbkdf2…
abitmore Jun 25, 2025
c69a464
Bump sha.js from 2.4.11 to 2.4.12
dependabot[bot] Aug 21, 2025
b224bc5
Bump cipher-base from 1.0.4 to 1.0.6
dependabot[bot] Aug 21, 2025
77b470b
Merge pull request #144 from bitshares/dependabot/npm_and_yarn/sha.js…
abitmore Aug 22, 2025
17d92a3
Merge pull request #145 from bitshares/dependabot/npm_and_yarn/cipher…
abitmore Aug 22, 2025
0c09ae1
Bump lodash from 4.17.21 to 4.17.23
dependabot[bot] Jan 21, 2026
dc5de9a
Merge pull request #147 from bitshares/dependabot/npm_and_yarn/lodash…
abitmore Jan 22, 2026
5204338
Bump webpack from 5.94.0 to 5.104.1
dependabot[bot] Feb 7, 2026
f396ebf
Merge pull request #148 from bitshares/dependabot/npm_and_yarn/webpac…
abitmore Feb 8, 2026
dc9ba5e
Bump immutable from 4.0.0 to 4.3.8
dependabot[bot] Mar 5, 2026
fd032e9
Merge pull request #149 from bitshares/dependabot/npm_and_yarn/immuta…
abitmore Mar 5, 2026
053fd75
Bump picomatch from 2.3.1 to 2.3.2
dependabot[bot] Mar 25, 2026
c8536a4
Merge pull request #150 from bitshares/dependabot/npm_and_yarn/picoma…
abitmore Mar 26, 2026
4dae05d
Bump lodash from 4.17.23 to 4.18.1
dependabot[bot] Apr 10, 2026
b61c8a8
Merge pull request #151 from bitshares/dependabot/npm_and_yarn/lodash…
abitmore Apr 13, 2026
7e7a8e9
Bump fast-uri from 3.1.0 to 3.1.2
dependabot[bot] May 8, 2026
e9e7e7b
Bump @babel/plugin-transform-modules-systemjs from 7.16.7 to 7.29.4
dependabot[bot] May 9, 2026
90674e4
Merge pull request #152 from bitshares/dependabot/npm_and_yarn/fast-u…
abitmore May 10, 2026
d62f382
Merge pull request #153 from bitshares/dependabot/npm_and_yarn/babel/…
abitmore May 10, 2026
c45ffd5
Bump ws from 8.17.1 to 8.21.0
dependabot[bot] May 28, 2026
4c74cfd
Merge pull request #154 from bitshares/dependabot/npm_and_yarn/ws-8.21.0
abitmore May 29, 2026
5a78454
Bump shell-quote from 1.7.3 to 1.8.4
dependabot[bot] Jun 10, 2026
d0f5ecc
Merge pull request #155 from bitshares/dependabot/npm_and_yarn/shell-…
abitmore Jun 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/chain/src/ChainTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,10 @@ ChainTypes.operations = {
credit_offer_update: 71,
credit_offer_accept: 72,
credit_deal_repay: 73,
credit_deal_expired: 74 // VIRTUAL
credit_deal_expired: 74, // VIRTUAL
liquidity_pool_update: 75,
credit_deal_update: 76,
limit_order_update: 77
};

ChainTypes.ticket_type = {
Expand Down
13 changes: 5 additions & 8 deletions lib/chain/src/TransactionBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,14 +422,11 @@ class TransactionBuilder {
if (isProposal(op)) {
op[1].proposed_ops.forEach(proposal => {
proposed_ops.push(proposal);
if (
proposalFeeAssets.indexOf(
proposal.op[1].fee.asset_id
) === -1
)
proposalFeeAssets.push(
"1.3." + proposal.op[1].fee.asset_id
);
const _feeID = proposal.op[1].fee.asset_id;
if (proposalFeeAssets.indexOf(_feeID) === -1) {
const formattedFeeID = _feeID.includes("1.3.") ? _feeID : `1.3.${_feeID}`;
proposalFeeAssets.push(formattedFeeID);
}
});
}
if (!isDuplicate) {
Expand Down
12 changes: 11 additions & 1 deletion lib/serializer/src/SerializerValidation.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,20 @@ var _my = {
}

this.no_overflow64(value, field_name, unsigned);
// BigInteger#isBigInteger https://github.com/cryptocoinjs/bigi/issues/20
// (code copied from no_overflow64)
if (value.t !== undefined && value.s !== undefined) {
value = value.toString();
}
if (typeof value === "number") {
value = "" + value;
}
return Long.fromString(value, unsigned);
value = value.trim();
var long_value = Long.fromString(value, unsigned);
if (long_value.toString() !== value) {
throw new Error(`Unable to safely convert ${field_name} ${value} to long`);
}
return long_value;
},

to_string(value, field_name = "") {
Expand Down
78 changes: 75 additions & 3 deletions lib/serializer/src/operations.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,25 @@ export const credit_deal_expired_operation_fee_parameters = new Serializer(
{}
);

export const liquidity_pool_update_operation_fee_parameters = new Serializer(
"liquidity_pool_update_operation_fee_parameters",
{
fee: uint64,
}
);

export const credit_deal_update_operation_fee_parameters = new Serializer(
"credit_deal_update_operation_fee_parameters",
{
fee: uint64,
}
);

export const limit_order_update_operation_fee_parameters = new Serializer(
"limit_order_update_operation_fee_parameters",
{ fee: uint64 }
);


var fee_parameters = static_variant([
transfer_operation_fee_parameters,
Expand Down Expand Up @@ -548,7 +567,10 @@ var fee_parameters = static_variant([
credit_offer_update_operation_fee_parameters,
credit_offer_accept_operation_fee_parameters,
credit_deal_repay_operation_fee_parameters,
credit_deal_expired_operation_fee_parameters
credit_deal_expired_operation_fee_parameters,
liquidity_pool_update_operation_fee_parameters,
credit_deal_update_operation_fee_parameters,
limit_order_update_operation_fee_parameters,
]);

export const fee_schedule = new Serializer("fee_schedule", {
Expand Down Expand Up @@ -618,14 +640,30 @@ export const transfer = new Serializer("transfer", {
extensions: set(future_extensions)
});

export const create_take_profit_order_action = new Serializer("create_take_profit_order_action", {
fee_asset_id: protocol_id_type("asset"),
spread_percent: uint16,
size_percent: uint16,
expiration_seconds: uint32,
repeat: bool,
extensions: set(future_extensions)
});

var limit_order_auto_action = static_variant([create_take_profit_order_action]);

export const limit_order_create = new Serializer("limit_order_create", {
fee: asset,
seller: protocol_id_type("account"),
amount_to_sell: asset,
min_to_receive: asset,
expiration: time_point_sec,
fill_or_kill: bool,
extensions: set(future_extensions)
extensions: extension([
{
name: "on_fill",
type: array(limit_order_auto_action),
},
]),
});

export const limit_order_cancel = new Serializer("limit_order_cancel", {
Expand Down Expand Up @@ -1553,6 +1591,37 @@ export const credit_deal_expired = new Serializer("credit_deal_expired", {
fee_rate: uint32
});

// Op 75: liquidity_pool_update_operation
export const liquidity_pool_update = new Serializer("liquidity_pool_update", {
fee: asset,
account: protocol_id_type("account"),
pool: protocol_id_type("liquidity_pool"),
taker_fee_percent: optional(uint16),
withdrawal_fee_percent: optional(uint16),
extensions: set(future_extensions),
});

// Op 76: credit_deal_update_operation
export const credit_deal_update = new Serializer("credit_deal_update", {
fee: asset,
account: protocol_id_type("account"),
deal_id: protocol_id_type("credit_deal"),
auto_repay: uint8,
extensions: set(future_extensions),
});

// Op 77: limit_order_update_operation
export const limit_order_update = new Serializer("limit_order_update", {
fee: asset,
seller: protocol_id_type("account"),
order: protocol_id_type("limit_order"),
new_price: optional(price),
delta_amount_to_sell: optional(asset),
new_expiration: optional(time_point_sec),
on_fill: optional(array(limit_order_auto_action)),
extensions: set(future_extensions)
});

operation.st_operations = [
transfer,
limit_order_create,
Expand Down Expand Up @@ -1628,7 +1697,10 @@ operation.st_operations = [
credit_offer_update,
credit_offer_accept,
credit_deal_repay,
credit_deal_expired
credit_deal_expired,
liquidity_pool_update,
credit_deal_update,
limit_order_update,
];

export const transaction = new Serializer("transaction", {
Expand Down
Loading
Loading