Documentation ¶
Index ¶
- Constants
- Variables
- func DecodeEvent(buffer *bytes.Buffer) types.Event
- func NewEventTransactionFeePaid(account types.PublicKey, actualFee types.Balance, tip types.Balance) types.Event
- func QueryCallFeeDetails(dataPtr int32, dataLen int32) int64
- func QueryCallInfo(dataPtr int32, dataLen int32) int64
- func QueryFeeDetails(dataPtr int32, dataLen int32) int64
- func QueryInfo(dataPtr int32, dataLen int32) int64
- type ChargeTransactionPayment
- func (ctp ChargeTransactionPayment) AdditionalSigned() (ok sc.Empty, err primitives.TransactionValidityError)
- func (ctp ChargeTransactionPayment) PostDispatch(pre sc.Option[primitives.Pre], info *primitives.DispatchInfo, ...) (primitives.Pre, primitives.TransactionValidityError)
- func (ctp ChargeTransactionPayment) PreDispatch(who *primitives.Address32, call *primitives.Call, ...) (ok primitives.Pre, err primitives.TransactionValidityError)
- func (ctp ChargeTransactionPayment) Validate(who *primitives.Address32, call *primitives.Call, ...) (primitives.ValidTransaction, primitives.TransactionValidityError)
Constants ¶
const (
EventTransactionFeePaid sc.U8 = iota
)
TransactionPayment module events.
Variables ¶
var DefaultMultiplierValue = sc.NewU128FromUint64(1)
var DefaultTip = sc.NewU128FromUint64(0)
Functions ¶
func QueryCallFeeDetails ¶
QueryCallFeeDetails queries the detailed fee of a dispatch call. It takes two arguments: - dataPtr: Pointer to the data in the Wasm memory. - dataLen: Length of the data. which represent the SCALE-encoded dispatch call and its length. Returns a pointer-size of the SCALE-encoded detailed fee. [Specification](https://spec.polkadot.network/chap-runtime-api#sect-rte-transactionpaymentcallapi-query-call-fee-details)
func QueryCallInfo ¶
QueryCallInfo queries the data of a dispatch call. It takes two arguments: - dataPtr: Pointer to the data in the Wasm memory. - dataLen: Length of the data. which represent the SCALE-encoded dispatch call and its length. Returns a pointer-size of the SCALE-encoded weight, dispatch class and partial fee. [Specification](https://spec.polkadot.network/chap-runtime-api#sect-rte-transactionpaymentcallapi-query-call-info)
func QueryFeeDetails ¶
QueryFeeDetails queries the detailed fee of an extrinsic. It takes two arguments: - dataPtr: Pointer to the data in the Wasm memory. - dataLen: Length of the data. which represent the SCALE-encoded extrinsic and its length. Returns a pointer-size of the SCALE-encoded detailed fee. [Specification](https://spec.polkadot.network/chap-runtime-api#sect-rte-transactionpaymentapi-query-fee-details)
func QueryInfo ¶
QueryInfo queries the data of an extrinsic. It takes two arguments: - dataPtr: Pointer to the data in the Wasm memory. - dataLen: Length of the data. which represent the SCALE-encoded extrinsic and its length. Returns a pointer-size of the SCALE-encoded weight, dispatch class and partial fee. [Specification](https://spec.polkadot.network/chap-runtime-api#sect-rte-transactionpaymentapi-query-info)
Types ¶
type ChargeTransactionPayment ¶
type ChargeTransactionPayment primitives.Balance
func (ChargeTransactionPayment) AdditionalSigned ¶
func (ctp ChargeTransactionPayment) AdditionalSigned() (ok sc.Empty, err primitives.TransactionValidityError)
func (ChargeTransactionPayment) PostDispatch ¶
func (ctp ChargeTransactionPayment) PostDispatch(pre sc.Option[primitives.Pre], info *primitives.DispatchInfo, postInfo *primitives.PostDispatchInfo, length sc.Compact, result *primitives.DispatchResult) (primitives.Pre, primitives.TransactionValidityError)
func (ChargeTransactionPayment) PreDispatch ¶
func (ctp ChargeTransactionPayment) PreDispatch(who *primitives.Address32, call *primitives.Call, info *primitives.DispatchInfo, length sc.Compact) (ok primitives.Pre, err primitives.TransactionValidityError)
func (ChargeTransactionPayment) Validate ¶
func (ctp ChargeTransactionPayment) Validate(who *primitives.Address32, call *primitives.Call, info *primitives.DispatchInfo, length sc.Compact) (primitives.ValidTransaction, primitives.TransactionValidityError)