Skip to content

Commit

Permalink
Deploy UniswapV2Oracle on side chains
Browse files Browse the repository at this point in the history
  • Loading branch information
zZoMROT committed Mar 27, 2024
1 parent 8401a7e commit 9403054
Show file tree
Hide file tree
Showing 7 changed files with 773 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ If no direct liquidity pair exists between two tokens, the spot price aggregator
* Pancake 2 - [0xB9fa95a38D50c5Bad1eA2b4E85e106Fe886cCb3A](https://bscscan.com/address/0xB9fa95a38D50c5Bad1eA2b4E85e106Fe886cCb3A)
* Pancake 3 - [0xB4039b37d09772801a51764537c167445f52F48b](https://bscscan.com/address/0xB4039b37d09772801a51764537c167445f52F48b)
* Thugswap - [0x7bBc0156c31A19097eEd6B636AA2F4AB8A31BFD9](https://bscscan.com/address/0x7bBc0156c31A19097eEd6B636AA2F4AB8A31BFD9)
* UniswapV2 - [0x4C5B9573dE7660c097F1a21050038378CD691066](https://bscscan.com/address/0x4C5B9573dE7660c097F1a21050038378CD691066)

</details>

Expand Down Expand Up @@ -137,6 +138,7 @@ If no direct liquidity pair exists between two tokens, the spot price aggregator
* ComethSwap - [0x11BFd590f592457b65Eb85327F5938141f61878a](https://polygonscan.com/address/0x11BFd590f592457b65Eb85327F5938141f61878a)
* DFYN - [0xeD55d76Bb48E042a177d1E21AffBe1B72d0c7dB0](https://polygonscan.com/address/0xeD55d76Bb48E042a177d1E21AffBe1B72d0c7dB0)
* SushiSwap - [0x2A45d538f460DDBEeA3a899b0674dA3DFE318faa](https://polygonscan.com/address/0x2A45d538f460DDBEeA3a899b0674dA3DFE318faa)
* UniswapV2 - [0x4C5B9573dE7660c097F1a21050038378CD691066](https://polygonscan.com/address/0x4C5B9573dE7660c097F1a21050038378CD691066)
* UniswapV3 - [0xE85B42805e046D1933EB8e1C543C4da4E5e8fFa3](https://polygonscan.com/address/0xE85B42805e046D1933EB8e1C543C4da4E5e8fFa3)

</details>
Expand Down Expand Up @@ -174,6 +176,7 @@ If no direct liquidity pair exists between two tokens, the spot price aggregator

<details><summary>Supported DEXes</summary>

* UniswapV2 - [0x4C5B9573dE7660c097F1a21050038378CD691066](https://optimistic.etherscan.io/address/0x4C5B9573dE7660c097F1a21050038378CD691066)
* UniswapV3 - [0xE85B42805e046D1933EB8e1C543C4da4E5e8fFa3](https://optimistic.etherscan.io/address/0xE85B42805e046D1933EB8e1C543C4da4E5e8fFa3)
* Velodrome Finance - [0x52a8193C7f42b75F27e4ce96f8ddBA7e854453Ef](https://optimistic.etherscan.io/address/0x52a8193C7f42b75F27e4ce96f8ddBA7e854453Ef)
* VelodromeV2 - [0x41674e58F339fE1caB03CA8DF095D46B998E6125](https://optimistic.etherscan.io/address/0x41674e58F339fE1caB03CA8DF095D46B998E6125)
Expand Down Expand Up @@ -217,6 +220,7 @@ If no direct liquidity pair exists between two tokens, the spot price aggregator

* DXswap - [0xc197Ab9d47206dAf739a47AC75D0833fD2b0f87F](https://arbiscan.io/address/0xc197Ab9d47206dAf739a47AC75D0833fD2b0f87F)
* SushiSwap - [0x2A45d538f460DDBEeA3a899b0674dA3DFE318faa](https://arbiscan.io/address/0x2A45d538f460DDBEeA3a899b0674dA3DFE318faa)
* UniswapV2 - [0x4C5B9573dE7660c097F1a21050038378CD691066](https://arbiscan.io/address/0x4C5B9573dE7660c097F1a21050038378CD691066)
* UniswapV3 - [0xE85B42805e046D1933EB8e1C543C4da4E5e8fFa3](https://arbiscan.io/address/0xE85B42805e046D1933EB8e1C543C4da4E5e8fFa3)

</details>
Expand Down Expand Up @@ -254,6 +258,7 @@ If no direct liquidity pair exists between two tokens, the spot price aggregator
* Joe - [0xc197Ab9d47206dAf739a47AC75D0833fD2b0f87F](https://snowtrace.io/address/0xc197Ab9d47206dAf739a47AC75D0833fD2b0f87F)
* Pangolin - [0xE93293A6088d3a8abDDf62e6CA1A085Cec97D06F](https://snowtrace.io/address/0xE93293A6088d3a8abDDf62e6CA1A085Cec97D06F)
* SushiSwap - [0x2A45d538f460DDBEeA3a899b0674dA3DFE318faa](https://snowtrace.io/address/0x2A45d538f460DDBEeA3a899b0674dA3DFE318faa)
* UniswapV2 = [0x4C5B9573dE7660c097F1a21050038378CD691066](https://snowtrace.io/address/0x4C5B9573dE7660c097F1a21050038378CD691066)

</details>

Expand Down Expand Up @@ -483,6 +488,7 @@ If no direct liquidity pair exists between two tokens, the spot price aggregator
* DackieSwap - [0x48f0E5C5A5f5E5d49f3EaF8f5E242C7550629544](https://basescan.org/address/0x48f0E5C5A5f5E5d49f3EaF8f5E242C7550629544)
* HorizonDex - [0xcdEee819aEf73511331522552Ca1E54e771D40ed](https://basescan.org/address/0xcdEee819aEf73511331522552Ca1E54e771D40ed)
* SushiSwapV3 - [0xf71502f807C37A5aD9bB50aA983423907647bF96](https://basescan.org/address/0xf71502f807C37A5aD9bB50aA983423907647bF96)
* UniswapV2 - [0x4C5B9573dE7660c097F1a21050038378CD691066](https://basescan.org/address/0x4C5B9573dE7660c097F1a21050038378CD691066)
* UniswapV3 - [0xE85B42805e046D1933EB8e1C543C4da4E5e8fFa3](https://basescan.org/address/0xE85B42805e046D1933EB8e1C543C4da4E5e8fFa3)
* VelocimeterV2 - [0x26daCf7E879b18FE658326ddD3ABC0D6910B3E9F](https://basescan.org/address/0x26daCf7E879b18FE658326ddD3ABC0D6910B3E9F)

Expand Down
125 changes: 125 additions & 0 deletions deployments/arbitrum/UniswapV2LikeOracle_Uniswap.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
{
"address": "0x4C5B9573dE7660c097F1a21050038378CD691066",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_factory",
"type": "address"
},
{
"internalType": "bytes32",
"name": "_initcodeHash",
"type": "bytes32"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "ConnectorShouldBeNone",
"type": "error"
},
{
"inputs": [],
"name": "MathOverflowedMulDiv",
"type": "error"
},
{
"inputs": [],
"name": "PoolNotFound",
"type": "error"
},
{
"inputs": [],
"name": "PoolWithConnectorNotFound",
"type": "error"
},
{
"inputs": [],
"name": "FACTORY",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "INITCODE_HASH",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract IERC20",
"name": "srcToken",
"type": "address"
},
{
"internalType": "contract IERC20",
"name": "dstToken",
"type": "address"
},
{
"internalType": "contract IERC20",
"name": "connector",
"type": "address"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "getRate",
"outputs": [
{
"internalType": "uint256",
"name": "rate",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "weight",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
}
],
"receipt": {
"to": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65",
"from": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF",
"contractAddress": null,
"gasUsed": "8661469",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x96bcb677c56f80cba14aa91c5ba4f696bdb9ea7f690b5a0cb2063aadcabf4ddc",
"logs": [],
"blockNumber": 194872800,
"cumulativeGasUsed": "13194945",
"status": 1
},
"args": [
"0xf1D7CC64Fb4452F05c498126312eBE29f30Fbcf9",
"0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f"
],
"numDeployments": 1,
"bytecode": "0x60c03461008957601f61089738819003918201601f19168301916001600160401b0383118484101761008d578084926040948552833981010312610089578051906001600160a01b038216820361008957602001519060805260a0526040516107f590816100a2823960805181818161020e0152610340015260a0518181816072015261036e0152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe6080806040526004361015610012575f80fd5b5f3560e01c9081632dd31000146101c6575080633d549b32146100995763f84618841461003d575f80fd5b34610095575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100955760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b5f80fd5b346100955760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100955773ffffffffffffffffffffffffffffffffffffffff6004358181168103610095576024359082821682036100955760443583811693848203610095576040940361014157506101349161011a9161028d565b919061012e6101298483610232565b61067e565b92610518565b9082519182526020820152f35b9061014f826101599261028d565b919093849361028d565b9283828411156101a25750508061018d61018661017e8561012e9561013498996105ec565b945b85610232565b9186610232565b8082101561019b575061067e565b905061067e565b83955061013494506101866101c08461012e95949661018d946105ec565b96610180565b34610095575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100955760209073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b8181029291811591840414171561024557565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b51906dffffffffffffffffffffffffffff8216820361009557565b73ffffffffffffffffffffffffffffffffffffffff9080821690838316808310156104d5575092915b60405160208101907fffffffffffffffffffffffffffffffffffffffff000000000000000000000000806060968189891b168552871b1660348301526028825285820167ffffffffffffffff938382108583111761049657816040528351902060808401927fff0000000000000000000000000000000000000000000000000000000000000084527f0000000000000000000000000000000000000000000000000000000000000000891b16608185015260958401527f000000000000000000000000000000000000000000000000000000000000000060b58401526055815260e083019181831085841117610496576004838781938b9583604052519020167f0902f1ac0000000000000000000000000000000000000000000000000000000082525afa9586156104ca575f935f97610413575b505050506dffffffffffffffffffffffffffff80911693169316145f1461040f5791565b9091565b919350809296503d83116104c3575b601f81017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016870160e00191821184831017610496578691604052810103126100955761046e90610272565b61012061047e6101008601610272565b94015163ffffffff811603610095575f8080806103eb565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b503d610422565b6040513d5f823e3d90fd5b919350509180916102b6565b81156104eb570490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b670de0b6b3a764000091828202917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848209938380861095039480860395146105dc57848311156105b257829109815f038216809204600280826003021880830282030280830282030280830282030280830282030280830282030280920290030293600183805f03040190848311900302920304170290565b60046040517f227bc153000000000000000000000000000000000000000000000000000000008152fd5b5050906105e992506104e1565b90565b9091828202917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848209938380861095039480860395146105dc57848311156105b257829109815f038216809204600280826003021880830282030280830282030280830282030280830282030280830282030280920290030293600183805f03040190848311900302920304170290565b80156107ba57610748815f908360801c806107ae575b508060401c806107a1575b508060201c80610794575b508060101c80610787575b508060081c8061077a575b508060041c8061076d575b508060021c80610760575b50600191828092811c610759575b1c1b6106f081856104e1565b01811c6106fd81856104e1565b01811c61070a81856104e1565b01811c61071781856104e1565b01811c61072481856104e1565b01811c61073181856104e1565b01811c61073e81856104e1565b01901c80926104e1565b80821015610754575090565b905090565b01816106e4565b600291509101905f6106d6565b600491509101905f6106cb565b600891509101905f6106c0565b601091509101905f6106b5565b602091509101905f6106aa565b604091509101905f61069f565b9150506080905f610694565b505f9056fea264697066735822122096c489e0164a18ff1d44783cb3fda08449be81e505b79bda31b1216a8e06211a64736f6c63430008170033",
"deployedBytecode": "0x6080806040526004361015610012575f80fd5b5f3560e01c9081632dd31000146101c6575080633d549b32146100995763f84618841461003d575f80fd5b34610095575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100955760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b5f80fd5b346100955760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100955773ffffffffffffffffffffffffffffffffffffffff6004358181168103610095576024359082821682036100955760443583811693848203610095576040940361014157506101349161011a9161028d565b919061012e6101298483610232565b61067e565b92610518565b9082519182526020820152f35b9061014f826101599261028d565b919093849361028d565b9283828411156101a25750508061018d61018661017e8561012e9561013498996105ec565b945b85610232565b9186610232565b8082101561019b575061067e565b905061067e565b83955061013494506101866101c08461012e95949661018d946105ec565b96610180565b34610095575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100955760209073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b8181029291811591840414171561024557565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b51906dffffffffffffffffffffffffffff8216820361009557565b73ffffffffffffffffffffffffffffffffffffffff9080821690838316808310156104d5575092915b60405160208101907fffffffffffffffffffffffffffffffffffffffff000000000000000000000000806060968189891b168552871b1660348301526028825285820167ffffffffffffffff938382108583111761049657816040528351902060808401927fff0000000000000000000000000000000000000000000000000000000000000084527f0000000000000000000000000000000000000000000000000000000000000000891b16608185015260958401527f000000000000000000000000000000000000000000000000000000000000000060b58401526055815260e083019181831085841117610496576004838781938b9583604052519020167f0902f1ac0000000000000000000000000000000000000000000000000000000082525afa9586156104ca575f935f97610413575b505050506dffffffffffffffffffffffffffff80911693169316145f1461040f5791565b9091565b919350809296503d83116104c3575b601f81017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016870160e00191821184831017610496578691604052810103126100955761046e90610272565b61012061047e6101008601610272565b94015163ffffffff811603610095575f8080806103eb565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b503d610422565b6040513d5f823e3d90fd5b919350509180916102b6565b81156104eb570490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b670de0b6b3a764000091828202917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848209938380861095039480860395146105dc57848311156105b257829109815f038216809204600280826003021880830282030280830282030280830282030280830282030280830282030280920290030293600183805f03040190848311900302920304170290565b60046040517f227bc153000000000000000000000000000000000000000000000000000000008152fd5b5050906105e992506104e1565b90565b9091828202917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848209938380861095039480860395146105dc57848311156105b257829109815f038216809204600280826003021880830282030280830282030280830282030280830282030280830282030280920290030293600183805f03040190848311900302920304170290565b80156107ba57610748815f908360801c806107ae575b508060401c806107a1575b508060201c80610794575b508060101c80610787575b508060081c8061077a575b508060041c8061076d575b508060021c80610760575b50600191828092811c610759575b1c1b6106f081856104e1565b01811c6106fd81856104e1565b01811c61070a81856104e1565b01811c61071781856104e1565b01811c61072481856104e1565b01811c61073181856104e1565b01811c61073e81856104e1565b01901c80926104e1565b80821015610754575090565b905090565b01816106e4565b600291509101905f6106d6565b600491509101905f6106cb565b600891509101905f6106c0565b601091509101905f6106b5565b602091509101905f6106aa565b604091509101905f61069f565b9150506080905f610694565b505f9056fea264697066735822122096c489e0164a18ff1d44783cb3fda08449be81e505b79bda31b1216a8e06211a64736f6c63430008170033"
}
Loading

0 comments on commit 9403054

Please sign in to comment.