Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make it clear that MaxFee field is not used anymore for V3 tx + improve comments for Transactions #2130

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions core/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,15 @@ func (d *DeployTransaction) Signature() []*felt.Felt {

type DeployAccountTransaction struct {
DeployTransaction
// The maximum fee that the sender is willing to pay for the transaction.
MaxFee *felt.Felt
// Additional information given by the sender, used to validate the transaction.
TransactionSignature []*felt.Felt
// The transaction nonce.
Nonce *felt.Felt

// Version 0 fields
// The maximum fee that the sender is willing to pay for the transaction.
MaxFee *felt.Felt

// Version 3 fields
// See InvokeTransaction for descriptions of the fields.
ResourceBounds map[Resource]ResourceBounds
Expand All @@ -254,11 +256,6 @@ type InvokeTransaction struct {
CallData []*felt.Felt
// Additional information given by the sender, used to validate the transaction.
TransactionSignature []*felt.Felt
// The maximum fee that the sender is willing to pay for the transaction
// Available in version 1 only
MaxFee *felt.Felt
// The address of the contract invoked by this transaction.
ContractAddress *felt.Felt
// When the fields that comprise a transaction change,
// either with the addition of a new field or the removal of an existing field,
// then the transaction version increases.
Expand All @@ -267,14 +264,20 @@ type InvokeTransaction struct {
// Version 0 fields
// The encoding of the selector for the function invoked (the entry point in the contract)
EntryPointSelector *felt.Felt
// The address of the contract invoked by this transaction.
ContractAddress *felt.Felt

// Version 1 fields
// Versions 0 and 1 fields
// The maximum fee that the sender is willing to pay for the transaction
MaxFee *felt.Felt

// Version 1 and 3 fields
// The transaction nonce.
Nonce *felt.Felt
// The address of the sender of this transaction
SenderAddress *felt.Felt

// Version 3 fields (there was no version 2)
// Version 3 fields
ResourceBounds map[Resource]ResourceBounds
Tip uint64
// From the RPC spec: data needed to allow the paymaster to pay for the transaction in native tokens
Expand Down Expand Up @@ -305,9 +308,6 @@ type DeclareTransaction struct {
ClassHash *felt.Felt
// The address of the account initiating the transaction.
SenderAddress *felt.Felt
// The maximum fee that the sender is willing to pay for the transaction.
// Available in versions 1, 2
MaxFee *felt.Felt
// Additional information given by the sender, used to validate the transaction.
TransactionSignature []*felt.Felt
// The transaction nonce.
Expand All @@ -319,7 +319,11 @@ type DeclareTransaction struct {
// Transaction version 0 is deprecated and will be removed in a future version of Starknet.
Version *TransactionVersion

// Version 2 fields
// Versions 0 (deprecated and unsupported), 1 and 2 fields
// The maximum fee that the sender is willing to pay for the transaction.
MaxFee *felt.Felt

// Versions 2 and 3 fields
CompiledClassHash *felt.Felt

// Version 3 fields
Expand Down
Loading