Skip to content

Commit 61ccb43

Browse files
stevenroosefjl
authored andcommitted
core/types: Document Transaction.To (bnb-chain#3366)
1 parent bf24b12 commit 61ccb43

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎core/types/transaction.go‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ func (tx *Transaction) Value() *big.Int { return new(big.Int).Set(tx.data.Amo
234234
func (tx *Transaction) Nonce() uint64 { return tx.data.AccountNonce }
235235
func (tx *Transaction) CheckNonce() bool { return true }
236236

237+
// To returns the recipient address of the transaction.
238+
// It returns nil if the transaction is a contract creation.
237239
func (tx *Transaction) To() *common.Address {
238240
if tx.data.Recipient == nil {
239241
return nil

0 commit comments

Comments
 (0)