makeRefMaker =
    refGetter =>
    /**
     * @param {T} x
     * @returns {Promise<T>}
     */
    async x => {
      lastNonce += 1;
      const myNonce = lastNonce;
      const val = await x;
      nonceToRef.set(myNonce, harden(val));
      return E(refGetter).getRef(myNonce);
    }
@template T
@param {ERef<{ getRef(nonce: number): T }>} refGetter