Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/synthetixio/optimistic-trader
Demo app to script your L2 bot
https://github.com/synthetixio/optimistic-trader
defi ethereum layer2 ovm
Last synced: 11 days ago
JSON representation
Demo app to script your L2 bot
- Host: GitHub
- URL: https://github.com/synthetixio/optimistic-trader
- Owner: Synthetixio
- License: mit
- Created: 2020-05-04T22:34:19.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-05-05T17:24:55.000Z (over 4 years ago)
- Last Synced: 2024-06-05T04:47:32.810Z (6 months ago)
- Topics: defi, ethereum, layer2, ovm
- Language: JavaScript
- Size: 106 KB
- Stars: 9
- Watchers: 17
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Optimistic Trader
1. Clone this repo
1. Create a `.env` file with `PRIVATE_KEY=` followed by your private key (include the `0x`)
1. Tinker with the code
1. Run with `npm start`## Extracting your private key from the site
For your private key, use the `Export Account` button to copy your URL.
![image](https://user-images.githubusercontent.com/799038/81026229-5d751d80-8e47-11ea-87fe-b22d07988f0f.png)
Take this URL, and use it below to see your private key locally
```javascript
const exportLink = 'PASTE YOUR EXPORT ACCOUNT HERE';
console.log(
'Private key is',
ethers.Wallet.fromMnemonic(exportLink.match(/\?account=(.+)$/)[1].replace(/-/g, ' ')).privateKey,
);
```