Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
rianhughes committed Sep 22, 2023
1 parent f04675a commit ee2a5b9
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions examples/deployAccount/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down Expand Up @@ -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))

Expand Down

0 comments on commit ee2a5b9

Please sign in to comment.