diff --git a/packages/blockfrost/src/BlockfrostToOgmios.ts b/packages/blockfrost/src/BlockfrostToOgmios.ts index 5f4d806711e..7864ba45bae 100644 --- a/packages/blockfrost/src/BlockfrostToOgmios.ts +++ b/packages/blockfrost/src/BlockfrostToOgmios.ts @@ -64,6 +64,7 @@ export const BlockfrostToOgmios = { currentWalletProtocolParameters: ( blockfrost: Responses['epoch_param_content'] ): ProtocolParametersRequiredByWallet => ({ + maxTxSize: Number(blockfrost.max_tx_size), minFeeCoefficient: blockfrost.min_fee_a, minFeeConstant: blockfrost.min_fee_b, stakeKeyDeposit: Number(blockfrost.key_deposit), diff --git a/packages/blockfrost/test/blockfrostProvider.test.ts b/packages/blockfrost/test/blockfrostProvider.test.ts index 3c62063d954..e9715ee584c 100644 --- a/packages/blockfrost/test/blockfrostProvider.test.ts +++ b/packages/blockfrost/test/blockfrostProvider.test.ts @@ -295,6 +295,7 @@ describe('blockfrostProvider', () => { protocol_major_ver: 5, protocol_minor_ver: 0, min_pool_cost: '340000000', + max_tx_size: '16384', max_val_size: '1000', max_collateral_inputs: 1, coins_per_utxo_word: '0' @@ -313,6 +314,7 @@ describe('blockfrostProvider', () => { poolDeposit: 500_000_000, protocolVersion: { major: 5, minor: 0 }, minPoolCost: 340_000_000, + maxTxSize: 16_384, maxValueSize: 1000, maxCollateralInputs: 1, coinsPerUtxoWord: 0 diff --git a/packages/cardano-graphql-db-sync/src/CardanoGraphqlToOgmios.ts b/packages/cardano-graphql-db-sync/src/CardanoGraphqlToOgmios.ts index ccdc8f42127..cb71ba19eed 100644 --- a/packages/cardano-graphql-db-sync/src/CardanoGraphqlToOgmios.ts +++ b/packages/cardano-graphql-db-sync/src/CardanoGraphqlToOgmios.ts @@ -16,6 +16,7 @@ export type GraphqlCurrentWalletProtocolParameters = { maxValSize: string; keyDeposit: number; maxCollateralInputs: number; + maxTxSize: number; minFeeA: number; minFeeB: number; minPoolCost: number; @@ -46,6 +47,7 @@ export const CardanoGraphqlToOgmios = { ...params, maxValueSize: Number(params.maxValSize), stakeKeyDeposit: params.keyDeposit, + maxTxSize: params.maxTxSize, minFeeCoefficient: params.minFeeA, minFeeConstant: params.minFeeB }) diff --git a/packages/cardano-graphql-db-sync/src/cardanoGraphqlDbSyncProvider.ts b/packages/cardano-graphql-db-sync/src/cardanoGraphqlDbSyncProvider.ts index d5ee4486fc5..3d0b5248c95 100644 --- a/packages/cardano-graphql-db-sync/src/cardanoGraphqlDbSyncProvider.ts +++ b/packages/cardano-graphql-db-sync/src/cardanoGraphqlDbSyncProvider.ts @@ -133,6 +133,7 @@ export const cardanoGraphqlDbSyncProvider = (uri: string): CardanoProvider => { currentEpoch { protocolParams { coinsPerUtxoWord + maxTxSize maxValSize keyDeposit maxCollateralInputs diff --git a/packages/cardano-graphql-db-sync/test/cardanoGraphqlDbSyncProvider.test.ts b/packages/cardano-graphql-db-sync/test/cardanoGraphqlDbSyncProvider.test.ts index a750b513e3b..37e7553f8dd 100644 --- a/packages/cardano-graphql-db-sync/test/cardanoGraphqlDbSyncProvider.test.ts +++ b/packages/cardano-graphql-db-sync/test/cardanoGraphqlDbSyncProvider.test.ts @@ -180,6 +180,7 @@ describe('cardanoGraphqlDbSyncProvider', () => { currentEpoch: { protocolParams: { coinsPerUtxoWord: 34_482, + maxTxSize: 16_384, maxValSize: '5000', keyDeposit: 2_000_000, maxCollateralInputs: 3, @@ -203,6 +204,7 @@ describe('cardanoGraphqlDbSyncProvider', () => { expect(response).toMatchObject({ coinsPerUtxoWord: 34_482, + maxTxSize: 16_384, maxValueSize: 5000, stakeKeyDeposit: 2_000_000, maxCollateralInputs: 3, diff --git a/packages/core/src/Provider/CardanoProvider.ts b/packages/core/src/Provider/CardanoProvider.ts index cb6a98745e9..5b7546a40c4 100644 --- a/packages/core/src/Provider/CardanoProvider.ts +++ b/packages/core/src/Provider/CardanoProvider.ts @@ -6,6 +6,7 @@ import { Tx } from '../Transaction'; export type ProtocolParametersRequiredByWallet = Pick< ProtocolParametersAlonzo, | 'coinsPerUtxoWord' + | 'maxTxSize' | 'maxValueSize' | 'stakeKeyDeposit' | 'maxCollateralInputs'