Skip to content

Commit

Permalink
chore: add nativePrices default
Browse files Browse the repository at this point in the history
  • Loading branch information
0xTimepunk committed Jan 18, 2024
1 parent 201cc0b commit ab5040b
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions script/Abstract.Deploy.Single.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ abstract contract AbstractDeploySingle is Script {

uint256 public constant milionTokensE18 = 1 ether;

/// @dev check https://api-utils.superform.xyz/docs#/Utils/get_gas_prices_gwei_gas_get
uint256[] public gasPrices = [
50_000_000_000, // ETH
3_000_000_000, // BSC
Expand All @@ -266,6 +267,18 @@ abstract contract AbstractDeploySingle is Script {
4 * 10e9 // GNOSIS
];

/// @dev check https://api-utils.superform.xyz/docs#/Utils/get_native_prices_chainlink_native_get
uint256[] public nativePrices = [
253_400_000_000, // ETH
31_439_000_000, // BSC
3_529_999_999, // AVAX
81_216_600, // POLY
253_400_000_000, // ARBI
253_400_000_000, // OP
253_400_000_000, // BASE
4 * 10e9 // GNOSIS
];

/*//////////////////////////////////////////////////////////////
CHAINLINK VARIABLES
//////////////////////////////////////////////////////////////*/
Expand Down Expand Up @@ -658,7 +671,10 @@ abstract contract AbstractDeploySingle is Script {
PaymentHelper(payable(vars.paymentHelper)).updateRemoteChain(
vars.chainId, 1, abi.encode(PRICE_FEEDS[vars.chainId][vars.chainId])
);
/// 500000000000
PaymentHelper(payable(vars.paymentHelper)).updateRemoteChain(
vars.chainId, 7, abi.encode(nativePrices[trueIndex])
);

PaymentHelper(payable(vars.paymentHelper)).updateRemoteChain(vars.chainId, 8, abi.encode(gasPrices[trueIndex]));

/// @dev gas per byte
Expand Down Expand Up @@ -932,8 +948,7 @@ abstract contract AbstractDeploySingle is Script {
vars.dstChainId == ARBI ? 1_000_000 : 200_000,
vars.dstChainId == ARBI ? 1_000_000 : 200_000,
vars.dstChainId == ARBI ? 750_000 : 150_000,
12e8,
/// 12 usd
nativePrices[vars.dstTrueIndex],
gasPrices[vars.dstTrueIndex],
750,
2_000_000,
Expand Down

0 comments on commit ab5040b

Please sign in to comment.