From 66590fc5eab590cff076b1af0ad69cd53c87e55e Mon Sep 17 00:00:00 2001 From: Evgeniy Bilov Date: Thu, 16 Jan 2025 12:58:50 +0200 Subject: [PATCH 1/9] add new util --- src/utils/cspr-network.ts | 42 +++++++++++++++++++++++++++++++++++++++ src/utils/index.ts | 1 + 2 files changed, 43 insertions(+) create mode 100644 src/utils/cspr-network.ts diff --git a/src/utils/cspr-network.ts b/src/utils/cspr-network.ts new file mode 100644 index 000000000..8a91dee67 --- /dev/null +++ b/src/utils/cspr-network.ts @@ -0,0 +1,42 @@ +import {RpcClient} from "../rpc"; +import {NativeDelegateBuilder, PublicKey} from "../types"; + +export class CasperNetwork { + private apiVersion: number; + private rpcClient: RpcClient; + + constructor(apiVersion: number, rpcClient: RpcClient) { + this.apiVersion = apiVersion; + this.rpcClient = rpcClient; + } + + public DelegateTransaction(delegatorPublicKeyHex: PublicKey, + validatorPublicKeyHex: PublicKey, + networkName: string, + amountMotes: string, + deployCost: number, + ttl: number) { + const delegationBuilder = new NativeDelegateBuilder() + .validator(validatorPublicKeyHex) + .from(delegatorPublicKeyHex) + .amount(amountMotes) + .chainName(networkName) + .payment(deployCost) + .ttl(ttl) + + if(this.apiVersion === 2) { + return delegationBuilder.build(); + } + + return delegationBuilder.buildV1(); + } + + // create native transfer transaction + // create delegate transaction + // create undelegate transaction + // create redelegate transaction + // create transfer transaction + + // get transaction + // put transaction +} \ No newline at end of file diff --git a/src/utils/index.ts b/src/utils/index.ts index eb8e7604d..92f0237fc 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,4 +1,5 @@ export * from './cspr-transfer'; +export * from './cspr-network'; export * from './auction-manager'; export * from './constants'; export * from './cep-18-transfer'; From c3c392bde2a820499caf2e703f613a2d1cd7a5c6 Mon Sep 17 00:00:00 2001 From: Evgeniy Bilov Date: Fri, 17 Jan 2025 13:18:39 +0200 Subject: [PATCH 2/9] casper network util prototype --- src/utils/cspr-network.ts | 237 +++++++++++++++++++++++++++++++------- 1 file changed, 197 insertions(+), 40 deletions(-) diff --git a/src/utils/cspr-network.ts b/src/utils/cspr-network.ts index 8a91dee67..e50238234 100644 --- a/src/utils/cspr-network.ts +++ b/src/utils/cspr-network.ts @@ -1,42 +1,199 @@ -import {RpcClient} from "../rpc"; -import {NativeDelegateBuilder, PublicKey} from "../types"; +import { RpcClient } from '../rpc'; +import { + ContractCallBuilder, + NativeDelegateBuilder, + NativeRedelegateBuilder, + NativeTransferBuilder, + NativeUndelegateBuilder, + PublicKey, + Transaction, + TransactionHash +} from '../types'; +import { BigNumber } from '@ethersproject/bignumber'; export class CasperNetwork { - private apiVersion: number; - private rpcClient: RpcClient; - - constructor(apiVersion: number, rpcClient: RpcClient) { - this.apiVersion = apiVersion; - this.rpcClient = rpcClient; - } - - public DelegateTransaction(delegatorPublicKeyHex: PublicKey, - validatorPublicKeyHex: PublicKey, - networkName: string, - amountMotes: string, - deployCost: number, - ttl: number) { - const delegationBuilder = new NativeDelegateBuilder() - .validator(validatorPublicKeyHex) - .from(delegatorPublicKeyHex) - .amount(amountMotes) - .chainName(networkName) - .payment(deployCost) - .ttl(ttl) - - if(this.apiVersion === 2) { - return delegationBuilder.build(); - } - - return delegationBuilder.buildV1(); - } - - // create native transfer transaction - // create delegate transaction - // create undelegate transaction - // create redelegate transaction - // create transfer transaction - - // get transaction - // put transaction -} \ No newline at end of file + private rpcClient: RpcClient; + private apiVersion: number; + + constructor(rpcClient: RpcClient, apiVersion: number) { + this.rpcClient = rpcClient; + this.apiVersion = apiVersion; + } + + public static async create( + rpcClient: RpcClient, + apiVersion?: number + ): Promise { + if (!apiVersion) { + const status = await rpcClient.getStatus(); + + apiVersion = status.apiVersion.startsWith('2.') ? 2 : 1; + } + + return new CasperNetwork(rpcClient, apiVersion); + } + + public createDelegateTransaction( + delegatorPublicKey: PublicKey, + validatorPublicKey: PublicKey, + networkName: string, + amountMotes: string | BigNumber, + deployCost: number, + ttl: number, + contractHash?: string + ) { + if (this.apiVersion === 2) { + new NativeDelegateBuilder() + .validator(validatorPublicKey) + .from(delegatorPublicKey) + .amount(amountMotes) + .chainName(networkName) + .payment(deployCost) + .ttl(ttl) + .build(); + } + + if (contractHash) { + // need to provide contract hash + return ( + new ContractCallBuilder() + .from(delegatorPublicKey) + .byHash(contractHash) + .entryPoint('delegate') + .chainName(networkName) + // .amount(amountMotes) + .ttl(ttl) + .buildFor1_5() + ); + } + + return new Error('Need to provide contract hash'); + } + + public createUndelegateTransaction( + delegatorPublicKey: PublicKey, + validatorPublicKey: PublicKey, + networkName: string, + amountMotes: string | BigNumber, + deployCost: number, + ttl: number, + contractHash?: string + ) { + if (this.apiVersion === 2) { + new NativeUndelegateBuilder() + .validator(validatorPublicKey) + .from(delegatorPublicKey) + .amount(amountMotes) + .chainName(networkName) + .payment(deployCost) + .ttl(ttl) + .build(); + } + + if (contractHash) { + // need to provide contract hash + return ( + new ContractCallBuilder() + .from(delegatorPublicKey) + .byHash(contractHash) + .entryPoint('undelegate') + .chainName(networkName) + // .amount(amountMotes) + .ttl(ttl) + .buildFor1_5() + ); + } + + return new Error('Need to provide contract hash'); + } + + public createRedelegateTransaction( + delegatorPublicKey: PublicKey, + validatorPublicKey: PublicKey, + networkName: string, + amountMotes: string | BigNumber, + deployCost: number, + ttl: number, + contractHash?: string + ) { + if (this.apiVersion === 2) { + new NativeRedelegateBuilder() + .validator(validatorPublicKey) + .from(delegatorPublicKey) + .amount(amountMotes) + .chainName(networkName) + .payment(deployCost) + .ttl(ttl) + .build(); + } + + if (contractHash) { + // need to provide contract hash + return ( + new ContractCallBuilder() + .from(delegatorPublicKey) + .byHash(contractHash) + .entryPoint('redelegate') + .chainName(networkName) + // .amount(amountMotes) + .ttl(ttl) + .buildFor1_5() + ); + } + + return new Error('Need to provide contract hash'); + } + + public createTransferTransaction( + senderPublicKey: PublicKey, + recepientPublicKey: PublicKey, + networkName: string, + amountMotes: string, + deployCost: number, + ttl: number + ) { + const transferBuilder = new NativeTransferBuilder() + .from(senderPublicKey) + .target(recepientPublicKey) + .amount(amountMotes) + .chainName(networkName) + .payment(deployCost) + .ttl(ttl); + if (this.apiVersion === 2) { + return transferBuilder.build(); + } + + return transferBuilder.buildFor1_5(); + } + + public async putTransaction(transaction: Transaction) { + if (this.apiVersion == 2) { + return await this.rpcClient.putTransaction(transaction); + } + + const deploy = transaction.getDeploy(); + if (deploy) { + return await this.rpcClient.putDeploy(deploy); + } + + return Promise.reject('Transaction does not have a deploy'); + } + + public async getTransaction(hash: TransactionHash) { + if (this.apiVersion == 2) { + if (hash.transactionV1) { + return await this.rpcClient.getTransactionByTransactionHash( + hash.transactionV1?.toHex() + ); + } + } + + if (hash.deploy) { + return await this.rpcClient.getTransactionByDeployHash( + hash.deploy.toHex() + ); + } + + return Promise.reject('Hash is not valid'); + } +} From 91415bb34e1ba070bd84ef597acbc8b7f40e8d88 Mon Sep 17 00:00:00 2001 From: Evgeniy Bilov Date: Fri, 17 Jan 2025 19:02:39 +0200 Subject: [PATCH 3/9] update delegate/undelegate for 1.5 --- src/utils/cspr-network.ts | 53 +++++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/src/utils/cspr-network.ts b/src/utils/cspr-network.ts index e50238234..e1d4d4b47 100644 --- a/src/utils/cspr-network.ts +++ b/src/utils/cspr-network.ts @@ -1,5 +1,8 @@ import { RpcClient } from '../rpc'; import { + Args, + CLValue, + CLValueUInt512, ContractCallBuilder, NativeDelegateBuilder, NativeRedelegateBuilder, @@ -54,17 +57,20 @@ export class CasperNetwork { } if (contractHash) { - // need to provide contract hash - return ( - new ContractCallBuilder() - .from(delegatorPublicKey) - .byHash(contractHash) - .entryPoint('delegate') - .chainName(networkName) - // .amount(amountMotes) - .ttl(ttl) - .buildFor1_5() - ); + return new ContractCallBuilder() + .from(delegatorPublicKey) + .byHash(contractHash) + .entryPoint('delegate') + .chainName(networkName) + .runtimeArgs( + Args.fromMap({ + validator: CLValue.newCLPublicKey(validatorPublicKey), + delegator: CLValue.newCLPublicKey(delegatorPublicKey), + amount: CLValueUInt512.newCLUInt512(amountMotes) + }) + ) + .ttl(ttl) + .buildFor1_5(); } return new Error('Need to provide contract hash'); @@ -91,17 +97,20 @@ export class CasperNetwork { } if (contractHash) { - // need to provide contract hash - return ( - new ContractCallBuilder() - .from(delegatorPublicKey) - .byHash(contractHash) - .entryPoint('undelegate') - .chainName(networkName) - // .amount(amountMotes) - .ttl(ttl) - .buildFor1_5() - ); + return new ContractCallBuilder() + .from(delegatorPublicKey) + .byHash(contractHash) + .entryPoint('undelegate') + .chainName(networkName) + .ttl(ttl) + .runtimeArgs( + Args.fromMap({ + validator: CLValue.newCLPublicKey(validatorPublicKey), + delegator: CLValue.newCLPublicKey(delegatorPublicKey), + amount: CLValueUInt512.newCLUInt512(amountMotes) + }) + ) + .buildFor1_5(); } return new Error('Need to provide contract hash'); From f4c220472a11eb3698bb2929e044ee22dd57253b Mon Sep 17 00:00:00 2001 From: Evgeniy Bilov Date: Mon, 20 Jan 2025 17:46:46 +0200 Subject: [PATCH 4/9] update with adjustments --- src/utils/cspr-network.ts | 74 +++++++++++++++++++++++++-------------- 1 file changed, 48 insertions(+), 26 deletions(-) diff --git a/src/utils/cspr-network.ts b/src/utils/cspr-network.ts index e1d4d4b47..f53a399e8 100644 --- a/src/utils/cspr-network.ts +++ b/src/utils/cspr-network.ts @@ -43,7 +43,7 @@ export class CasperNetwork { amountMotes: string | BigNumber, deployCost: number, ttl: number, - contractHash?: string + auctionContractHash?: string ) { if (this.apiVersion === 2) { new NativeDelegateBuilder() @@ -56,10 +56,10 @@ export class CasperNetwork { .build(); } - if (contractHash) { + if (auctionContractHash) { return new ContractCallBuilder() .from(delegatorPublicKey) - .byHash(contractHash) + .byHash(auctionContractHash) .entryPoint('delegate') .chainName(networkName) .runtimeArgs( @@ -73,7 +73,9 @@ export class CasperNetwork { .buildFor1_5(); } - return new Error('Need to provide contract hash'); + return new Error( + 'Auction contract hash is required when creating a transaction on Casper Network 1.5.x' + ); } public createUndelegateTransaction( @@ -83,7 +85,7 @@ export class CasperNetwork { amountMotes: string | BigNumber, deployCost: number, ttl: number, - contractHash?: string + auctionContractHash?: string ) { if (this.apiVersion === 2) { new NativeUndelegateBuilder() @@ -96,10 +98,10 @@ export class CasperNetwork { .build(); } - if (contractHash) { + if (auctionContractHash) { return new ContractCallBuilder() .from(delegatorPublicKey) - .byHash(contractHash) + .byHash(auctionContractHash) .entryPoint('undelegate') .chainName(networkName) .ttl(ttl) @@ -113,21 +115,25 @@ export class CasperNetwork { .buildFor1_5(); } - return new Error('Need to provide contract hash'); + return new Error( + 'Auction contract hash is required when creating a transaction on Casper Network 1.5.x' + ); } public createRedelegateTransaction( delegatorPublicKey: PublicKey, validatorPublicKey: PublicKey, + newValidatorPublicKey: PublicKey, networkName: string, amountMotes: string | BigNumber, deployCost: number, ttl: number, - contractHash?: string + auctionContractHash?: string ) { if (this.apiVersion === 2) { new NativeRedelegateBuilder() .validator(validatorPublicKey) + .newValidator(newValidatorPublicKey) .from(delegatorPublicKey) .amount(amountMotes) .chainName(networkName) @@ -136,21 +142,31 @@ export class CasperNetwork { .build(); } - if (contractHash) { - // need to provide contract hash - return ( - new ContractCallBuilder() - .from(delegatorPublicKey) - .byHash(contractHash) - .entryPoint('redelegate') - .chainName(networkName) - // .amount(amountMotes) - .ttl(ttl) - .buildFor1_5() - ); + if (auctionContractHash) { + return new ContractCallBuilder() + .from(delegatorPublicKey) + .byHash(auctionContractHash) + .entryPoint('redelegate') + .chainName(networkName) + .runtimeArgs( + Args.fromMap({ + validator: CLValue.newCLPublicKey(validatorPublicKey), + delegator: CLValue.newCLPublicKey(delegatorPublicKey), + amount: CLValueUInt512.newCLUInt512(amountMotes), + ...(newValidatorPublicKey + ? { + new_validator: CLValue.newCLPublicKey(newValidatorPublicKey) + } + : {}) + }) + ) + .ttl(ttl) + .buildFor1_5(); } - return new Error('Need to provide contract hash'); + return new Error( + 'Auction contract hash is required when creating a transaction on Casper Network 1.5.x' + ); } public createTransferTransaction( @@ -185,7 +201,9 @@ export class CasperNetwork { return await this.rpcClient.putDeploy(deploy); } - return Promise.reject('Transaction does not have a deploy'); + return Promise.reject( + 'Legacy deploy transaction is required when submitting to Casper Network 1.5' + ); } public async getTransaction(hash: TransactionHash) { @@ -195,12 +213,16 @@ export class CasperNetwork { hash.transactionV1?.toHex() ); } + + if (hash.deploy) { + return await this.rpcClient.getTransactionByDeployHash( + hash.deploy.toHex() + ); + } } if (hash.deploy) { - return await this.rpcClient.getTransactionByDeployHash( - hash.deploy.toHex() - ); + return await this.rpcClient.getDeploy(hash.deploy.toHex()); } return Promise.reject('Hash is not valid'); From ccbcc991bcf3e98c90a31b21608b756ecf62529b Mon Sep 17 00:00:00 2001 From: Evgeniy Bilov Date: Mon, 20 Jan 2025 18:09:54 +0200 Subject: [PATCH 5/9] add return types --- src/utils/cspr-network.ts | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/src/utils/cspr-network.ts b/src/utils/cspr-network.ts index f53a399e8..6343c6058 100644 --- a/src/utils/cspr-network.ts +++ b/src/utils/cspr-network.ts @@ -1,4 +1,10 @@ -import { RpcClient } from '../rpc'; +import { + InfoGetDeployResult, + InfoGetTransactionResult, + PutDeployResult, + PutTransactionResult, + RpcClient +} from '../rpc'; import { Args, CLValue, @@ -44,7 +50,7 @@ export class CasperNetwork { deployCost: number, ttl: number, auctionContractHash?: string - ) { + ): Transaction { if (this.apiVersion === 2) { new NativeDelegateBuilder() .validator(validatorPublicKey) @@ -73,7 +79,7 @@ export class CasperNetwork { .buildFor1_5(); } - return new Error( + throw new Error( 'Auction contract hash is required when creating a transaction on Casper Network 1.5.x' ); } @@ -86,7 +92,7 @@ export class CasperNetwork { deployCost: number, ttl: number, auctionContractHash?: string - ) { + ): Transaction { if (this.apiVersion === 2) { new NativeUndelegateBuilder() .validator(validatorPublicKey) @@ -115,7 +121,7 @@ export class CasperNetwork { .buildFor1_5(); } - return new Error( + throw new Error( 'Auction contract hash is required when creating a transaction on Casper Network 1.5.x' ); } @@ -129,7 +135,7 @@ export class CasperNetwork { deployCost: number, ttl: number, auctionContractHash?: string - ) { + ): Transaction { if (this.apiVersion === 2) { new NativeRedelegateBuilder() .validator(validatorPublicKey) @@ -164,7 +170,7 @@ export class CasperNetwork { .buildFor1_5(); } - return new Error( + throw new Error( 'Auction contract hash is required when creating a transaction on Casper Network 1.5.x' ); } @@ -176,7 +182,7 @@ export class CasperNetwork { amountMotes: string, deployCost: number, ttl: number - ) { + ): Transaction { const transferBuilder = new NativeTransferBuilder() .from(senderPublicKey) .target(recepientPublicKey) @@ -191,7 +197,9 @@ export class CasperNetwork { return transferBuilder.buildFor1_5(); } - public async putTransaction(transaction: Transaction) { + public async putTransaction( + transaction: Transaction + ): Promise { if (this.apiVersion == 2) { return await this.rpcClient.putTransaction(transaction); } @@ -206,7 +214,9 @@ export class CasperNetwork { ); } - public async getTransaction(hash: TransactionHash) { + public async getTransaction( + hash: TransactionHash + ): Promise { if (this.apiVersion == 2) { if (hash.transactionV1) { return await this.rpcClient.getTransactionByTransactionHash( From 139370ed1af99d1a43363c28533f9c331011d098 Mon Sep 17 00:00:00 2001 From: Evgeniy Bilov Date: Tue, 21 Jan 2025 17:17:21 +0200 Subject: [PATCH 6/9] add few more wrappers --- src/utils/cspr-network.ts | 82 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 80 insertions(+), 2 deletions(-) diff --git a/src/utils/cspr-network.ts b/src/utils/cspr-network.ts index 6343c6058..4388a0ece 100644 --- a/src/utils/cspr-network.ts +++ b/src/utils/cspr-network.ts @@ -15,6 +15,7 @@ import { NativeTransferBuilder, NativeUndelegateBuilder, PublicKey, + SessionBuilder, Transaction, TransactionHash } from '../types'; @@ -197,6 +198,80 @@ export class CasperNetwork { return transferBuilder.buildFor1_5(); } + public createContractCallTransaction( + senderPublicKey: PublicKey, + contractHash: string, + entryPoint: string, + networkName: string, + deployCost: number, + ttl: number, + args: Args + ): Transaction { + const contractCall = new ContractCallBuilder() + .byHash(contractHash) + .from(senderPublicKey) + .entryPoint(entryPoint) + .chainName(networkName) + .runtimeArgs(args) + .ttl(ttl) + .payment(deployCost); + + if (this.apiVersion === 2) { + return contractCall.build(); + } + + return contractCall.buildFor1_5(); + } + + public createContractPackageTransaction( + senderPublicKey: PublicKey, + contractPackageHash: string, + entryPoint: string, + networkName: string, + deployCost: number, + args: Args, + ttl: number, + contractVersion?: number + ): Transaction { + const contractCall = new ContractCallBuilder() + .byPackageHash(contractPackageHash, contractVersion) + .from(senderPublicKey) + .entryPoint(entryPoint) + .chainName(networkName) + .runtimeArgs(args) + .ttl(ttl) + .payment(deployCost); + + if (this.apiVersion === 2) { + return contractCall.build(); + } + + return contractCall.buildFor1_5(); + } + + public createSessionWasmTransaction( + senderPublicKey: PublicKey, + networkName: string, + deployCost: number, + ttl: number, + bytes: Uint8Array, + args: Args + ): Transaction { + const sessionWasm = new SessionBuilder() + .from(senderPublicKey) + .chainName(networkName) + .payment(deployCost) + .ttl(ttl) + .wasm(bytes) + .runtimeArgs(args); + + if (this.apiVersion === 2) { + return sessionWasm.build(); + } + + return sessionWasm.buildFor1_5(); + } + public async putTransaction( transaction: Transaction ): Promise { @@ -216,7 +291,7 @@ export class CasperNetwork { public async getTransaction( hash: TransactionHash - ): Promise { + ): Promise { if (this.apiVersion == 2) { if (hash.transactionV1) { return await this.rpcClient.getTransactionByTransactionHash( @@ -232,7 +307,10 @@ export class CasperNetwork { } if (hash.deploy) { - return await this.rpcClient.getDeploy(hash.deploy.toHex()); + const getDeployResult = await this.rpcClient.getDeploy( + hash.deploy.toHex() + ); + return getDeployResult.toInfoGetTransactionResult(); } return Promise.reject('Hash is not valid'); From 2398152677370201e164b6bc4356eb831aedac9f Mon Sep 17 00:00:00 2001 From: Evgeniy Bilov Date: Tue, 21 Jan 2025 17:19:36 +0200 Subject: [PATCH 7/9] fix typos --- src/utils/cspr-network.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/utils/cspr-network.ts b/src/utils/cspr-network.ts index 4388a0ece..802a51db7 100644 --- a/src/utils/cspr-network.ts +++ b/src/utils/cspr-network.ts @@ -53,7 +53,7 @@ export class CasperNetwork { auctionContractHash?: string ): Transaction { if (this.apiVersion === 2) { - new NativeDelegateBuilder() + return new NativeDelegateBuilder() .validator(validatorPublicKey) .from(delegatorPublicKey) .amount(amountMotes) @@ -95,7 +95,7 @@ export class CasperNetwork { auctionContractHash?: string ): Transaction { if (this.apiVersion === 2) { - new NativeUndelegateBuilder() + return new NativeUndelegateBuilder() .validator(validatorPublicKey) .from(delegatorPublicKey) .amount(amountMotes) @@ -138,7 +138,7 @@ export class CasperNetwork { auctionContractHash?: string ): Transaction { if (this.apiVersion === 2) { - new NativeRedelegateBuilder() + return new NativeRedelegateBuilder() .validator(validatorPublicKey) .newValidator(newValidatorPublicKey) .from(delegatorPublicKey) @@ -178,7 +178,7 @@ export class CasperNetwork { public createTransferTransaction( senderPublicKey: PublicKey, - recepientPublicKey: PublicKey, + recipientPublicKey: PublicKey, networkName: string, amountMotes: string, deployCost: number, @@ -186,7 +186,7 @@ export class CasperNetwork { ): Transaction { const transferBuilder = new NativeTransferBuilder() .from(senderPublicKey) - .target(recepientPublicKey) + .target(recipientPublicKey) .amount(amountMotes) .chainName(networkName) .payment(deployCost) From 74d6047d9c67165f6b737142d3252fde2f8ee1a6 Mon Sep 17 00:00:00 2001 From: Evgeniy Bilov Date: Tue, 21 Jan 2025 17:41:51 +0200 Subject: [PATCH 8/9] fix build --- src/utils/cspr-network.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/utils/cspr-network.ts b/src/utils/cspr-network.ts index 802a51db7..c754838bc 100644 --- a/src/utils/cspr-network.ts +++ b/src/utils/cspr-network.ts @@ -1,5 +1,4 @@ import { - InfoGetDeployResult, InfoGetTransactionResult, PutDeployResult, PutTransactionResult, From 563af8860d0d4b67176e8b7998db807b4433449b Mon Sep 17 00:00:00 2001 From: Evgeniy Bilov Date: Wed, 22 Jan 2025 13:06:26 +0200 Subject: [PATCH 9/9] fix method name --- src/utils/cspr-network.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/cspr-network.ts b/src/utils/cspr-network.ts index c754838bc..ec95944b7 100644 --- a/src/utils/cspr-network.ts +++ b/src/utils/cspr-network.ts @@ -222,7 +222,7 @@ export class CasperNetwork { return contractCall.buildFor1_5(); } - public createContractPackageTransaction( + public createContractPackageCallTransaction( senderPublicKey: PublicKey, contractPackageHash: string, entryPoint: string,