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

Method MarshalJSON

types/legacy_types.go:273–278  ·  view source on GitHub ↗

MarshalJSON encodes the web3 RPC transaction format.

()

Source from the content-addressed store, hash-verified

271
272// MarshalJSON encodes the web3 RPC transaction format.
273func (tx *TransactionOld) MarshalJSON() ([]byte, error) {
274 hash := tx.Hash()
275 data := tx.data
276 data.Hash = &hash
277 return data.MarshalJSON()
278}
279
280// UnmarshalJSON decodes the web3 RPC transaction format.
281func (tx *TransactionOld) UnmarshalJSON(input []byte) error {

Callers

nothing calls this directly

Calls 1

HashMethod · 0.95

Tested by

no test coverage detected