-
Notifications
You must be signed in to change notification settings - Fork 0
/
unsigned_tx.go
37 lines (31 loc) · 875 Bytes
/
unsigned_tx.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (C) 2019-2021, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package chain
import (
"github.com/lasthyphen/dijetsnode/database"
"github.com/lasthyphen/dijetsnode/ids"
"github.com/ethereum/go-ethereum/common"
"github.com/lasthyphen/spacesvm/tdata"
)
type TransactionContext struct {
Genesis *Genesis
Database database.Database
BlockTime uint64
TxID ids.ID
Sender common.Address
}
type UnsignedTransaction interface {
Copy() UnsignedTransaction
GetBlockID() ids.ID
GetMagic() uint64
GetPrice() uint64
SetBlockID(ids.ID)
SetMagic(uint64)
SetPrice(uint64)
FeeUnits(*Genesis) uint64 // number of units to mine tx
LoadUnits(*Genesis) uint64 // units that should impact fee rate
ExecuteBase(*Genesis) error
Execute(*TransactionContext) error
TypedData() *tdata.TypedData
Activity() *Activity
}