Open odyslam opened 2 years ago
Update: Here is the source file: https://github.com/odyslam/ethtools/blob/feat/flashbots/flashbots.js
This is the addition I needed to make in order to make it work:
if (anyGlobal._FlashbotsBundleProvider == null) {
anyGlobal._FlashbotsBundleProvider = FlashbotsBundleProvider;
anyGlobal._FlashbotsBundleResolution = FlashbotsBundleResolution;
}
The file is the result of compiling the typescript library and then using browserify --standalone
.
Hey everyone,
I have been trying to experiment with a browser-friendly version of this, using tools such as
browserify
.Up to this point, I have been unsuccessful. Things I have tried:
browserify -p esmify --standalone flashbots_old.js -o flashbots.js
browserify index.ts -p [ tsify --noImplicitAny esmify ] > bundle.js
I want to make a nice little tool for https://ethtools.odyslam.com
EDIT: After several hours, I manually edited the output bundle.js and managed to make the Flashbots objects available in
window
. Will update this issue when I have a working PoC. Might be interesting.