Class: Ciri::Types::Account
Constant Summary
RLP::Serializable::TYPES
Instance Attribute Summary
#serializable_attributes
Class Method Summary
collapse
Instance Method Summary
collapse
#==, included, #initialize, #initialize_copy, #rlp_encode
Class Method Details
.new_empty ⇒ Object
47
48
49
|
# File 'lib/ciri/types/account.rb', line 47
def new_empty
Account.new(balance: 0, nonce: 0)
end
|
Instance Method Details
#empty? ⇒ Boolean
38
39
40
|
# File 'lib/ciri/types/account.rb', line 38
def empty?
!has_code? && nonce == 0 && balance == 0
end
|
#has_code? ⇒ Boolean
42
43
44
|
# File 'lib/ciri/types/account.rb', line 42
def has_code?
code_hash != Utils::BLANK_SHA3
end
|