MCPcopy Create free account
hub / github.com/CPChain/chain / MarshalJSON

Method MarshalJSON

types/transaction.go:143–148  ·  view source on GitHub ↗

MarshalJSON encodes the web3 RPC transaction format.

()

Source from the content-addressed store, hash-verified

141
142// MarshalJSON encodes the web3 RPC transaction format.
143func (tx *Transaction) MarshalJSON() ([]byte, error) {
144 hash := tx.Hash()
145 data := tx.data
146 data.Hash = &hash
147 return data.MarshalJSON()
148}
149
150// UnmarshalJSON decodes the web3 RPC transaction format.
151func (tx *Transaction) UnmarshalJSON(input []byte) error {

Callers

nothing calls this directly

Calls 1

HashMethod · 0.95

Tested by

no test coverage detected