Socket
Socket
Sign inDemoInstall

@taquito/taquito

Package Overview
Dependencies
47
Maintainers
7
Versions
190
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 19.1.0-beta-RC.0 to 19.1.0

4

dist/lib/estimate/estimate.js

@@ -61,3 +61,3 @@ "use strict";

/**
* @description The limit on the amount of storage an [operation](https://tezos.gitlab.io/user/glossary.html#operations) can use.
* @description The limit on the amount of storage an [operation](https://tezos.gitlab.io/user/glossary.html#operations) can use with 20 buffer.
*/

@@ -68,3 +68,3 @@ get storageLimit() {

/**
* @description The limit on the amount of [gas](https://tezos.gitlab.io/user/glossary.html#gas) a given operation can consume.
* @description The limit on the amount of [gas](https://tezos.gitlab.io/user/glossary.html#gas) a given operation can consume with 100 buffer depends on the operation.
*/

@@ -71,0 +71,0 @@ get gasLimit() {

@@ -39,2 +39,3 @@ "use strict";

this.MILLIGAS_BUFFER = 100 * 1000; // 100 buffer depends on operation kind
this.STORAGE_BUFFER = 20; // according to octez-client
this.prepare = new prepare_provider_1.PrepareProvider(this.context);

@@ -82,3 +83,3 @@ }

: consumedMilligas,
storageLimit: accumulatedStorage || 0,
storageLimit: accumulatedStorage > 0 ? accumulatedStorage + this.STORAGE_BUFFER : 0,
opSize: size,

@@ -85,0 +86,0 @@ minimalFeePerStorageByteMutez: costPerByte.toNumber(),

@@ -81,6 +81,5 @@ "use strict";

}
getAccountLimits(pkh, constants, numberOfOps) {
getOperationLimits(constants, numberOfOps) {
return __awaiter(this, void 0, void 0, function* () {
const balance = yield this.context.readProvider.getBalance(pkh, 'head');
const { hard_gas_limit_per_operation, hard_gas_limit_per_block, hard_storage_limit_per_operation, cost_per_byte, } = constants;
const { hard_gas_limit_per_operation, hard_gas_limit_per_block, hard_storage_limit_per_operation, } = constants;
return {

@@ -91,3 +90,3 @@ fee: 0,

: hard_gas_limit_per_operation.toNumber(),
storageLimit: Math.floor(bignumber_js_1.default.min(balance.dividedBy(cost_per_byte), hard_storage_limit_per_operation).toNumber()),
storageLimit: hard_storage_limit_per_operation.toNumber(),
};

@@ -235,3 +234,3 @@ });

const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
const DEFAULT_PARAMS = yield this.getAccountLimits(pkh, protocolConstants);
const DEFAULT_PARAMS = yield this.getOperationLimits(protocolConstants);
const mergedEstimates = mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS);

@@ -271,3 +270,3 @@ const op = yield (0, contract_1.createRevealOperation)({

const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
const DEFAULT_PARAMS = yield this.getAccountLimits(pkh, protocolConstants);
const DEFAULT_PARAMS = yield this.getOperationLimits(protocolConstants);
const op = yield (0, contract_1.createOriginationOperation)(yield this.context.parser.prepareCodeOrigination(Object.assign(Object.assign({}, rest), mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS))));

@@ -303,3 +302,3 @@ const operation = yield this.addRevealOperationIfNeeded(op, pkh);

const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
const DEFAULT_PARAMS = yield this.getAccountLimits(pkh, protocolConstants);
const DEFAULT_PARAMS = yield this.getOperationLimits(protocolConstants);
const op = yield (0, contract_1.createTransferOperation)(Object.assign(Object.assign({}, rest), mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS)));

@@ -335,3 +334,3 @@ const operation = yield this.addRevealOperationIfNeeded(op, pkh);

const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
const DEFAULT_PARAMS = yield this.getAccountLimits(pkh, protocolConstants);
const DEFAULT_PARAMS = yield this.getOperationLimits(protocolConstants);
const op = yield (0, contract_1.createSetDelegateOperation)(Object.assign(Object.assign({}, rest), mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS)));

@@ -366,3 +365,3 @@ const operation = yield this.addRevealOperationIfNeeded(op, pkh);

const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
const DEFAULT_PARAMS = yield this.getAccountLimits(pkh, protocolConstants);
const DEFAULT_PARAMS = yield this.getOperationLimits(protocolConstants);
const mergedEstimates = mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS);

@@ -403,3 +402,3 @@ const op = yield (0, contract_1.createRegisterDelegateOperation)({

const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
const DEFAULT_PARAMS = yield this.getAccountLimits(pkh, protocolConstants);
const DEFAULT_PARAMS = yield this.getOperationLimits(protocolConstants);
const op = yield (0, contract_1.createRegisterGlobalConstantOperation)(Object.assign(Object.assign({}, rest), mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS)));

@@ -435,3 +434,3 @@ const operation = yield this.addRevealOperationIfNeeded(op, pkh);

const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
const DEFAULT_PARAMS = yield this.getAccountLimits(pkh, protocolConstants);
const DEFAULT_PARAMS = yield this.getOperationLimits(protocolConstants);
const op = yield (0, contract_1.createUpdateConsensusKeyOperation)(Object.assign(Object.assign({}, rest), mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS)));

@@ -467,3 +466,3 @@ const operation = yield this.addRevealOperationIfNeeded(op, pkh);

const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
const DEFAULT_PARAMS = yield this.getAccountLimits(pkh, protocolConstants);
const DEFAULT_PARAMS = yield this.getOperationLimits(protocolConstants);
const op = yield (0, contract_1.createIncreasePaidStorageOperation)(Object.assign(Object.assign({}, rest), mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS)));

@@ -591,3 +590,3 @@ const operation = yield this.addRevealOperationIfNeeded(op, pkh);

const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
const DEFAULT_PARAMS = yield this.getAccountLimits(pkh, protocolConstants);
const DEFAULT_PARAMS = yield this.getOperationLimits(protocolConstants);
const op = yield (0, contract_1.createTransferTicketOperation)(Object.assign(Object.assign({}, rest), mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS)));

@@ -623,3 +622,3 @@ const operation = yield this.addRevealOperationIfNeeded(op, pkh);

const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
const DEFAULT_PARAMS = yield this.getAccountLimits(pkh, protocolConstants);
const DEFAULT_PARAMS = yield this.getOperationLimits(protocolConstants);
const op = yield (0, contract_1.createSmartRollupAddMessagesOperation)(Object.assign(Object.assign({}, rest), mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS)));

@@ -654,3 +653,3 @@ const operation = yield this.addRevealOperationIfNeeded(op, pkh);

const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
const DEFAULT_PARAMS = yield this.getAccountLimits(pkh, protocolConstants);
const DEFAULT_PARAMS = yield this.getOperationLimits(protocolConstants);
const op = yield (0, contract_1.createSmartRollupOriginateOperation)(Object.assign(Object.assign({}, mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS)), rest));

@@ -686,3 +685,3 @@ const operation = yield this.addRevealOperationIfNeeded(op, pkh);

const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
const DEFAULT_PARAMS = yield this.getAccountLimits(pkh, protocolConstants);
const DEFAULT_PARAMS = yield this.getOperationLimits(protocolConstants);
const op = yield (0, contract_1.createSmartRollupExecuteOutboxMessageOperation)(Object.assign(Object.assign({}, rest), mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS)));

@@ -716,3 +715,3 @@ const operation = yield this.addRevealOperationIfNeeded(op, pkh);

const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
const DEFAULT_PARAMS = yield this.getAccountLimits(pkh, protocolConstants, batchParams.length);
const DEFAULT_PARAMS = yield this.getOperationLimits(protocolConstants, batchParams.length);
const revealNeeded = yield this.isRevealOpNeeded(batchParams, pkh);

@@ -788,3 +787,3 @@ const ops = [];

const protocolConstants = yield this.context.readProvider.getProtocolConstants('head');
const DEFAULT_PARAMS = yield this.getAccountLimits(pkh, protocolConstants);
const DEFAULT_PARAMS = yield this.getOperationLimits(protocolConstants);
const estimateLimits = mergeLimits({

@@ -791,0 +790,0 @@ fee: params.fee,

@@ -6,4 +6,4 @@ "use strict";

exports.VERSION = {
"commitHash": "2fa52a497370bb5f00c7be5bb4ea45e81496072c",
"version": "19.1.0-beta-RC.0"
"commitHash": "bb48f61207e1806442b0874365e98c7283ba1f68",
"version": "19.1.0"
};

@@ -62,7 +62,7 @@ export interface EstimateProperties {

/**
* @description The limit on the amount of storage an [operation](https://tezos.gitlab.io/user/glossary.html#operations) can use.
* @description The limit on the amount of storage an [operation](https://tezos.gitlab.io/user/glossary.html#operations) can use with 20 buffer.
*/
get storageLimit(): number;
/**
* @description The limit on the amount of [gas](https://tezos.gitlab.io/user/glossary.html#gas) a given operation can consume.
* @description The limit on the amount of [gas](https://tezos.gitlab.io/user/glossary.html#gas) a given operation can consume with 100 buffer depends on the operation.
*/

@@ -69,0 +69,0 @@ get gasLimit(): number;

@@ -9,2 +9,3 @@ import { DelegateParams, OriginateParams, ParamsWithKind, RegisterDelegateParams, TransferParams, RevealParams, RegisterGlobalConstantParams, TransferTicketParams, IncreasePaidStorageParams, UpdateConsensusKeyParams, SmartRollupAddMessagesParams, SmartRollupOriginateParams, SmartRollupExecuteOutboxMessageParams } from '../operations/types';

private readonly MILLIGAS_BUFFER;
private readonly STORAGE_BUFFER;
private prepare;

@@ -11,0 +12,0 @@ private getKeys;

@@ -23,3 +23,3 @@ import { PreapplyParams } from '@taquito/rpc';

private adjustGasForBatchOperation;
private getAccountLimits;
private getOperationLimits;
private getFee;

@@ -26,0 +26,0 @@ private getSource;

{
"name": "@taquito/taquito",
"version": "19.1.0-beta-RC.0",
"version": "19.1.0",
"description": "High level functionality that builds upon the other packages in the Tezos Typescript Library Suite.",

@@ -80,9 +80,9 @@ "keywords": [

"dependencies": {
"@taquito/core": "^19.1.0-beta-RC.0",
"@taquito/http-utils": "^19.1.0-beta-RC.0",
"@taquito/local-forging": "^19.1.0-beta-RC.0",
"@taquito/michel-codec": "^19.1.0-beta-RC.0",
"@taquito/michelson-encoder": "^19.1.0-beta-RC.0",
"@taquito/rpc": "^19.1.0-beta-RC.0",
"@taquito/utils": "^19.1.0-beta-RC.0",
"@taquito/core": "^19.1.0",
"@taquito/http-utils": "^19.1.0",
"@taquito/local-forging": "^19.1.0",
"@taquito/michel-codec": "^19.1.0",
"@taquito/michelson-encoder": "^19.1.0",
"@taquito/rpc": "^19.1.0",
"@taquito/utils": "^19.1.0",
"bignumber.js": "^9.1.2",

@@ -129,3 +129,3 @@ "rxjs": "^7.8.1"

},
"gitHead": "9f151ec72936d10c7ec443149e8fc23142cc7abd"
"gitHead": "6a8721a56b88c8d09ecb47eda33f70c02e81449f"
}

@@ -10,3 +10,3 @@ # Taquito high-level functions

```html
<script src="https://unpkg.com/@taquito/taquito@19.1.0-beta-RC.0/dist/taquito.min.js"
<script src="https://unpkg.com/@taquito/taquito@19.1.0/dist/taquito.min.js"
crossorigin="anonymous" integrity="sha384-IxvP0ECHi5oqLyz94wF85pU9+ktcsL1HHtA42MITxZsGbsUMEu/g+0Vkjj5vqiMR"></script>

@@ -13,0 +13,0 @@ ```

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc