-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VRF: Settings, CLI, deployment (#171)
* docs: Update adapter and aggregator options * docs: How to setup VRF keys * docs: How to setup node * feat: Update VRF deployment * chore: Specify var names: `paymentConfig` -> `directPaymentConfig` * refactor: Reorder functions in VRF deployment * chore: eslint * chore: Bump up contracts 0.2.0 -> 0.3.0 * chore: Remove outdated setting variables * docs: Temporal fix for overriding `CHAIN` env var * feat: Add named account `vrfOracle0` * fix: Remove default hardhat account for deployer * feat: Allow to deploy Prepayment anywhere * feat: Deploy consumer mocks only to local network * feat: Copy solidity files to `dist/` * docs: How to setup listener * feat: Copy non-js files through `files` directive in package.json * chore: Fix formatting
- Loading branch information
1 parent
2f52822
commit 9fd99cf
Showing
20 changed files
with
254 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"minimumRequestConfirmations": 3, | ||
"maxGasLimit": 2500000, | ||
"gasAfterPaymentCalculation": 33285, | ||
"feeConfig": { | ||
"fulfillmentFlatFeeKlayPPMTier1": 0, | ||
"fulfillmentFlatFeeKlayPPMTier2": 0, | ||
"fulfillmentFlatFeeKlayPPMTier3": 0, | ||
"fulfillmentFlatFeeKlayPPMTier4": 0, | ||
"fulfillmentFlatFeeKlayPPMTier5": 0, | ||
"reqsForTier2": 0, | ||
"reqsForTier3": 0, | ||
"reqsForTier4": 0, | ||
"reqsForTier5": 0 | ||
}, | ||
"directPaymentConfig": { | ||
"fulfillmentFee": "0", | ||
"baseFee": "0" | ||
}, | ||
"oracle": [ | ||
{ | ||
"address": "0xdD2FD4581271e230360230F9337D5c0430Bf44C0", | ||
"publicProvingKey": [ | ||
"95162740466861161360090244754314042169116280320223422208903791243647772670481", | ||
"53113177277038648369733569993581365384831203706597936686768754351087979105423" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
localhost |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
interface IDirectPaymentConfig { | ||
fulfillmentFee: string | ||
baseFee: string | ||
} | ||
|
||
interface IFeeConfig { | ||
fulfillmentFlatFeeKlayPPMTier1: number | ||
fulfillmentFlatFeeKlayPPMTier2: number | ||
fulfillmentFlatFeeKlayPPMTier3: number | ||
fulfillmentFlatFeeKlayPPMTier4: number | ||
fulfillmentFlatFeeKlayPPMTier5: number | ||
reqsForTier2: number | ||
reqsForTier3: number | ||
reqsForTier4: number | ||
reqsForTier5: number | ||
} | ||
|
||
interface IVrfOracle { | ||
address: string | ||
publicProvingKey: [string, string] | ||
} | ||
|
||
export interface IVrfConfig { | ||
minimumRequestConfirmations: number | ||
maxGasLimit: number | ||
gasAfterPaymentCalculation: number | ||
feeConfig: IFeeConfig | ||
paymentConfig: IDirectPaymentConfig | ||
oracle: IVrfOracle[] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { readFile } from 'node:fs/promises' | ||
|
||
export async function loadJson(filepath: string) { | ||
const json = await readFile(filepath, 'utf8') | ||
return JSON.parse(json) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.