Ordering is important
import { FIFOStrategy } from "@stackr/stackr-js"; const buildStrategy = new FIFOStrategy();
BaseStrategy
orderTxLogic
import { BaseStrategy } from "@stackr/stackr-js"; export class Randomize extends BaseStrategy { constructor() { super("RandomOrder"); } async orderTxLogic( actions: Action<AllowedInputTypes>[] ): Promise<Action<AllowedInputTypes>[]> { console.log("Random"); return Promise.resolve( actions.sort(() => { return 0.5 - Math.random(); }) ); } }