2

why cause this?

result, err := client.SignedExtrinsic(
    "0x186c09cac19834761b573b238b6542257d05b1fc5a57688311345d8cdf7e488d",
    "5FjKC4iC797yUWmFJuirEWqvVA2ABy3d41ugxZfHyrHs2AYx",
    "113000000000000000000",
    "0",
)
if err != nil {
    panic(err)
}
info, err := client.PaymentQueryInfo(result)
if err != nil {
    panic(err)
}
fmt.Println(info.PartialFee)
2
  • What do you mean by "during runtime upgrade"?
    – AurevoirXavier
    Apr 19, 2023 at 7:19
  • when use the system set_code call to upgrade runtime
    – Abel
    Apr 19, 2023 at 7:24

1 Answer 1

1

The set_code's weight is extremely large.

https://github.com/paritytech/substrate/blob/88e2c9e3935c3951da3c6e3bdb8fb1ae74dc1258/frame/system/src/lib.rs#L400

As you can see, it uses all the weight of a block. So, you need to pay a lot of fees for that.

1
  • you means ,when network runtime is upgrading, the transfer native token gas fee weight = system.set_code gas w + Binance transfer ?
    – Abel
    Apr 19, 2023 at 7:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.