Documentation ¶
Index ¶
- Constants
- Variables
- func CheckContractVersions(approval []byte, clear []byte, previous basics.AppParams) error
- func ProgramVersion(bytecode []byte) (version uint64, length int, err error)
- type AddressPrintTxnFields
- func (_ *AddressPrintTxnFields) CanMarshalMsg(z interface{}) bool
- func (_ *AddressPrintTxnFields) CanUnmarshalMsg(z interface{}) bool
- func (z *AddressPrintTxnFields) MarshalMsg(b []byte) (o []byte)
- func (z *AddressPrintTxnFields) MsgIsZero() bool
- func (z *AddressPrintTxnFields) Msgsize() (s int)
- func (z *AddressPrintTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error)
- type ApplicationCallTxnFields
- func (ac *ApplicationCallTxnFields) AddressByIndex(accountIdx uint64, sender basics.Address) (basics.Address, error)
- func (ac *ApplicationCallTxnFields) AppIDByIndex(i uint64) (basics.AppIndex, error)
- func (_ *ApplicationCallTxnFields) CanMarshalMsg(z interface{}) bool
- func (_ *ApplicationCallTxnFields) CanUnmarshalMsg(z interface{}) bool
- func (ac *ApplicationCallTxnFields) Empty() bool
- func (ac *ApplicationCallTxnFields) IndexByAddress(target basics.Address, sender basics.Address) (uint64, error)
- func (ac *ApplicationCallTxnFields) IndexByAppID(appID basics.AppIndex) (uint64, error)
- func (z *ApplicationCallTxnFields) MarshalMsg(b []byte) (o []byte)
- func (z *ApplicationCallTxnFields) MsgIsZero() bool
- func (z *ApplicationCallTxnFields) Msgsize() (s int)
- func (z *ApplicationCallTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error)
- type ApplyData
- func (_ *ApplyData) CanMarshalMsg(z interface{}) bool
- func (_ *ApplyData) CanUnmarshalMsg(z interface{}) bool
- func (ad ApplyData) Equal(o ApplyData) bool
- func (z *ApplyData) MarshalMsg(b []byte) (o []byte)
- func (z *ApplyData) MsgIsZero() bool
- func (z *ApplyData) Msgsize() (s int)
- func (z *ApplyData) UnmarshalMsg(bts []byte) (o []byte, err error)
- type AssetConfigTxnFields
- func (_ *AssetConfigTxnFields) CanMarshalMsg(z interface{}) bool
- func (_ *AssetConfigTxnFields) CanUnmarshalMsg(z interface{}) bool
- func (z *AssetConfigTxnFields) MarshalMsg(b []byte) (o []byte)
- func (z *AssetConfigTxnFields) MsgIsZero() bool
- func (z *AssetConfigTxnFields) Msgsize() (s int)
- func (z *AssetConfigTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error)
- type AssetFreezeTxnFields
- func (_ *AssetFreezeTxnFields) CanMarshalMsg(z interface{}) bool
- func (_ *AssetFreezeTxnFields) CanUnmarshalMsg(z interface{}) bool
- func (z *AssetFreezeTxnFields) MarshalMsg(b []byte) (o []byte)
- func (z *AssetFreezeTxnFields) MsgIsZero() bool
- func (z *AssetFreezeTxnFields) Msgsize() (s int)
- func (z *AssetFreezeTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error)
- type AssetTransferTxnFields
- func (_ *AssetTransferTxnFields) CanMarshalMsg(z interface{}) bool
- func (_ *AssetTransferTxnFields) CanUnmarshalMsg(z interface{}) bool
- func (z *AssetTransferTxnFields) MarshalMsg(b []byte) (o []byte)
- func (z *AssetTransferTxnFields) MsgIsZero() bool
- func (z *AssetTransferTxnFields) Msgsize() (s int)
- func (z *AssetTransferTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error)
- type CompactCertTxnFields
- func (_ *CompactCertTxnFields) CanMarshalMsg(z interface{}) bool
- func (_ *CompactCertTxnFields) CanUnmarshalMsg(z interface{}) bool
- func (cc CompactCertTxnFields) Empty() bool
- func (z *CompactCertTxnFields) MarshalMsg(b []byte) (o []byte)
- func (z *CompactCertTxnFields) MsgIsZero() bool
- func (z *CompactCertTxnFields) Msgsize() (s int)
- func (z *CompactCertTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error)
- type EvalDelta
- func (_ *EvalDelta) CanMarshalMsg(z interface{}) bool
- func (_ *EvalDelta) CanUnmarshalMsg(z interface{}) bool
- func (ed EvalDelta) Equal(o EvalDelta) bool
- func (z *EvalDelta) MarshalMsg(b []byte) (o []byte)
- func (z *EvalDelta) MsgIsZero() bool
- func (z *EvalDelta) Msgsize() (s int)
- func (z *EvalDelta) UnmarshalMsg(bts []byte) (o []byte, err error)
- type ExplicitTxnContext
- type Header
- func (tx Header) Alive(tc TxnContext) error
- func (tx Header) Aux() []byte
- func (_ *Header) CanMarshalMsg(z interface{}) bool
- func (_ *Header) CanUnmarshalMsg(z interface{}) bool
- func (tx Header) First() basics.Round
- func (tx Header) Last() basics.Round
- func (z *Header) MarshalMsg(b []byte) (o []byte)
- func (z *Header) MsgIsZero() bool
- func (z *Header) Msgsize() (s int)
- func (tx Header) Src() basics.Address
- func (tx Header) TxFee() basics.MicroNovas
- func (z *Header) UnmarshalMsg(bts []byte) (o []byte, err error)
- type KeyregTxnFields
- func (_ *KeyregTxnFields) CanMarshalMsg(z interface{}) bool
- func (_ *KeyregTxnFields) CanUnmarshalMsg(z interface{}) bool
- func (z *KeyregTxnFields) MarshalMsg(b []byte) (o []byte)
- func (z *KeyregTxnFields) MsgIsZero() bool
- func (z *KeyregTxnFields) Msgsize() (s int)
- func (z *KeyregTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error)
- type LogicSig
- func (lsig *LogicSig) Blank() bool
- func (_ *LogicSig) CanMarshalMsg(z interface{}) bool
- func (_ *LogicSig) CanUnmarshalMsg(z interface{}) bool
- func (lsig *LogicSig) Equal(b *LogicSig) bool
- func (lsig *LogicSig) Len() int
- func (z *LogicSig) MarshalMsg(b []byte) (o []byte)
- func (z *LogicSig) MsgIsZero() bool
- func (z *LogicSig) Msgsize() (s int)
- func (z *LogicSig) UnmarshalMsg(bts []byte) (o []byte, err error)
- type MinFeeError
- func (_ MinFeeError) CanMarshalMsg(z interface{}) bool
- func (_ *MinFeeError) CanUnmarshalMsg(z interface{}) bool
- func (err MinFeeError) Error() string
- func (z MinFeeError) MarshalMsg(b []byte) (o []byte)
- func (z MinFeeError) MsgIsZero() bool
- func (z MinFeeError) Msgsize() (s int)
- func (z *MinFeeError) UnmarshalMsg(bts []byte) (o []byte, err error)
- type OnCompletion
- func (_ OnCompletion) CanMarshalMsg(z interface{}) bool
- func (_ *OnCompletion) CanUnmarshalMsg(z interface{}) bool
- func (z OnCompletion) MarshalMsg(b []byte) (o []byte)
- func (z OnCompletion) MsgIsZero() bool
- func (z OnCompletion) Msgsize() (s int)
- func (i OnCompletion) String() string
- func (z *OnCompletion) UnmarshalMsg(bts []byte) (o []byte, err error)
- type PaymentTxnFields
- func (_ *PaymentTxnFields) CanMarshalMsg(z interface{}) bool
- func (_ *PaymentTxnFields) CanUnmarshalMsg(z interface{}) bool
- func (z *PaymentTxnFields) MarshalMsg(b []byte) (o []byte)
- func (z *PaymentTxnFields) MsgIsZero() bool
- func (z *PaymentTxnFields) Msgsize() (s int)
- func (z *PaymentTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error)
- type Payset
- func (_ Payset) CanMarshalMsg(z interface{}) bool
- func (_ *Payset) CanUnmarshalMsg(z interface{}) bool
- func (payset Payset) CommitFlat() crypto.Digest
- func (payset Payset) CommitGenesis() crypto.Digest
- func (z Payset) MarshalMsg(b []byte) (o []byte)
- func (z Payset) MsgIsZero() bool
- func (z Payset) Msgsize() (s int)
- func (payset Payset) ToBeHashed() (protocol.HashID, []byte)
- func (z *Payset) UnmarshalMsg(bts []byte) (o []byte, err error)
- type SignedTxn
- func (s SignedTxn) Authorizer() basics.Address
- func (_ *SignedTxn) CanMarshalMsg(z interface{}) bool
- func (_ *SignedTxn) CanUnmarshalMsg(z interface{}) bool
- func (s SignedTxn) GetEncodedLength() int
- func (s SignedTxn) ID() Txid
- func (z *SignedTxn) MarshalMsg(b []byte) (o []byte)
- func (stxn *SignedTxn) MessUpSigForTesting()
- func (z *SignedTxn) MsgIsZero() bool
- func (z *SignedTxn) Msgsize() (s int)
- func (z *SignedTxn) UnmarshalMsg(bts []byte) (o []byte, err error)
- type SignedTxnInBlock
- func (_ *SignedTxnInBlock) CanMarshalMsg(z interface{}) bool
- func (_ *SignedTxnInBlock) CanUnmarshalMsg(z interface{}) bool
- func (s SignedTxnInBlock) GetEncodedLength() int
- func (s *SignedTxnInBlock) Hash() crypto.Digest
- func (s SignedTxnInBlock) ID()
- func (z *SignedTxnInBlock) MarshalMsg(b []byte) (o []byte)
- func (z *SignedTxnInBlock) MsgIsZero() bool
- func (z *SignedTxnInBlock) Msgsize() (s int)
- func (s *SignedTxnInBlock) ToBeHashed() (protocol.HashID, []byte)
- func (z *SignedTxnInBlock) UnmarshalMsg(bts []byte) (o []byte, err error)
- type SignedTxnWithAD
- func (_ *SignedTxnWithAD) CanMarshalMsg(z interface{}) bool
- func (_ *SignedTxnWithAD) CanUnmarshalMsg(z interface{}) bool
- func (z *SignedTxnWithAD) MarshalMsg(b []byte) (o []byte)
- func (z *SignedTxnWithAD) MsgIsZero() bool
- func (z *SignedTxnWithAD) Msgsize() (s int)
- func (z *SignedTxnWithAD) UnmarshalMsg(bts []byte) (o []byte, err error)
- type SortString
- type SortUint64
- type SpecialAddresses
- type Transaction
- func (_ *Transaction) CanMarshalMsg(z interface{}) bool
- func (_ *Transaction) CanUnmarshalMsg(z interface{}) bool
- func (tx Transaction) EstimateEncodedSize() int
- func (tx Transaction) GetReceiverAddress() basics.Address
- func (tx Transaction) ID() Txid
- func (tx Transaction) InnerID(parent Txid, index int) Txid
- func (z *Transaction) MarshalMsg(b []byte) (o []byte)
- func (tx Transaction) MatchAddress(addr basics.Address, spec SpecialAddresses) bool
- func (z *Transaction) MsgIsZero() bool
- func (z *Transaction) Msgsize() (s int)
- func (tx Transaction) RelevantAddrs(spec SpecialAddresses) []basics.Address
- func (tx Transaction) Sign(secrets *crypto.SignatureSecrets) SignedTxn
- func (tx Transaction) ToBeHashed() (protocol.HashID, []byte)
- func (tx Transaction) TxAmount() basics.MicroNovas
- func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error)
- func (tx Transaction) WellFormed(spec SpecialAddresses, proto config.ConsensusParams) error
- type TxGroup
- func (_ *TxGroup) CanMarshalMsg(z interface{}) bool
- func (_ *TxGroup) CanUnmarshalMsg(z interface{}) bool
- func (z *TxGroup) MarshalMsg(b []byte) (o []byte)
- func (z *TxGroup) MsgIsZero() bool
- func (z *TxGroup) Msgsize() (s int)
- func (tg TxGroup) ToBeHashed() (protocol.HashID, []byte)
- func (z *TxGroup) UnmarshalMsg(bts []byte) (o []byte, err error)
- type Txid
- func (_ *Txid) CanMarshalMsg(z interface{}) bool
- func (_ *Txid) CanUnmarshalMsg(z interface{}) bool
- func (z *Txid) MarshalMsg(b []byte) []byte
- func (z *Txid) MsgIsZero() bool
- func (z *Txid) Msgsize() int
- func (txid Txid) String() string
- func (z *Txid) UnmarshalMsg(bts []byte) ([]byte, error)
- func (txid *Txid) UnmarshalText(text []byte) error
- type TxnContext
- type TxnDeadError
Constants ¶
const EvalMaxArgs = 255
EvalMaxArgs is the maximum number of arguments to an LSig
const ExtraProgramChecksVersion = 6
ExtraProgramChecksVersion is version of AVM programs that are subject to extra test - approval and clear must match versions, and they may not be downgraded
Variables ¶
var CompactCertSender basics.Address
CompactCertSender is the computed address for sending out compact certs.
Functions ¶
func CheckContractVersions ¶
CheckContractVersions ensures that for v6 and higher two programs are version matched, and that they are not a downgrade.
Types ¶
type AddressPrintTxnFields ¶
type AddressPrintTxnFields struct { // 아 이 Receiver는 이미 PaymentTxnFields에서 구현되어 있기 때문에 중복으로 사용하면 안되는구나!! // 마샬링, 언마샬링 코드도 추가해줘야 할 듯하다!! Receiver2 basics.Address `codec:"rcv2"` // contains filtered or unexported fields }
AddressPrintTxnFields
func (*AddressPrintTxnFields) CanMarshalMsg ¶
func (_ *AddressPrintTxnFields) CanMarshalMsg(z interface{}) bool
(추가)
func (*AddressPrintTxnFields) CanUnmarshalMsg ¶
func (_ *AddressPrintTxnFields) CanUnmarshalMsg(z interface{}) bool
(추가)
func (*AddressPrintTxnFields) MarshalMsg ¶
func (z *AddressPrintTxnFields) MarshalMsg(b []byte) (o []byte)
(추가) MarshalMsg implements msgp.Marshaler
func (*AddressPrintTxnFields) MsgIsZero ¶
func (z *AddressPrintTxnFields) MsgIsZero() bool
(추가) MsgIsZero returns whether this is a zero value
func (*AddressPrintTxnFields) Msgsize ¶
func (z *AddressPrintTxnFields) Msgsize() (s int)
(추가) Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*AddressPrintTxnFields) UnmarshalMsg ¶
func (z *AddressPrintTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error)
(추가)UnmarshalMsg implements msgp.Unmarshaler
type ApplicationCallTxnFields ¶
type ApplicationCallTxnFields struct { // ApplicationID is 0 when creating an application, and nonzero when // calling an existing application. ApplicationID basics.AppIndex `codec:"apid"` // OnCompletion specifies an optional side-effect that this transaction // will have on the balance record of the sender or the application's // creator. See the documentation for the OnCompletion type for more // information on each possible value. OnCompletion OnCompletion `codec:"apan"` // ApplicationArgs are arguments accessible to the executing // ApprovalProgram or ClearStateProgram. ApplicationArgs [][]byte `codec:"apaa,allocbound=encodedMaxApplicationArgs"` // Accounts are accounts whose balance records are accessible // by the executing ApprovalProgram or ClearStateProgram. To // access LocalState or an ASA balance for an account besides // the sender, that account's address must be listed here (and // since v4, the ForeignApp or ForeignAsset must also include // the app or asset id). Accounts []basics.Address `codec:"apat,allocbound=encodedMaxAccounts"` // ForeignApps are application IDs for applications besides // this one whose GlobalState (or Local, since v4) may be read // by the executing ApprovalProgram or ClearStateProgram. ForeignApps []basics.AppIndex `codec:"apfa,allocbound=encodedMaxForeignApps"` // ForeignAssets are asset IDs for assets whose AssetParams // (and since v4, Holdings) may be read by the executing // ApprovalProgram or ClearStateProgram. ForeignAssets []basics.AssetIndex `codec:"apas,allocbound=encodedMaxForeignAssets"` // LocalStateSchema specifies the maximum number of each type that may // appear in the local key/value store of users who opt in to this // application. This field is only used during application creation // (when the ApplicationID field is 0), LocalStateSchema basics.StateSchema `codec:"apls"` // GlobalStateSchema specifies the maximum number of each type that may // appear in the global key/value store associated with this // application. This field is only used during application creation // (when the ApplicationID field is 0). GlobalStateSchema basics.StateSchema `codec:"apgs"` // ApprovalProgram is the stateful TEAL bytecode that executes on all // ApplicationCall transactions associated with this application, // except for those where OnCompletion is equal to ClearStateOC. If // this program fails, the transaction is rejected. This program may // read and write local and global state for this application. ApprovalProgram []byte `codec:"apap,allocbound=config.MaxAvailableAppProgramLen"` // ClearStateProgram is the stateful TEAL bytecode that executes on // ApplicationCall transactions associated with this application when // OnCompletion is equal to ClearStateOC. This program will not cause // the transaction to be rejected, even if it fails. This program may // read and write local and global state for this application. ClearStateProgram []byte `codec:"apsu,allocbound=config.MaxAvailableAppProgramLen"` // ExtraProgramPages specifies the additional app program len requested in pages. // A page is MaxAppProgramLen bytes. This field enables execution of app programs // larger than the default config, MaxAppProgramLen. ExtraProgramPages uint32 `codec:"apep,omitempty"` // contains filtered or unexported fields }
ApplicationCallTxnFields captures the transaction fields used for all interactions with applications
ApplicationCallTxnFields는 애플리케이션과의 모든 상호 작용에 사용되는 트랜잭션 필드를 가지고 있다.
func (*ApplicationCallTxnFields) AddressByIndex ¶
func (ac *ApplicationCallTxnFields) AddressByIndex(accountIdx uint64, sender basics.Address) (basics.Address, error)
AddressByIndex converts an integer index into an address associated with the transaction. Index 0 corresponds to the transaction sender, and an index > 0 corresponds to an offset into txn.Accounts. Returns an error if the index is not valid.
func (*ApplicationCallTxnFields) AppIDByIndex ¶
func (ac *ApplicationCallTxnFields) AppIDByIndex(i uint64) (basics.AppIndex, error)
AppIDByIndex converts an integer index into an application id associated with the transaction. Index 0 corresponds to the current app, and an index > 0 corresponds to an offset into txn.ForeignApps. Returns an error if the index is not valid.
func (*ApplicationCallTxnFields) CanMarshalMsg ¶
func (_ *ApplicationCallTxnFields) CanMarshalMsg(z interface{}) bool
func (*ApplicationCallTxnFields) CanUnmarshalMsg ¶
func (_ *ApplicationCallTxnFields) CanUnmarshalMsg(z interface{}) bool
func (*ApplicationCallTxnFields) Empty ¶
func (ac *ApplicationCallTxnFields) Empty() bool
Empty indicates whether or not all the fields in the ApplicationCallTxnFields are zeroed out
func (*ApplicationCallTxnFields) IndexByAddress ¶
func (ac *ApplicationCallTxnFields) IndexByAddress(target basics.Address, sender basics.Address) (uint64, error)
IndexByAddress converts an address into an integer offset into [txn.Sender, txn.Accounts[0], ...], returning the index at the first match. It returns an error if there is no such match.
func (*ApplicationCallTxnFields) IndexByAppID ¶
func (ac *ApplicationCallTxnFields) IndexByAppID(appID basics.AppIndex) (uint64, error)
IndexByAppID converts an application id into an integer offset into [current app, txn.ForeignApps[0], ...], returning the index at the first match. It returns an error if there is no such match.
func (*ApplicationCallTxnFields) MarshalMsg ¶
func (z *ApplicationCallTxnFields) MarshalMsg(b []byte) (o []byte)
MarshalMsg implements msgp.Marshaler
func (*ApplicationCallTxnFields) MsgIsZero ¶
func (z *ApplicationCallTxnFields) MsgIsZero() bool
MsgIsZero returns whether this is a zero value
func (*ApplicationCallTxnFields) Msgsize ¶
func (z *ApplicationCallTxnFields) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*ApplicationCallTxnFields) UnmarshalMsg ¶
func (z *ApplicationCallTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type ApplyData ¶
type ApplyData struct { // Closing amount for transaction. // 트랜잭션을 닫기 위해 필요한 알고양(?) ClosingAmount basics.MicroNovas `codec:"ca"` // Closing amount for asset transaction. // 애셋 트랜잭션을 닫기위해 필요한 양 AssetClosingAmount uint64 `codec:"aca"` // Rewards applied to the Sender, Receiver, and CloseRemainderTo accounts. // 보낸계정, 받는계정, CloseRemainderTo계정이 받는 알고양 SenderRewards basics.MicroNovas `codec:"rs"` ReceiverRewards basics.MicroNovas `codec:"rr"` CloseRewards basics.MicroNovas `codec:"rc"` // GlobalState와 LocalState의 StateDelta를 저장하고 있는 구조체 EvalDelta EvalDelta `codec:"dt"` // If asa or app is being created, the id used. Else 0. // Names chosen to match naming the corresponding txn. // These are populated on when MaxInnerTransactions > 0 (TEAL 5) // 애셋, 앱관련 트랜잭션에서 사용되는 값으로써 asa나 app이 생성되는 값을 갖고 그 외엔 0이다. ConfigAsset basics.AssetIndex `codec:"caid"` ApplicationID basics.AppIndex `codec:"apid"` // contains filtered or unexported fields }
ApplyData contains information about the transaction's execution.
트랜잭션 실행시 필요한 정보를 포함하고 있는 구조체
func (*ApplyData) CanMarshalMsg ¶
func (*ApplyData) CanUnmarshalMsg ¶
func (ApplyData) Equal ¶
Equal returns true if two ApplyDatas are equal, ignoring nilness equality on EvalDelta's internal deltas (see EvalDelta.Equal for more information)
func (*ApplyData) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type AssetConfigTxnFields ¶
type AssetConfigTxnFields struct { // ConfigAsset is the asset being configured or destroyed. // A zero value means allocation ConfigAsset basics.AssetIndex `codec:"caid"` // AssetParams are the parameters for the asset being // created or re-configured. A zero value means destruction. AssetParams basics.AssetParams `codec:"apar"` // contains filtered or unexported fields }
AssetConfigTxnFields captures the fields used for asset allocation, re-configuration, and destruction.
func (*AssetConfigTxnFields) CanMarshalMsg ¶
func (_ *AssetConfigTxnFields) CanMarshalMsg(z interface{}) bool
func (*AssetConfigTxnFields) CanUnmarshalMsg ¶
func (_ *AssetConfigTxnFields) CanUnmarshalMsg(z interface{}) bool
func (*AssetConfigTxnFields) MarshalMsg ¶
func (z *AssetConfigTxnFields) MarshalMsg(b []byte) (o []byte)
MarshalMsg implements msgp.Marshaler
func (*AssetConfigTxnFields) MsgIsZero ¶
func (z *AssetConfigTxnFields) MsgIsZero() bool
MsgIsZero returns whether this is a zero value
func (*AssetConfigTxnFields) Msgsize ¶
func (z *AssetConfigTxnFields) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*AssetConfigTxnFields) UnmarshalMsg ¶
func (z *AssetConfigTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type AssetFreezeTxnFields ¶
type AssetFreezeTxnFields struct { // FreezeAccount is the address of the account whose asset // slot is being frozen or un-frozen. FreezeAccount basics.Address `codec:"fadd"` // FreezeAsset is the asset ID being frozen or un-frozen. FreezeAsset basics.AssetIndex `codec:"faid"` // AssetFrozen is the new frozen value. AssetFrozen bool `codec:"afrz"` // contains filtered or unexported fields }
AssetFreezeTxnFields captures the fields used for freezing asset slots.
func (*AssetFreezeTxnFields) CanMarshalMsg ¶
func (_ *AssetFreezeTxnFields) CanMarshalMsg(z interface{}) bool
func (*AssetFreezeTxnFields) CanUnmarshalMsg ¶
func (_ *AssetFreezeTxnFields) CanUnmarshalMsg(z interface{}) bool
func (*AssetFreezeTxnFields) MarshalMsg ¶
func (z *AssetFreezeTxnFields) MarshalMsg(b []byte) (o []byte)
MarshalMsg implements msgp.Marshaler
func (*AssetFreezeTxnFields) MsgIsZero ¶
func (z *AssetFreezeTxnFields) MsgIsZero() bool
MsgIsZero returns whether this is a zero value
func (*AssetFreezeTxnFields) Msgsize ¶
func (z *AssetFreezeTxnFields) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*AssetFreezeTxnFields) UnmarshalMsg ¶
func (z *AssetFreezeTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type AssetTransferTxnFields ¶
type AssetTransferTxnFields struct { XferAsset basics.AssetIndex `codec:"xaid"` // AssetAmount is the amount of asset to transfer. // A zero amount transferred to self allocates that asset // in the account's Assets map. AssetAmount uint64 `codec:"aamt"` // AssetSender is the sender of the transfer. If this is not // a zero value, the real transaction sender must be the Clawback // address from the AssetParams. If this is the zero value, // the asset is sent from the transaction's Sender. AssetSender basics.Address `codec:"asnd"` // AssetReceiver is the recipient of the transfer. AssetReceiver basics.Address `codec:"arcv"` // AssetCloseTo indicates that the asset should be removed // from the account's Assets map, and specifies where the remaining // asset holdings should be transferred. It's always valid to transfer // remaining asset holdings to the creator account. AssetCloseTo basics.Address `codec:"aclose"` // contains filtered or unexported fields }
AssetTransferTxnFields captures the fields used for asset transfers.
func (*AssetTransferTxnFields) CanMarshalMsg ¶
func (_ *AssetTransferTxnFields) CanMarshalMsg(z interface{}) bool
func (*AssetTransferTxnFields) CanUnmarshalMsg ¶
func (_ *AssetTransferTxnFields) CanUnmarshalMsg(z interface{}) bool
func (*AssetTransferTxnFields) MarshalMsg ¶
func (z *AssetTransferTxnFields) MarshalMsg(b []byte) (o []byte)
MarshalMsg implements msgp.Marshaler
func (*AssetTransferTxnFields) MsgIsZero ¶
func (z *AssetTransferTxnFields) MsgIsZero() bool
MsgIsZero returns whether this is a zero value
func (*AssetTransferTxnFields) Msgsize ¶
func (z *AssetTransferTxnFields) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*AssetTransferTxnFields) UnmarshalMsg ¶
func (z *AssetTransferTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type CompactCertTxnFields ¶
type CompactCertTxnFields struct { CertRound basics.Round `codec:"certrnd"` CertType protocol.CompactCertType `codec:"certtype"` Cert compactcert.Cert `codec:"cert"` // contains filtered or unexported fields }
CompactCertTxnFields captures the fields used for compact cert transactions.
func (*CompactCertTxnFields) CanMarshalMsg ¶
func (_ *CompactCertTxnFields) CanMarshalMsg(z interface{}) bool
func (*CompactCertTxnFields) CanUnmarshalMsg ¶
func (_ *CompactCertTxnFields) CanUnmarshalMsg(z interface{}) bool
func (CompactCertTxnFields) Empty ¶
func (cc CompactCertTxnFields) Empty() bool
Empty returns whether the CompactCertTxnFields are all zero, in the sense of being omitted in a msgpack encoding.
func (*CompactCertTxnFields) MarshalMsg ¶
func (z *CompactCertTxnFields) MarshalMsg(b []byte) (o []byte)
MarshalMsg implements msgp.Marshaler
func (*CompactCertTxnFields) MsgIsZero ¶
func (z *CompactCertTxnFields) MsgIsZero() bool
MsgIsZero returns whether this is a zero value
func (*CompactCertTxnFields) Msgsize ¶
func (z *CompactCertTxnFields) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*CompactCertTxnFields) UnmarshalMsg ¶
func (z *CompactCertTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type EvalDelta ¶
type EvalDelta struct { GlobalDelta basics.StateDelta `codec:"gd"` // When decoding EvalDeltas, the integer key represents an offset into // [txn.Sender, txn.Accounts[0], txn.Accounts[1], ...] LocalDeltas map[uint64]basics.StateDelta `codec:"ld,allocbound=config.MaxEvalDeltaAccounts"` Logs []string `codec:"lg,allocbound=config.MaxLogCalls"` InnerTxns []SignedTxnWithAD `codec:"itx,allocbound=config.MaxInnerTransactionsPerDelta"` // contains filtered or unexported fields }
EvalDelta stores StateDeltas for an application's global key/value store, as well as StateDeltas for some number of accounts holding local state for that application
EvalDelta는 어플리케이션의 GlobalState(전역 키/값 저장소)에 대한 StateDelta와 LocalState(해당 어플리케이션에 대한 로컬 상태를 보유하고 있는 계정(즉, 해당 애플리케이션에 대해 optin tx를 실행한 계정))에 대한 StateDelta를 저장합니다 => GlobalState와 LocalState의 StateDelta를 저장하고 있는 구조체
func (*EvalDelta) CanMarshalMsg ¶
func (*EvalDelta) CanUnmarshalMsg ¶
func (EvalDelta) Equal ¶
Equal compares two EvalDeltas and returns whether or not they are equivalent. It does not care about nilness equality of LocalDeltas, because the msgpack codec will encode/decode an empty map as nil, and we want an empty generated EvalDelta to equal an empty one we decode off the wire.
func (*EvalDelta) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type ExplicitTxnContext ¶
type ExplicitTxnContext struct { ExplicitRound basics.Round Proto config.ConsensusParams GenID string GenHash crypto.Digest }
ExplicitTxnContext is a struct that implements TxnContext with explicit fields for everything.
func (ExplicitTxnContext) ConsensusProtocol ¶
func (tc ExplicitTxnContext) ConsensusProtocol() config.ConsensusParams
ConsensusProtocol implements the TxnContext interface
func (ExplicitTxnContext) GenesisHash ¶
func (tc ExplicitTxnContext) GenesisHash() crypto.Digest
GenesisHash implements the TxnContext interface
func (ExplicitTxnContext) GenesisID ¶
func (tc ExplicitTxnContext) GenesisID() string
GenesisID implements the TxnContext interface
func (ExplicitTxnContext) Round ¶
func (tc ExplicitTxnContext) Round() basics.Round
Round implements the TxnContext interface
type Header ¶
type Header struct { // 트랜잭션을 전송한 계정주소 Sender basics.Address `codec:"snd"` // 트랜잭션을 전송하기 위해 필요한 수수료 Fee basics.MicroNovas `codec:"fee"` // 트랜잭션이 처리될 수 있는 최초의 라운드 FirstValid basics.Round `codec:"fv"` // 트랜잭션이 처리될 수 있는 마지막 라운드 LastValid basics.Round `codec:"lv"` // 트랜잭셔에 붙여서 보내는 내용(주석같은 느낌) Note []byte `codec:"note,allocbound=config.MaxTxnNoteBytes"` GenesisID string `codec:"gen"` GenesisHash crypto.Digest `codec:"gh"` // Group specifies that this transaction is part of a // transaction group (and, if so, specifies the hash // of a TxGroup). /* 이 tx가 tx그룹에 속해있다는걸 말함 */ Group crypto.Digest `codec:"grp"` // Lease enforces mutual exclusion of transactions. If this field is // nonzero, then once the transaction is confirmed, it acquires the // lease identified by the (Sender, Lease) pair of the transaction until // the LastValid round passes. While this transaction possesses the // lease, no other transaction specifying this lease can be confirmed. /* // 트랜잭션간의 상호배제(동일한 자원을 동시에 사용하지 못하게함)를 위해 사용되는 값 // 이 값이 0이 아니고 트랜잭션이 확정되면 (Sender, Lease)쌍에 의해 식별되는 lease값을 획득한다. // 트랜잭션은 lease를 lastRound까지 가지고 있고 그안데 이 lease값을 가지고 있는 다른 트랜잭션은 // 확정될 수 없다 */ Lease [32]byte `codec:"lx"` // RekeyTo, if nonzero, sets the sender's AuthAddr to the given address // If the RekeyTo address is the sender's actual address, the AuthAddr is set to zero // This allows "re-keying" a long-lived account -- rotating the signing key, changing // membership of a multisig account, etc. /* // 이 값이 0이 아니면 전송자의 AuthAddr값을 RekeyTo값에 넣어준다. // RekeyTo값이 전송자의 실제 주소와 동일하다면 AuthAddr값은 0으로 세팅한다. // 따라서 AuthAddr값이 0이라면 re-keying(서명키를 교체하거나 다중계정의 멤버십 변경)이 가능한 상태이다. */ RekeyTo basics.Address `codec:"rekey"` // contains filtered or unexported fields }
Header captures the fields common to every transaction type.
모든 트랜잭션 타입이 공통으로 가지는 헤더부분에 대한 구조체
func (Header) Alive ¶
func (tx Header) Alive(tc TxnContext) error
Alive checks to see if the transaction is still alive (can be applied) at the specified Round.
func (*Header) CanMarshalMsg ¶
func (*Header) CanUnmarshalMsg ¶
func (*Header) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
func (*Header) Msgsize ¶
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (Header) Src ¶
Src returns the address that posted the transaction. This is the account that pays the associated Fee.
func (Header) TxFee ¶
func (tx Header) TxFee() basics.MicroNovas
TxFee returns the fee associated with this transaction.
type KeyregTxnFields ¶
type KeyregTxnFields struct { VotePK crypto.OneTimeSignatureVerifier `codec:"votekey"` SelectionPK crypto.VRFVerifier `codec:"selkey"` StateProofPK merklesignature.Verifier `codec:"sprfkey"` VoteFirst basics.Round `codec:"votefst"` VoteLast basics.Round `codec:"votelst"` VoteKeyDilution uint64 `codec:"votekd"` Nonparticipation bool `codec:"nonpart"` // contains filtered or unexported fields }
KeyregTxnFields captures the fields used for key registration transactions.
func (*KeyregTxnFields) CanMarshalMsg ¶
func (_ *KeyregTxnFields) CanMarshalMsg(z interface{}) bool
func (*KeyregTxnFields) CanUnmarshalMsg ¶
func (_ *KeyregTxnFields) CanUnmarshalMsg(z interface{}) bool
func (*KeyregTxnFields) MarshalMsg ¶
func (z *KeyregTxnFields) MarshalMsg(b []byte) (o []byte)
MarshalMsg implements msgp.Marshaler
func (*KeyregTxnFields) MsgIsZero ¶
func (z *KeyregTxnFields) MsgIsZero() bool
MsgIsZero returns whether this is a zero value
func (*KeyregTxnFields) Msgsize ¶
func (z *KeyregTxnFields) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*KeyregTxnFields) UnmarshalMsg ¶
func (z *KeyregTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type LogicSig ¶
type LogicSig struct { // Logic signed by Sig or Msig, OR hashed to be the Address of an account. /* Logig은 Sig 또는 Msig에 의해 서명되거나 계정의 주소로 해시됩니다. */ Logic []byte `codec:"l,allocbound=config.MaxLogicSigMaxSize"` Sig crypto.Signature `codec:"sig"` Msig crypto.MultisigSig `codec:"msig"` // Args are not signed, but checked by Logic Args [][]byte `codec:"arg,allocbound=EvalMaxArgs,allocbound=config.MaxLogicSigMaxSize"` // contains filtered or unexported fields }
LogicSig contains logic for validating a transaction. LogicSig is signed by an account, allowing delegation of operations. OR LogicSig defines a contract account.
LogicSig에는 트랜잭션을 검증하기 위한 논리가 포함되어 있습니다. 서명 권한 위임을 허용합니다. 또는 LogicSig는 계약 계정을 정의합니다.
func (*LogicSig) CanMarshalMsg ¶
func (*LogicSig) CanUnmarshalMsg ¶
func (*LogicSig) Equal ¶
Equal returns true if both LogicSig are equivalent.
Out of paranoia, Equal distinguishes zero-length byte slices from byte slice-typed nil values as they may have subtly different behaviors within the evaluation of a LogicSig, due to differences in msgpack encoding behavior.
func (*LogicSig) Len ¶
Len returns the length of Logic plus the length of the Args This is limited by config.ConsensusParams.LogicSigMaxSize
func (*LogicSig) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type MinFeeError ¶
type MinFeeError string
MinFeeError defines an error type which could be returned from the method WellFormed
func (MinFeeError) CanMarshalMsg ¶
func (_ MinFeeError) CanMarshalMsg(z interface{}) bool
func (*MinFeeError) CanUnmarshalMsg ¶
func (_ *MinFeeError) CanUnmarshalMsg(z interface{}) bool
func (MinFeeError) Error ¶
func (err MinFeeError) Error() string
func (MinFeeError) MarshalMsg ¶
func (z MinFeeError) MarshalMsg(b []byte) (o []byte)
MarshalMsg implements msgp.Marshaler
func (MinFeeError) MsgIsZero ¶
func (z MinFeeError) MsgIsZero() bool
MsgIsZero returns whether this is a zero value
func (MinFeeError) Msgsize ¶
func (z MinFeeError) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*MinFeeError) UnmarshalMsg ¶
func (z *MinFeeError) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type OnCompletion ¶
type OnCompletion uint64
OnCompletion is an enum representing some layer 1 side effect that an ApplicationCall transaction will have if it is included in a block.
OnCompletion은 ApplicationCall 트랜잭션이 블록에 포함된 경우 갖게 될 일부 레이어1의 부수효과를 나타내는 열거형입니다
const ( // NoOpOC indicates that an application transaction will simply call its // ApprovalProgram /* ApprovalProgram은 애플리케이션의 주요 로직을 처리하는 프로그램 */ NoOpOC OnCompletion = 0 // OptInOC indicates that an application transaction will allocate some // LocalState for the application in the sender's account OptInOC OnCompletion = 1 // CloseOutOC indicates that an application transaction will deallocate // some LocalState for the application from the user's account CloseOutOC OnCompletion = 2 // ClearStateOC is similar to CloseOutOC, but may never fail. This // allows users to reclaim their minimum balance from an application // they no longer wish to opt in to. When an ApplicationCall // transaction's OnCompletion is ClearStateOC, the ClearStateProgram // executes instead of the ApprovalProgram ClearStateOC OnCompletion = 3 // UpdateApplicationOC indicates that an application transaction will // update the ApprovalProgram and ClearStateProgram for the application UpdateApplicationOC OnCompletion = 4 // DeleteApplicationOC indicates that an application transaction will // delete the AppParams for the application from the creator's balance // record DeleteApplicationOC OnCompletion = 5 )
부수효과을 나타내는 상수값: application call이 하는 어떤 행동에 따른 상수값
func (OnCompletion) CanMarshalMsg ¶
func (_ OnCompletion) CanMarshalMsg(z interface{}) bool
func (*OnCompletion) CanUnmarshalMsg ¶
func (_ *OnCompletion) CanUnmarshalMsg(z interface{}) bool
func (OnCompletion) MarshalMsg ¶
func (z OnCompletion) MarshalMsg(b []byte) (o []byte)
MarshalMsg implements msgp.Marshaler
func (OnCompletion) MsgIsZero ¶
func (z OnCompletion) MsgIsZero() bool
MsgIsZero returns whether this is a zero value
func (OnCompletion) Msgsize ¶
func (z OnCompletion) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (OnCompletion) String ¶
func (i OnCompletion) String() string
func (*OnCompletion) UnmarshalMsg ¶
func (z *OnCompletion) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type PaymentTxnFields ¶
type PaymentTxnFields struct { Receiver basics.Address `codec:"rcv"` Amount basics.MicroNovas `codec:"amt"` // When CloseRemainderTo is set, it indicates that the // transaction is requesting that the account should be // closed, and all remaining funds be transferred to this // address. CloseRemainderTo basics.Address `codec:"close"` // contains filtered or unexported fields }
PaymentTxnFields captures the fields used by payment transactions.
func (*PaymentTxnFields) CanMarshalMsg ¶
func (_ *PaymentTxnFields) CanMarshalMsg(z interface{}) bool
func (*PaymentTxnFields) CanUnmarshalMsg ¶
func (_ *PaymentTxnFields) CanUnmarshalMsg(z interface{}) bool
func (*PaymentTxnFields) MarshalMsg ¶
func (z *PaymentTxnFields) MarshalMsg(b []byte) (o []byte)
MarshalMsg implements msgp.Marshaler
func (*PaymentTxnFields) MsgIsZero ¶
func (z *PaymentTxnFields) MsgIsZero() bool
MsgIsZero returns whether this is a zero value
func (*PaymentTxnFields) Msgsize ¶
func (z *PaymentTxnFields) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*PaymentTxnFields) UnmarshalMsg ¶
func (z *PaymentTxnFields) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type Payset ¶
type Payset []SignedTxnInBlock
A Payset represents a common, unforgeable, consistent, ordered set of SignedTxn objects.
Payset은 공통되고 위조불가능하고 일관되며 정렬된 서명된 트랜잭션 객체들의 집합이다.
func (Payset) CanMarshalMsg ¶
func (*Payset) CanUnmarshalMsg ¶
func (Payset) CommitFlat ¶
CommitFlat returns a commitment to the Payset, as a flat array.
func (Payset) CommitGenesis ¶
CommitGenesis is like Commit, but with special handling for zero-length but non-nil paysets.
func (Payset) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
func (Payset) Msgsize ¶
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (Payset) ToBeHashed ¶
ToBeHashed implements the crypto.Hashable interface
type SignedTxn ¶
type SignedTxn struct { Sig crypto.Signature `codec:"sig"` Msig crypto.MultisigSig `codec:"msig"` Lsig LogicSig `codec:"lsig"` Txn Transaction `codec:"txn"` AuthAddr basics.Address `codec:"sgnr"` // contains filtered or unexported fields }
SignedTxn wraps a transaction and a signature. It exposes a Verify() method that verifies the signature and checks that the underlying transaction is well-formed. TODO: update this documentation now that there's multisig
func AssembleSignedTxn ¶
func AssembleSignedTxn(txn Transaction, sig crypto.Signature, msig crypto.MultisigSig) (SignedTxn, error)
AssembleSignedTxn assembles a multisig-signed transaction from a transaction an optional sig, and an optional multisig. No signature checking is done -- for example, this might only be a partial multisig TODO: is this method used anywhere, or is it safe to remove?
func (SignedTxn) Authorizer ¶
Authorizer returns the address against which the signature/msig/lsig should be checked, or so the SignedTxn claims. This is just s.AuthAddr or, if s.AuthAddr is zero, s.Txn.Sender. It's provided as a convenience method.
func (*SignedTxn) CanMarshalMsg ¶
func (*SignedTxn) CanUnmarshalMsg ¶
func (SignedTxn) GetEncodedLength ¶
GetEncodedLength returns the length in bytes of the encoded transaction
func (*SignedTxn) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
func (*SignedTxn) MessUpSigForTesting ¶
func (stxn *SignedTxn) MessUpSigForTesting()
MessUpSigForTesting will mess up the signature so that Verify() will fail on the signed transaction. Intended to be used in tests outside the transactions package (e.g., block validation tests) where we want to check whether we're verifying signatures.
type SignedTxnInBlock ¶
type SignedTxnInBlock struct { SignedTxnWithAD HasGenesisID bool `codec:"hgi"` HasGenesisHash bool `codec:"hgh"` // contains filtered or unexported fields }
SignedTxnInBlock is how a signed transaction is encoded in a block.
func (*SignedTxnInBlock) CanMarshalMsg ¶
func (_ *SignedTxnInBlock) CanMarshalMsg(z interface{}) bool
func (*SignedTxnInBlock) CanUnmarshalMsg ¶
func (_ *SignedTxnInBlock) CanUnmarshalMsg(z interface{}) bool
func (SignedTxnInBlock) GetEncodedLength ¶
func (s SignedTxnInBlock) GetEncodedLength() int
GetEncodedLength returns the length in bytes of the encoded transaction
func (*SignedTxnInBlock) Hash ¶
func (s *SignedTxnInBlock) Hash() crypto.Digest
Hash implements an optimized version of crypto.HashObj(s).
func (SignedTxnInBlock) ID ¶
func (s SignedTxnInBlock) ID()
ID on SignedTxnInBlock should never be called, because the ID depends on the block from which this transaction will be decoded. By having a different return value from SignedTxn.ID(), we will catch errors at compile-time.
func (*SignedTxnInBlock) MarshalMsg ¶
func (z *SignedTxnInBlock) MarshalMsg(b []byte) (o []byte)
MarshalMsg implements msgp.Marshaler
func (*SignedTxnInBlock) MsgIsZero ¶
func (z *SignedTxnInBlock) MsgIsZero() bool
MsgIsZero returns whether this is a zero value
func (*SignedTxnInBlock) Msgsize ¶
func (z *SignedTxnInBlock) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*SignedTxnInBlock) ToBeHashed ¶
func (s *SignedTxnInBlock) ToBeHashed() (protocol.HashID, []byte)
ToBeHashed implements the crypto.Hashable interface.
func (*SignedTxnInBlock) UnmarshalMsg ¶
func (z *SignedTxnInBlock) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type SignedTxnWithAD ¶
SignedTxnWithAD is a (decoded) SignedTxn with associated ApplyData
func WrapSignedTxnsWithAD ¶
func WrapSignedTxnsWithAD(txgroup []SignedTxn) []SignedTxnWithAD
WrapSignedTxnsWithAD takes an array SignedTxn and returns the same as SignedTxnWithAD Each txn's ApplyData is the default empty state.
[]transactions.SignedTxn의 트랜잭션 그룹데이터를 []SignedTxnWithAD형태로 래핑한다.
func (*SignedTxnWithAD) CanMarshalMsg ¶
func (_ *SignedTxnWithAD) CanMarshalMsg(z interface{}) bool
func (*SignedTxnWithAD) CanUnmarshalMsg ¶
func (_ *SignedTxnWithAD) CanUnmarshalMsg(z interface{}) bool
func (*SignedTxnWithAD) MarshalMsg ¶
func (z *SignedTxnWithAD) MarshalMsg(b []byte) (o []byte)
MarshalMsg implements msgp.Marshaler
func (*SignedTxnWithAD) MsgIsZero ¶
func (z *SignedTxnWithAD) MsgIsZero() bool
MsgIsZero returns whether this is a zero value
func (*SignedTxnWithAD) Msgsize ¶
func (z *SignedTxnWithAD) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*SignedTxnWithAD) UnmarshalMsg ¶
func (z *SignedTxnWithAD) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type SortString ¶
type SortString []string
SortString implements sorting by string keys for canonical encoding of maps in msgpack format.
SortString은 msgpack 형식의 맵의 표준 인코딩을 위한 string key의 정렬을 구현합니다.
func (SortString) Len ¶
func (a SortString) Len() int
func (SortString) Less ¶
func (a SortString) Less(i, j int) bool
func (SortString) Swap ¶
func (a SortString) Swap(i, j int)
type SortUint64 ¶
type SortUint64 []uint64
SortUint64 implements sorting by uint64 keys for canonical encoding of maps in msgpack format.
SortUint64는 msgpack 형식의 맵의 표준 인코딩을 위한 uint64 key의 정렬을 구현합니다.
func (SortUint64) Len ¶
func (a SortUint64) Len() int
func (SortUint64) Less ¶
func (a SortUint64) Less(i, j int) bool
func (SortUint64) Swap ¶
func (a SortUint64) Swap(i, j int)
type SpecialAddresses ¶
SpecialAddresses holds addresses with nonstandard properties.
FeeSink와 RewardsPool의 주소를 나타내는 구조체
type Transaction ¶
type Transaction struct { // Type of transaction Type protocol.TxType `codec:"type"` // Common fields for all types of transactions Header // Fields for different types of transactions KeyregTxnFields PaymentTxnFields AssetConfigTxnFields AssetTransferTxnFields AssetFreezeTxnFields ApplicationCallTxnFields CompactCertTxnFields AddressPrintTxnFields // contains filtered or unexported fields }
Transaction describes a transaction that can appear in a block.
블록에 저장되는 트랜잭션을 정의 헤더, 타입에 맞는 트랜잭션 필드 구조체를 가지고 있음
func (*Transaction) CanMarshalMsg ¶
func (_ *Transaction) CanMarshalMsg(z interface{}) bool
func (*Transaction) CanUnmarshalMsg ¶
func (_ *Transaction) CanUnmarshalMsg(z interface{}) bool
func (Transaction) EstimateEncodedSize ¶
func (tx Transaction) EstimateEncodedSize() int
EstimateEncodedSize returns the estimated encoded size of the transaction including the signature. This function is to be used for calculating the fee Note that it may be an underestimate if the transaction is signed in an unusual way (e.g., with an authaddr or via multisig or logicsig)
func (Transaction) GetReceiverAddress ¶
func (tx Transaction) GetReceiverAddress() basics.Address
GetReceiverAddress returns the address of the receiver. If the transaction has no receiver, it returns the empty address.
func (Transaction) ID ¶
func (tx Transaction) ID() Txid
ID returns the Txid (i.e., hash) of the transaction.
func (Transaction) InnerID ¶
func (tx Transaction) InnerID(parent Txid, index int) Txid
InnerID returns something akin to Txid, but folds in the parent Txid and the index of the inner call.
func (*Transaction) MarshalMsg ¶
func (z *Transaction) MarshalMsg(b []byte) (o []byte)
MarshalMsg implements msgp.Marshaler
func (Transaction) MatchAddress ¶
func (tx Transaction) MatchAddress(addr basics.Address, spec SpecialAddresses) bool
MatchAddress checks if the transaction touches a given address.
func (*Transaction) MsgIsZero ¶
func (z *Transaction) MsgIsZero() bool
MsgIsZero returns whether this is a zero value
func (*Transaction) Msgsize ¶
func (z *Transaction) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (Transaction) RelevantAddrs ¶
func (tx Transaction) RelevantAddrs(spec SpecialAddresses) []basics.Address
RelevantAddrs returns the addresses whose balance records this transaction will need to access. The header's default is to return just the sender and the fee sink.
func (Transaction) Sign ¶
func (tx Transaction) Sign(secrets *crypto.SignatureSecrets) SignedTxn
Sign signs a transaction using a given Account's secrets.
func (Transaction) ToBeHashed ¶
func (tx Transaction) ToBeHashed() (protocol.HashID, []byte)
ToBeHashed implements the crypto.Hashable interface.
func (Transaction) TxAmount ¶
func (tx Transaction) TxAmount() basics.MicroNovas
TxAmount returns the amount paid to the recipient in this payment
func (*Transaction) UnmarshalMsg ¶
func (z *Transaction) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
func (Transaction) WellFormed ¶
func (tx Transaction) WellFormed(spec SpecialAddresses, proto config.ConsensusParams) error
WellFormed checks that the transaction looks reasonable on its own (but not necessarily valid against the actual ledger). It does not check signatures.
트랜잭션의 유효성검사를 진행하는 메소드, 서명은 검사하지 않는다!
type TxGroup ¶
type TxGroup struct { // TxGroupHashes specifies a list of hashes of transactions that must appear // together, sequentially, in a block in order for the group to be // valid. Each hash in the list is a hash of a transaction with // the `Group` field omitted. TxGroupHashes []crypto.Digest `codec:"txlist,allocbound=config.MaxTxGroupSize"` // contains filtered or unexported fields }
TxGroup describes a group of transactions that must appear together in a specific order in a block.
블록안에서 정렬되어야 할 트랜잭션 그룹의 해시 배열을 가지고 있는 구조체 즉, tx그룹안에 있는 tx들의 해시를 저장하는 배열임!!
func (*TxGroup) CanMarshalMsg ¶
func (*TxGroup) CanUnmarshalMsg ¶
func (*TxGroup) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
func (*TxGroup) Msgsize ¶
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (TxGroup) ToBeHashed ¶
ToBeHashed implements the crypto.Hashable interface.
type Txid ¶
Txid is a hash used to uniquely identify individual transactions
Txid는 각 트랜잭션을 식별해주는 해시값이다.
func (*Txid) CanMarshalMsg ¶
func (*Txid) CanUnmarshalMsg ¶
func (*Txid) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
func (*Txid) Msgsize ¶
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*Txid) UnmarshalMsg ¶
UnmarshalMsg implements msgp.Unmarshaler
func (*Txid) UnmarshalText ¶
UnmarshalText initializes the Address from an array of bytes.
type TxnContext ¶
type TxnContext interface { Round() basics.Round ConsensusProtocol() config.ConsensusParams GenesisID() string GenesisHash() crypto.Digest }
TxnContext describes the context in which a transaction can appear (pretty much, a block, but we don't have the definition of a block here, since that would be a circular dependency). This is used to decide if a transaction is alive or not.
어떤 트랜잭션이 활성화되었는지 아닌지를 판단하기 위한 인터페이스