Skip to main content

delegate_new

Function delegate_new 

Source
pub async fn delegate_new<const NUM_NODES: usize>(
    cfg: &TestConfig<NUM_NODES>,
    token: Address,
    stake_table: Address,
    validator: Address,
    amount: U256,
) -> Result<impl Provider + Clone + use<NUM_NODES>>
Expand description

Funds a fresh delegator account (ETH via anvil, ESP from the deployer) and delegates amount to validator. Returns the delegator’s provider so the test can later undelegate.