Skip to main content

Nomination Pools

GraphQL Endpoint

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).

mutation NominationPoolsBond {
CreateTransaction(
network: ENJIN
chain: RELAY
transaction: {
nominationPoolsBond: {
id: 1
amount: 5000000000000000000000 # 5,000 ENJ
}
}
) {
uuid
action
state
}
}

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.

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.