diff --git a/packages/contracts/hardhat.config.js b/packages/contracts/hardhat.config.js index 3ddc379e1..858c27bbc 100644 --- a/packages/contracts/hardhat.config.js +++ b/packages/contracts/hardhat.config.js @@ -69,10 +69,21 @@ module.exports = { getSecret('ACCOUNT2_PRIVATEKEY', '0x3ec7cedbafd0cb9ec05bf9f7ccfa1e8b42b3e3a02c75addfccbfeb328d1b383b') ] }, + bob_mainnet: { + url: "https://rpc.gobob.xyz/", + chainId: 60808, + accounts: [ + getSecret('DEPLOYER_PRIVATEKEY', '0x60ddfe7f579ab6867cbe7a2dc03853dc141d7a4ab6dbefc0dae2d2b1bd4e487f'), + getSecret('ACCOUNT2_PRIVATEKEY', '0x3ec7cedbafd0cb9ec05bf9f7ccfa1e8b42b3e3a02c75addfccbfeb328d1b383b') + ] + }, }, etherscan: { apiKey: { - bob_testnet: getSecret("ETHERSCAN_API_KEY") + hardhat: getSecret("ETHERSCAN_API_KEY"), + mainnet: getSecret("ETHERSCAN_API_KEY"), + bob_testnet: getSecret("ETHERSCAN_API_KEY"), + bob_mainnet: getSecret("ETHERSCAN_API_KEY"), }, customChains: [ { @@ -83,6 +94,14 @@ module.exports = { browserURL: "https://testnet.rpc.gobob.xyz" } }, + { + network: "bob_mainnet", + chainId: 60808, + urls: { + apiURL: "https://explorer.gobob.xyz/api?", + browserURL: "https://rpc.gobob.xyz" + } + }, ], }, mocha: { diff --git a/packages/lib-ethers/deployments/default/eth/v1/bob_mainnet.json b/packages/lib-ethers/deployments/default/eth/v1/bob_mainnet.json new file mode 100644 index 000000000..ce9d4767e --- /dev/null +++ b/packages/lib-ethers/deployments/default/eth/v1/bob_mainnet.json @@ -0,0 +1,28 @@ +{ + "chainId": 60808, + "version": "v1", + "collateralSymbol": "eth", + "deploymentDate": 1716407799750, + "_useRealPriceFeed": true, + "_isDev": false, + "startBlock": 1772909, + "addresses": { + "activePool": "0x74cAe6Bfb8935bB898Bb3981e121a7791e1FD0Aa", + "borrowerOperations": "0xA959C0A2FE89a9dBC5eAE89a0e1ED4E2D3F12ACd", + "troveManager": "0xA6723A3772219Ae0F8bb9cc4C829EECa5BcdFBcE", + "collSurplusPool": "0x588B92ACf15795e238D22ACA6b5772165f06dF30", + "defaultPool": "0x8D4f9920254FCfd4c6864068aE7D6dBd0D0D494f", + "hintHelpers": "0xAc513297c2108aF38a48A53fF5077610908B91D7", + "pcv": "0x385459cd32D932f8E8841F002B4492f2137aA73d", + "sortedTroves": "0xc8457428677F6Ea8f21DC1af31f79546A955bD6e", + "stabilityPool": "0xdAaD48ac23d562b1AFFcb7b03D6Ad5508ab71172", + "bLens": "0x37a1908f9A08F74B767D7f4f2DE3d5eB1a24dEE6", + "gasPool": "0x7162552eA1E2d74315885766E72257B892910035", + "erc20": "0x0000000000000000000000000000000000000000", + "priceFeed": "0xcB719242506c05e9ACCecD7EA1C09168B5c2A2Bc", + "chainlink": "0x3318adE690b5A1029c2dF032FCe52D455e437514", + "multiTroveGetter": "0x17125a77719D57A1f76b4984EEbbba386D2560F4", + "thusdToken": "0xf7EF136751D7496021858c048FFA4f978C27831A", + "bamm": "0x341201FA8386d75b050B34400683aAa1Aac26658" + } +} \ No newline at end of file diff --git a/packages/lib-ethers/deployments/default/tbtc/v1/bob_mainnet.json b/packages/lib-ethers/deployments/default/tbtc/v1/bob_mainnet.json new file mode 100644 index 000000000..080689538 --- /dev/null +++ b/packages/lib-ethers/deployments/default/tbtc/v1/bob_mainnet.json @@ -0,0 +1,28 @@ +{ + "chainId": 60808, + "version": "v1", + "collateralSymbol": "tbtc", + "deploymentDate": 1716407896574, + "_useRealPriceFeed": true, + "_isDev": false, + "startBlock": 1772958, + "addresses": { + "activePool": "0x4693Dd3E061a2d9d6d080503a44Bf42a73ACB0fe", + "borrowerOperations": "0x4E2289DBae36Adc17b2c9F2704c83C35848Ea4E3", + "troveManager": "0xC15A4e2c21125Fea88a182537d58636E5d69D452", + "collSurplusPool": "0x8feDdC5121ECBe242DCe5e53d960788D394c580a", + "defaultPool": "0x11D74523c0Af89076b96056FEBeCC4A461cF800F", + "hintHelpers": "0x67b8Edd47Cc87e7d315bEC2b654F6dAaF2C3Ba34", + "pcv": "0x6AF40236a4A7807801bc44Be5dc4A2975Ab0f849", + "sortedTroves": "0x61eaE74d5C5b1445D91A00a8d7988571c8282B01", + "stabilityPool": "0x1Fe1386a25782A4Cb1d201c3f32B311B7807a073", + "bLens": "0x4C6f20A126d9Ea256De9E9Add60f2CCDBC2C2275", + "gasPool": "0xEDae0f8A5D1Ab59a6487Fe907C4cD7E710E38679", + "erc20": "0xBBa2eF945D523C4e2608C9E1214C2Cc64D4fc2e2", + "priceFeed": "0xB79dd575019fDe00F1F1B16B285C67684A8d5F07", + "chainlink": "0x87C80adC0E1cf4696B8850c8aE7B43Eb2781Ba1f", + "multiTroveGetter": "0x04e90ddAF257847B11731963e6c24Cf6521B96c3", + "thusdToken": "0xf7EF136751D7496021858c048FFA4f978C27831A", + "bamm": "0x6c2dcbB285d4c660AbF748f2d56B1562A3E5497f" + } +} \ No newline at end of file diff --git a/packages/lib-ethers/hardhat.config.ts b/packages/lib-ethers/hardhat.config.ts index 2d36ef0a7..94d99e285 100644 --- a/packages/lib-ethers/hardhat.config.ts +++ b/packages/lib-ethers/hardhat.config.ts @@ -127,12 +127,12 @@ export const oracleAddresses: INetworkOracles = { }, bob_mainnet: { tbtc: { - chainlinkCompatible: "0x77b5887f0f545cdfaf62e168c10a8ef1c4934c2c", - tellor: "0xC866DB9021fe81856fF6c5B3E3514BF9D1593D81" + chainlinkCompatible: "0x2d484E029b8Ae5cA6335DAe11fC726B232bE87D1", + tellor: "0x896419Ed2E0dC848a1f7d2814F4e5Df4b9B9bFcc" }, eth: { - chainlinkCompatible: "0x77b5887f0f545cdfaf62e168c10a8ef1c4934c2c", - tellor: "0xC866DB9021fe81856fF6c5B3E3514BF9D1593D81" + chainlinkCompatible: "0x2d484E029b8Ae5cA6335DAe11fC726B232bE87D1", + tellor: "0x896419Ed2E0dC848a1f7d2814F4e5Df4b9B9bFcc" } }, bob_testnet: { @@ -378,7 +378,7 @@ task("deploy", "Deploys the contracts to the network") console.log(`Hooking up PriceFeed with oracles ...`); const tx = await contracts.priceFeed.setAddresses( - oracleAddresses[env.network.name][deployment.collateralSymbol as keyof IAssets].chainlinkCompatible, + deployment.addresses.chainlink, tellorCallerAddress, overrides ); diff --git a/packages/lib-ethers/live/PriceFeedBase.json b/packages/lib-ethers/live/PriceFeedBase.json new file mode 100644 index 000000000..883d68f6c --- /dev/null +++ b/packages/lib-ethers/live/PriceFeedBase.json @@ -0,0 +1,186 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "PriceFeedBase", + "sourceName": "contracts/BOB/PriceFeedBase.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_redstoneAdapterAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_dataFeedId", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "UnsafeUint256ToUint80Conversion", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "UnsafeUintToIntConversion", + "type": "error" + }, + { + "inputs": [], + "name": "dataFeedId", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "description", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint80", + "name": "_requestedRoundId", + "type": "uint80" + } + ], + "name": "getRoundData", + "outputs": [ + { + "internalType": "uint80", + "name": "roundId", + "type": "uint80" + }, + { + "internalType": "int256", + "name": "answer", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "startedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "updatedAt", + "type": "uint256" + }, + { + "internalType": "uint80", + "name": "answeredInRound", + "type": "uint80" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "latestRoundData", + "outputs": [ + { + "internalType": "uint80", + "name": "roundId", + "type": "uint80" + }, + { + "internalType": "int256", + "name": "answer", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "startedAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "updatedAt", + "type": "uint256" + }, + { + "internalType": "uint80", + "name": "answeredInRound", + "type": "uint80" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "redstoneAdapter", + "outputs": [ + { + "internalType": "contract IRedstoneAdapter", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + } + ], + "bytecode": "0x60c060405234801561001057600080fd5b5060405161078c38038061078c83398101604081905261002f916100fc565b6100388261004e565b6001600160a01b0390911660805260a052610136565b6001600160a01b0381166100a95760405162461bcd60e51b815260206004820152601e60248201527f4163636f756e742063616e6e6f74206265207a65726f2061646472657373000060448201526064015b60405180910390fd5b803b806100f85760405162461bcd60e51b815260206004820181905260248201527f4163636f756e7420636f64652073697a652063616e6e6f74206265207a65726f60448201526064016100a0565b5050565b6000806040838503121561010f57600080fd5b82516001600160a01b038116811461012657600080fd5b6020939093015192949293505050565b60805160a05161060861018460003960008181608b015281816101c2015261041d01526000818161014301528181610193015281816102c70152818161035c015261045001526106086000f3fe608060405234801561001057600080fd5b506004361061006d5760003560e01c8063313ce56714610072578063370c826b1461008657806354fd4d50146100bb5780637284e416146100c25780639a6fc8f5146100f7578063cce6f5071461013e578063feaf968c1461017d575b600080fd5b604051600881526020015b60405180910390f35b6100ad7f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161007d565b60016100ad565b60408051808201825260138152721499591cdd1bdb9948141c9a58d94811995959606a1b6020820152905161007d91906104e8565b61010a610105366004610536565b610185565b604080516001600160501b03968716815260208101959095528401929092526060830152909116608082015260a00161007d565b6101657f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161007d565b61010a6102a7565b6000806000806000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166326bf15ff7f00000000000000000000000000000000000000000000000000000000000000008b6040518363ffffffff1660e01b81526004016102119291909182526001600160501b0316602082015260400190565b606060405180830381865afa15801561022e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610252919061057d565b9250925092508897506001600160ff1b0383111561028b5760405163eccac09b60e01b8152600481018490526024015b60405180910390fd5b969891976001600160801b039182169790911695509350915050565b60008060008060006102b7610357565b94506102c161040e565b935060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631b2758ee6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610323573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061034791906105b9565b9596949594859450879350915050565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638c3b990b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103dc91906105b9565b90506001600160501b03811115610409576040516307a4f91f60e21b815260048101829052602401610282565b919050565b60405163227014c160e11b81527f0000000000000000000000000000000000000000000000000000000000000000600482015260009081906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906344e0298290602401602060405180830381865afa158015610497573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104bb91906105b9565b90506001600160ff1b038111156104095760405163eccac09b60e01b815260048101829052602401610282565b600060208083528351808285015260005b81811015610515578581018301518582016040015282016104f9565b506000604082860101526040601f19601f8301168501019250505092915050565b60006020828403121561054857600080fd5b81356001600160501b038116811461055f57600080fd5b9392505050565b80516001600160801b038116811461040957600080fd5b60008060006060848603121561059257600080fd5b835192506105a260208501610566565b91506105b060408501610566565b90509250925092565b6000602082840312156105cb57600080fd5b505191905056fea2646970667358221220aee19fb1f458226be6a2b162e52b4f69f18dbd4d7d10eb7c8ec6c83064177e0964736f6c63430008110033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061006d5760003560e01c8063313ce56714610072578063370c826b1461008657806354fd4d50146100bb5780637284e416146100c25780639a6fc8f5146100f7578063cce6f5071461013e578063feaf968c1461017d575b600080fd5b604051600881526020015b60405180910390f35b6100ad7f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161007d565b60016100ad565b60408051808201825260138152721499591cdd1bdb9948141c9a58d94811995959606a1b6020820152905161007d91906104e8565b61010a610105366004610536565b610185565b604080516001600160501b03968716815260208101959095528401929092526060830152909116608082015260a00161007d565b6101657f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161007d565b61010a6102a7565b6000806000806000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166326bf15ff7f00000000000000000000000000000000000000000000000000000000000000008b6040518363ffffffff1660e01b81526004016102119291909182526001600160501b0316602082015260400190565b606060405180830381865afa15801561022e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610252919061057d565b9250925092508897506001600160ff1b0383111561028b5760405163eccac09b60e01b8152600481018490526024015b60405180910390fd5b969891976001600160801b039182169790911695509350915050565b60008060008060006102b7610357565b94506102c161040e565b935060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631b2758ee6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610323573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061034791906105b9565b9596949594859450879350915050565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638c3b990b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103dc91906105b9565b90506001600160501b03811115610409576040516307a4f91f60e21b815260048101829052602401610282565b919050565b60405163227014c160e11b81527f0000000000000000000000000000000000000000000000000000000000000000600482015260009081906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906344e0298290602401602060405180830381865afa158015610497573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104bb91906105b9565b90506001600160ff1b038111156104095760405163eccac09b60e01b815260048101829052602401610282565b600060208083528351808285015260005b81811015610515578581018301518582016040015282016104f9565b506000604082860101526040601f19601f8301168501019250505092915050565b60006020828403121561054857600080fd5b81356001600160501b038116811461055f57600080fd5b9392505050565b80516001600160801b038116811461040957600080fd5b60008060006060848603121561059257600080fd5b835192506105a260208501610566565b91506105b060408501610566565b90509250925092565b6000602082840312156105cb57600080fd5b505191905056fea2646970667358221220aee19fb1f458226be6a2b162e52b4f69f18dbd4d7d10eb7c8ec6c83064177e0964736f6c63430008110033", + "linkReferences": {}, + "deployedLinkReferences": {} +}