2

I want to achieve three functions but I do not know how to build the staking payload and send transaction,

The three functions are these: The one is becoming a nominator and staking my amount; The two is appending the staking my amount; The three is unbounding my staking amount;

3
  • Could you try to rephrase your question, and remove the unnecessary code-block formatting? This is hardly readable. Commented Oct 12, 2022 at 8:23
  • ok,please look up
    – Rose
    Commented Oct 12, 2022 at 8:28
  • substrate.stackexchange.com/q/1871/139 Should help you out using the polkadot js api client. Commented Nov 12, 2022 at 19:36

1 Answer 1

1

I suggest you to familiarize yourself with the following resources:

Regarding the three 'functions' you want to achieve, I believe it should be done the following way:

  1. "becoming a nominator and staking my amount" -> api.tx.staking.bond(..) and then api.tx.staking.nominate(..),
  2. "appending the staking my amount" -> api.tx.staking.bondExtra(..),
  3. "unbounding my staking amount" -> api.tx.staking.unbound(..) and the api.tx.staking.withdrawUnbounded(..)

Regarding the "staking payload" I don't really know what that means and if it's necessary.

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.