Skip to content

Commit cb7f30c

Browse files
authored
Clear query bit in deploy account transaction (#1219)
1 parent 7372436 commit cb7f30c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

vm/transaction.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,22 @@ func marshalTxn(txn core.Transaction) (json.RawMessage, error) {
2323
return nil, err
2424
}
2525

26+
t.Version = clearQueryBit(t.Version)
2627
switch txn.(type) {
2728
case *core.InvokeTransaction:
28-
versionFelt := clearQueryBit(t.Version)
2929
// workaround until starknet_api::transaction::InvokeTranscationV0 is fixed
30-
if versionFelt.IsZero() {
30+
if t.Version.IsZero() {
3131
t.Nonce = &felt.Zero
3232
t.SenderAddress = t.ContractAddress
3333
}
3434
txnMap["Invoke"] = map[string]any{
35-
"V" + clearQueryBit(t.Version).Text(felt.Base10): t,
35+
"V" + t.Version.Text(felt.Base10): t,
3636
}
3737
case *core.DeployAccountTransaction:
3838
txnMap["DeployAccount"] = t
3939
case *core.DeclareTransaction:
4040
txnMap["Declare"] = map[string]any{
41-
"V" + clearQueryBit(t.Version).Text(felt.Base10): t,
41+
"V" + t.Version.Text(felt.Base10): t,
4242
}
4343
case *core.L1HandlerTransaction:
4444
txnMap["L1Handler"] = t

0 commit comments

Comments
 (0)