Fix oracle swap example and add docs (#856)
This commit is contained in:
parent
11cb14ca76
commit
925f606550
|
@ -65,20 +65,30 @@ forge inspect OracleSwap abi > ../app/src/abi/OracleSwapAbi.json
|
|||
|
||||
## Frontend Application
|
||||
|
||||
All of the commands in this section assume you are in the `app` directory.
|
||||
|
||||
By default, the frontend is configured to use the already deployed version of the oracle AMM
|
||||
at address [`0x15F9ccA28688F5E6Cbc8B00A8f33e8cE73eD7B02`](https://mumbai.polygonscan.com/address/0x15F9ccA28688F5E6Cbc8B00A8f33e8cE73eD7B02) on Polygon Mumbai.
|
||||
This means you can start playing with the application without going through the steps above (Remember to switch your wallet to Mumbai and to claim funds from a faucet to pay for the gas).
|
||||
|
||||
### Build
|
||||
|
||||
`npm ci`
|
||||
From the root of the pyth-crosschain repository, run:
|
||||
|
||||
```
|
||||
npm ci
|
||||
npx lerna run build
|
||||
```
|
||||
|
||||
This command will install dependencies for all packages within the typescript monorepo, and also build some
|
||||
typescript SDKs that this example depends on.
|
||||
|
||||
### Run
|
||||
|
||||
After building, you can start the frontend by navigating to the `app/` directory and running:
|
||||
|
||||
`npm run start`
|
||||
|
||||
Then navigate your browser to `localhost:3000`.
|
||||
|
||||
### Other configurations:
|
||||
|
||||
optimism goerli addresses
|
||||
|
|
|
@ -201,7 +201,7 @@ async function sendSwapTx(
|
|||
);
|
||||
|
||||
const updateFee = await pythContract.methods
|
||||
.getUpdateFee(priceFeedUpdateData.length)
|
||||
.getUpdateFee(priceFeedUpdateData)
|
||||
.call();
|
||||
|
||||
const swapContract = new web3.eth.Contract(
|
||||
|
|
Loading…
Reference in New Issue