Fee Delegation
WEMIX3.0에 적용된 Fee Delegation에 대한 설명입니다.
Last updated
DynamicFeeTxType Transaction(with signature of Sender) + FeePayer address + signature of FeePayerconst (
LegacyTxType = iota
AccessListTxType
DynamicFeeTxType
FeeDelegateDynamicFeeTxType = 22 //fee delegation
)type FeeDelegateDynamicFeeTx struct {
SenderTx DynamicFeeTx
FeePayer *common.Address rlp:"nil"
// Signature values
FV *big.Int json:"fv" gencodec:"required" // feePayer V
FR *big.Int json:"fr" gencodec:"required" // feePayer R
FS *big.Int json:"fs" gencodec:"required" // feePayer S
}func (s feeDelegateSigner) Hash(tx *Transaction) common.Hash {
senderV, senderR, senderS := tx.RawSignatureValues()
return prefixedRlpHash(
tx.Type(),
[]interface{}{
[]interface{}{
s.chainId,
tx.Nonce(),
tx.GasTipCap(),
tx.GasFeeCap(),
tx.Gas(),
tx.To(),
tx.Value(),
tx.Data(),
tx.AccessList(),
senderV,
senderR,
senderS,
},
tx.FeePayer(),
})
}