-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix functions response (skip deploy)
- Loading branch information
1 parent
089e415
commit 6c55280
Showing
20 changed files
with
1,824 additions
and
307 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,22 +1,21 @@ | ||
import { ethers } from 'hardhat' | ||
import { CasimirFactory, CasimirUpkeep, FunctionsBillingRegistry } from '../build/@types' | ||
import { CasimirFactory, CasimirUpkeep } from '../build/@types' | ||
import ICasimirFactoryAbi from '../build/abi/ICasimirFactory.json' | ||
import ICasimirUpkeepAbi from '../build/abi/ICasimirUpkeep.json' | ||
import FunctionsBillingRegistryAbi from '../build/abi/FunctionsBillingRegistry.json' | ||
import FunctionsOracleAbi from '../build/abi/FunctionsOracle.json' | ||
import { ETHEREUM_CONTRACTS, ETHEREUM_RPC_URL } from '@casimir/env' | ||
|
||
void async function() { | ||
if (!process.env.ETHEREUM_RPC_URL) throw new Error('No ethereum rpc url provided') | ||
const [owner, , donTransmitter] = await ethers.getSigners() | ||
process.env.ETHEREUM_RPC_URL = ETHEREUM_RPC_URL['TESTNET'] | ||
process.env.FUNCTIONS_BILLING_REGISTRY_ADDRESS = ETHEREUM_CONTRACTS['TESTNET'].FUNCTIONS_BILLING_REGISTRY_ADDRESS | ||
process.env.FUNCTIONS_ORACLE_ADDRESS = ETHEREUM_CONTRACTS['TESTNET'].FUNCTIONS_ORACLE_ADDRESS | ||
const [owner] = await ethers.getSigners() | ||
const provider = new ethers.providers.JsonRpcProvider(ETHEREUM_RPC_URL['TESTNET']) | ||
|
||
const factory = new ethers.Contract(ETHEREUM_CONTRACTS['TESTNET'].FACTORY_ADDRESS, ICasimirFactoryAbi, provider) as CasimirFactory | ||
const [managerId] = await factory.getManagerIds() | ||
const managerConfig = await factory.getManagerConfig(managerId) | ||
const upkeep = new ethers.Contract(managerConfig.upkeepAddress, ICasimirUpkeepAbi, provider) as CasimirUpkeep | ||
// const resetReport = await upkeep.connect(owner).resetReport(0, 0, 0, 0, 0) | ||
// await resetReport.wait() | ||
// const requestReport = await upkeep.connect(owner).requestReport() | ||
// await requestReport.wait() | ||
const requestReport = await upkeep.connect(owner).requestReport() | ||
await requestReport.wait() | ||
}() |
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.