From ee2a5b9bc3e02e63b6e59b2b6b272dad3d7d0245 Mon Sep 17 00:00:00 2001 From: rianhughes Date: Fri, 22 Sep 2023 11:16:33 +0300 Subject: [PATCH] address comment --- examples/deployAccount/main.go | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/examples/deployAccount/main.go b/examples/deployAccount/main.go index 0cf107ef..a9e6d98c 100644 --- a/examples/deployAccount/main.go +++ b/examples/deployAccount/main.go @@ -36,14 +36,12 @@ func main() { panic(err) } - tx := rpc.BroadcastedDeployAccountTransaction{ - BroadcastedTxnCommonProperties: rpc.BroadcastedTxnCommonProperties{ - Nonce: &felt.Zero, // Contract accounts start with nonce zero. - MaxFee: new(felt.Felt).SetUint64(4724395326064), - Type: rpc.TransactionType_DeployAccount, - Version: rpc.TransactionV1, - Signature: []*felt.Felt{}, - }, + tx := rpc.DeployAccountTxn{ + Nonce: &felt.Zero, // Contract accounts start with nonce zero. + MaxFee: new(felt.Felt).SetUint64(4724395326064), + Type: rpc.TransactionType_DeployAccount, + Version: rpc.TransactionV1, + Signature: []*felt.Felt{}, ClassHash: classHash, ContractAddressSalt: pub, ConstructorCalldata: []*felt.Felt{pub}, @@ -151,7 +149,7 @@ func computeHashOnElementsFelt(feltArr []*felt.Felt) (*felt.Felt, error) { } // calculateDeployAccountTransactionHash computes the transaction hash for deployAccount transactions -func calculateDeployAccountTransactionHash(tx rpc.BroadcastedDeployAccountTransaction, contractAddress *felt.Felt, chainID string) (*felt.Felt, error) { +func calculateDeployAccountTransactionHash(tx rpc.DeployAccountTxn, contractAddress *felt.Felt, chainID string) (*felt.Felt, error) { Prefix_DEPLOY_ACCOUNT := new(felt.Felt).SetBytes([]byte("deploy_account")) chainIdFelt := new(felt.Felt).SetBytes([]byte(chainID))