Documentation ¶
Index ¶
- func AddressPrint(addressprint transactions.AddressPrintTxnFields, header transactions.Header, ...) error
- func ApplicationCall(ac transactions.ApplicationCallTxnFields, header transactions.Header, ...) (err error)
- func AssetConfig(cc transactions.AssetConfigTxnFields, header transactions.Header, ...) error
- func AssetFreeze(cf transactions.AssetFreezeTxnFields, header transactions.Header, ...) error
- func AssetTransfer(ct transactions.AssetTransferTxnFields, header transactions.Header, ...) error
- func Keyreg(keyreg transactions.KeyregTxnFields, header transactions.Header, ...) error
- func Payment(payment transactions.PaymentTxnFields, header transactions.Header, ...) error
- func Rekey(balances Balances, tx *transactions.Transaction) error
- type Balances
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddressPrint ¶
func AddressPrint(addressprint transactions.AddressPrintTxnFields, header transactions.Header, balances Balances, spec transactions.SpecialAddresses, ad *transactions.ApplyData) error
AddressPrint트랜잭션을 실행하기 위한 함수
func ApplicationCall ¶
func ApplicationCall(ac transactions.ApplicationCallTxnFields, header transactions.Header, balances Balances, ad *transactions.ApplyData, gi int, evalParams *logic.EvalParams, txnCounter uint64) (err error)
ApplicationCall evaluates ApplicationCall transaction
func AssetConfig ¶
func AssetConfig(cc transactions.AssetConfigTxnFields, header transactions.Header, balances Balances, spec transactions.SpecialAddresses, ad *transactions.ApplyData, txnCounter uint64) error
AssetConfig applies an AssetConfig transaction using the Balances interface.
func AssetFreeze ¶
func AssetFreeze(cf transactions.AssetFreezeTxnFields, header transactions.Header, balances Balances, spec transactions.SpecialAddresses, ad *transactions.ApplyData) error
AssetFreeze applies an AssetFreeze transaction using the Balances interface.
AssetFreeze transaction을 적용한다.
func AssetTransfer ¶
func AssetTransfer(ct transactions.AssetTransferTxnFields, header transactions.Header, balances Balances, spec transactions.SpecialAddresses, ad *transactions.ApplyData) error
AssetTransfer applies an AssetTransfer transaction using the Balances interface.
AssetTransfer transaction을 적용한다.
func Keyreg ¶
func Keyreg(keyreg transactions.KeyregTxnFields, header transactions.Header, balances Balances, spec transactions.SpecialAddresses, ad *transactions.ApplyData, round basics.Round) error
Keyreg applies a KeyRegistration transaction using the Balances interface.
func Payment ¶
func Payment(payment transactions.PaymentTxnFields, header transactions.Header, balances Balances, spec transactions.SpecialAddresses, ad *transactions.ApplyData) error
Payment changes the balances according to this transaction. The ApplyData argument should reflect the changes made by apply(). It may already include changes made by the caller (i.e., Transaction.Apply), so apply() must update it rather than overwriting it. For example, Transaction.Apply() may have updated ad.SenderRewards, and this function should only add to ad.SenderRewards (if needed), but not overwrite it.
Payment은 이 transaction에 따라 잔액을 변경합니다. ApplyData 인수는 apply()에 의해 변경된 사항을 반영해야 합니다. 호출자(즉, Transaction.Apply)가 변경한 사항이 이미 포함되어 있을 수 있으므로 apply()는 덮어쓰지 않고 업데이트해야 합니다. 예를 들어 Transaction.Apply()는 ad.SenderRewards를 업데이트했을 수 있으며 이 함수는 ad.SenderRewards(필요한 경우)에만 추가해야 하지만 덮어쓰면 안 됩니다.
func Rekey ¶
func Rekey(balances Balances, tx *transactions.Transaction) error
Rekey updates tx.Sender's AuthAddr to tx.RekeyTo, if provided
Types ¶
type Balances ¶
type Balances interface { // Get looks up the account data for an address, ignoring application state // If the account is known to be empty, then err should be nil and the returned balance record should have the given address and empty AccountData // withPendingRewards specifies whether pending rewards should be applied. // A non-nil error means the lookup is impossible (e.g., if the database doesn't have necessary state anymore) Get(addr basics.Address, withPendingRewards bool) (basics.AccountData, error) Put(basics.Address, basics.AccountData) error // GetCreator gets the address of the account that created a given creatable GetCreator(cidx basics.CreatableIndex, ctype basics.CreatableType) (basics.Address, bool, error) // Allocate or deallocate either global or address-local app storage. // // Put(...) and then {AllocateApp/DeallocateApp}(..., ..., global=true) // creates/destroys an application. // // Put(...) and then {AllocateApp/DeallocateApp}(..., ..., global=false) // opts into/closes out of an application. AllocateApp(addr basics.Address, aidx basics.AppIndex, global bool, space basics.StateSchema) error DeallocateApp(addr basics.Address, aidx basics.AppIndex, global bool) error // Similar to above, notify COW that global/local asset state was created. AllocateAsset(addr basics.Address, index basics.AssetIndex, global bool) error DeallocateAsset(addr basics.Address, index basics.AssetIndex, global bool) error // StatefulEval executes a TEAL program in stateful mode on the balances. // It returns whether the program passed and its error. It also returns // an EvalDelta that contains the changes made by the program. StatefulEval(gi int, params *logic.EvalParams, aidx basics.AppIndex, program []byte) (passed bool, evalDelta transactions.EvalDelta, err error) // Move MicroNovas from one account to another, doing all necessary overflow checking (convenience method) // TODO: Does this need to be part of the balances interface, or can it just be implemented here as a function that calls Put and Get? Move(src, dst basics.Address, amount basics.MicroNovas, srcRewards *basics.MicroNovas, dstRewards *basics.MicroNovas) error // Balances correspond to a Round, which mean that they also correspond // to a ConsensusParams. This returns those parameters. ConsensusParams() config.ConsensusParams }
Balances allow to move MicroNovas from one address to another and to update balance records, or to access and modify individual balance records After a call to Put (or Move), future calls to Get or Move will reflect the updated balance record(s)
Balances는 MicroNovas를 다른 주소로 옮기고 잔액을 수정할 수 있게 해준다. 혹은 개별 잔액에 접근하거나 수정하게 해준다. Put(또는 Move)을 호출한 후 Get 또는 Move에 대한 향후 호출은 업데이트된 잔액 레코드를 반영합니다.