diff --git a/publish/ABI/IndexerRegistry.json b/publish/ABI/IndexerRegistry.json index 1006c7a2..89c9e59b 100644 --- a/publish/ABI/IndexerRegistry.json +++ b/publish/ABI/IndexerRegistry.json @@ -145,58 +145,6 @@ "name": "UpdateMetadata", "type": "event" }, - { - "inputs": [], - "name": "PER_BILL", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PER_MILL", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PER_TRILL", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ZERO_ADDRESS", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { diff --git a/publish/ABI/InflationController.json b/publish/ABI/InflationController.json index 5c4c0c42..5cfc73dd 100644 --- a/publish/ABI/InflationController.json +++ b/publish/ABI/InflationController.json @@ -37,58 +37,6 @@ "name": "OwnershipTransferred", "type": "event" }, - { - "inputs": [], - "name": "PER_BILL", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PER_MILL", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PER_TRILL", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ZERO_ADDRESS", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "inflationDestination", diff --git a/publish/ABI/PurchaseOfferMarket.json b/publish/ABI/PurchaseOfferMarket.json index be95a55f..2e8e4597 100644 --- a/publish/ABI/PurchaseOfferMarket.json +++ b/publish/ABI/PurchaseOfferMarket.json @@ -142,58 +142,6 @@ "name": "PurchaseOfferCreated", "type": "event" }, - { - "inputs": [], - "name": "PER_BILL", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PER_MILL", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PER_TRILL", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ZERO_ADDRESS", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { diff --git a/publish/ABI/RewardsDistributer.json b/publish/ABI/RewardsDistributer.json index 432317b1..5032ad0d 100644 --- a/publish/ABI/RewardsDistributer.json +++ b/publish/ABI/RewardsDistributer.json @@ -118,58 +118,6 @@ "name": "RewardsChanged", "type": "event" }, - { - "inputs": [], - "name": "PER_BILL", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PER_MILL", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PER_TRILL", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ZERO_ADDRESS", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { diff --git a/publish/ABI/RewardsPool.json b/publish/ABI/RewardsPool.json index 136a296d..90a13fe6 100644 --- a/publish/ABI/RewardsPool.json +++ b/publish/ABI/RewardsPool.json @@ -112,58 +112,6 @@ "name": "OwnershipTransferred", "type": "event" }, - { - "inputs": [], - "name": "PER_BILL", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PER_MILL", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PER_TRILL", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ZERO_ADDRESS", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "alphaDenominator", diff --git a/publish/ABI/RewardsStaking.json b/publish/ABI/RewardsStaking.json index 03146814..779cc267 100644 --- a/publish/ABI/RewardsStaking.json +++ b/publish/ABI/RewardsStaking.json @@ -94,58 +94,6 @@ "name": "StakeChanged", "type": "event" }, - { - "inputs": [], - "name": "PER_BILL", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PER_MILL", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PER_TRILL", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ZERO_ADDRESS", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { diff --git a/publish/ABI/ServiceAgreementExtra.json b/publish/ABI/ServiceAgreementExtra.json index 8e6d3752..aa6a3a6b 100644 --- a/publish/ABI/ServiceAgreementExtra.json +++ b/publish/ABI/ServiceAgreementExtra.json @@ -62,58 +62,6 @@ "name": "OwnershipTransferred", "type": "event" }, - { - "inputs": [], - "name": "PER_BILL", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PER_MILL", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PER_TRILL", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ZERO_ADDRESS", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { diff --git a/publish/ABI/Settings.json b/publish/ABI/Settings.json index a81ec2bf..cc575eb7 100644 --- a/publish/ABI/Settings.json +++ b/publish/ABI/Settings.json @@ -31,58 +31,6 @@ "name": "OwnershipTransferred", "type": "event" }, - { - "inputs": [], - "name": "PER_BILL", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PER_MILL", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PER_TRILL", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ZERO_ADDRESS", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { diff --git a/publish/ABI/Staking.json b/publish/ABI/Staking.json index b4a54d8c..63b63897 100644 --- a/publish/ABI/Staking.json +++ b/publish/ABI/Staking.json @@ -180,58 +180,6 @@ "name": "UnbondWithdrawn", "type": "event" }, - { - "inputs": [], - "name": "PER_BILL", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PER_MILL", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PER_TRILL", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ZERO_ADDRESS", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { diff --git a/scripts/startup.ts b/scripts/startup.ts index 623a820f..9402b64d 100644 --- a/scripts/startup.ts +++ b/scripts/startup.ts @@ -5,10 +5,8 @@ import Pino from 'pino'; import { argv, setupCommon } from './setup'; -import Token from '../artifacts/contracts/root/SQToken.sol/SQToken.json'; import { ContractSDK, PolygonSDK, SubqueryNetwork } from '../build'; import { METADATA_HASH } from '../test/constants'; -import startupKeplerConfig from './config/startup.kepler.json'; import startupMainnetConfig from './config/startup.mainnet.json'; import startupTestnetConfig from './config/startup.testnet.json'; @@ -17,7 +15,6 @@ import { MockProvider } from "ethereum-waffle"; import { parseEther } from 'ethers/lib/utils'; import { getLogger } from './logger'; import { networks } from '../src/networks'; -import { token } from 'src/typechain/@openzeppelin/contracts'; let startupConfig: any = startupTestnetConfig; let logger: Pino.Logger; @@ -63,12 +60,11 @@ async function getAirdropTimeConfig(provider) { async function setupInflation(sdk: PolygonSDK) { logger = getLogger('Token'); logger.info('Set minter'); - //FIXME: error: setMinter is not a function await sdk.sqToken.setMinter(sdk.inflationController.address); - // logger.info('Set inflationDestination'); - // await sendTx((overrides) => sdk.inflationController.setInflationDestination(sdk.polygonDestination.address, overrides)); - // logger.info('Set xcRecipient'); - // await sendTx((overrides) => sdk.polygonDestination.setXcRecipient(sdk.childToken.address, overrides)); + logger.info('Set inflationDestination'); + await sendTx((overrides) => sdk.inflationController.setInflationDestination(sdk.polygonDestination.address, overrides)); + logger.info('Set xcRecipient'); + await sendTx((overrides) => sdk.polygonDestination.setXcRecipient(sdk.childToken.address, overrides)); } async function tokenDeposit(sdk: PolygonSDK) { @@ -304,11 +300,11 @@ async function setupVesting(sdk: ContractSDK) { const main = async () => { const network = (argv.network ?? 'testnet') as SubqueryNetwork; - const { wallet, rootProvider, childProvider, overrides } = await setupCommon(networks[network]); - const polygonSdk = await PolygonSDK.create(wallet, {root: rootProvider, child: childProvider}, {network: 'testnet'}); + const { wallet, rootProvider, childProvider } = await setupCommon(networks[network]); + const polygonSdk = await PolygonSDK.create(wallet, {root: rootProvider, child: childProvider}, {network: 'testnet'}); const sdk = ContractSDK.create(wallet.connect(childProvider), { network }); - provider = childProvider; + provider = argv.target === 'root' ? rootProvider : childProvider; switch (network) { case 'mainnet':