Nomination Pools
https://platform.beta.enjin.io/graphql
Nomination pools live on the Relaychain — pass chain: RELAY on every mutation in this section. To read pool state, see Nomination Pool Queries.
Both actions below are submitted through CreateTransaction, with the action selected by the field set on the transaction input. The response is always a Transaction.
nominationPoolsBond
Bonds ENJ into a pool. Provide either amount (a specific quantity, in the smallest ENJ unit) or fill: true (bond the signer's entire free balance).
- Bond a specific amount
- Bond everything
- Response
mutation NominationPoolsBond {
CreateTransaction(
network: ENJIN
chain: RELAY
transaction: {
nominationPoolsBond: {
id: 1
amount: 5000000000000000000000 # 5,000 ENJ
}
}
) {
uuid
action
state
}
}
mutation NominationPoolsBondFill {
CreateTransaction(
network: ENJIN
chain: RELAY
transaction: {
nominationPoolsBond: {
id: 1
fill: true
}
}
) {
uuid
action
state
}
}
{
"data": {
"CreateTransaction": {
"uuid": "a90ded41-4262-40a2-95c0-98255b660bf1",
"action": "NominationPools.bond",
"state": "PENDING"
}
}
}
The pool must be in the OPEN state — see GetNominationPool.state.
nominationPoolsUnbond
Unbonds a quantity of pool "points" from a pool the signer is a member of. Pool points are an internal accounting unit; the equivalent ENJ amount becomes spendable after the chain's unbonding period.
- GraphQL
mutation NominationPoolsUnbond {
CreateTransaction(
network: ENJIN
chain: RELAY
transaction: {
nominationPoolsUnbond: {
id: 1
unbondingPoints: 5000000000000000000000
}
}
) {
uuid
action
state
}
}
The unbonded amount appears in GetAccountPools.totalUnbonding until the unbonding period elapses.