mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 11:32:09 +00:00
new sharding tx creation
Former-commit-id: 49c7d3ec20aef302a78d0b5cca429e82e6db723a [formerly 3226861cee91b190a384b920c97d40532ca35d25] Former-commit-id: c4edba1470e8bc5d6e7cd67c1d9f9269ae6b589e
This commit is contained in:
parent
ccd6c446de
commit
cd9febd964
@ -32,9 +32,9 @@ type txdata struct {
|
||||
Payload []byte `json:"input" gencodec:"required"`
|
||||
|
||||
// Sharding specific fields
|
||||
// TODO: Figure out exact format of accesslist. array of arrays of addr + prefixes?
|
||||
AccessList []*common.Address `json:"accessList" gencodec:"required"`
|
||||
ChainID uint64 `json:"chainId" gencodec:"required"`
|
||||
ShardID uint64 `json:"shardId" gencodec:"required"`
|
||||
|
||||
// This is only used when marshaling to JSON.
|
||||
Hash *common.Hash `json:"hash" rlp:"-"`
|
||||
}
|
||||
@ -79,3 +79,14 @@ func newShardingTransaction(nonce uint64, to *common.Address, amount *big.Int, g
|
||||
|
||||
return &ShardingTransaction{data: d}
|
||||
}
|
||||
|
||||
// ChainID determines the chain the tx will go into (this is 1 on the mainnet)
|
||||
func (tx *ShardingTransaction) ChainID() *big.Int {
|
||||
return big.NewInt(1)
|
||||
}
|
||||
|
||||
// ShardID determines the shard a transaction belongs to
|
||||
func (tx *ShardingTransaction) ShardID() *big.Int {
|
||||
// TODO: figure out how to determine ShardID. 1 for now
|
||||
return big.NewInt(1)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user