Skip to content

Commit

Permalink
proxyRegistry proxies() to getProxy()
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0neerpat committed Aug 20, 2023
1 parent 7065d64 commit 95b515f
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 51 deletions.
16 changes: 8 additions & 8 deletions abis/HaiProxyRegistry.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"type": "address"
}
],
"name": "proxies",
"name": "getProxy",
"outputs": [
{
"internalType": "contract HaiProxy",
Expand All @@ -114,9 +114,9 @@
"build()": "8e1a55fc",
"build(address)": "f3701da2",
"factory()": "c45a0155",
"proxies(address)": "c4552791"
"getProxy(address)": "c4552791"
},
"rawMetadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_factory\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"NullAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_usr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_proxy\",\"type\":\"address\"}],\"name\":\"Build\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"build\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"_proxy\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"build\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"_proxy\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"contract HaiProxyFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"proxies\",\"outputs\":[{\"internalType\":\"contract HaiProxy\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/contracts/proxies/HaiProxyRegistry.sol\":\"HaiProxyRegistry\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[\":@contracts/=src/contracts/\",\":@defi-wonderland/solidity-utils/=node_modules/@defi-wonderland/solidity-utils/solidity/\",\":@interfaces/=src/interfaces/\",\":@libraries/=src/libraries/\",\":@openzeppelin/=node_modules/@openzeppelin/contracts/\",\":@script/=src/script/\",\":@test/=src/test/\",\":@uniswap/=node_modules/@uniswap/\",\":ds-test/=lib/ds-test/src/\",\":forge-std/=lib/forge-std/src/\",\":isolmate/=lib/isolmate/src/\",\":prb-test/=lib/prb-test/src/\"]},\"sources\":{\"src/contracts/proxies/HaiProxy.sol\":{\"keccak256\":\"0x1944adfa2023f76e1fff587af0dd394d00564ee709e470c23fcf68b6044edecb\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://feffddf8823cc0ff7a39286c2b5851a310fb1bd470852e6fa1bad31d2bcd2a4d\",\"dweb:/ipfs/QmUE5KpUo8yp8MtXDgQVuaHYB7WksDXWZwfsr2LwmMmj8d\"]},\"src/contracts/proxies/HaiProxyFactory.sol\":{\"keccak256\":\"0x55451d90772b808aa7563782fa42127746fd8ae62c36a0ddefc04a8c1cdbd8f1\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://b5539058ba0bf268f54e296307c59d697c78fc9741722bf7a6f20c174643696c\",\"dweb:/ipfs/QmRZo67fv8AxZZM5tT1RVWvEraQXMzVhuPsKbBApHj538n\"]},\"src/contracts/proxies/HaiProxyRegistry.sol\":{\"keccak256\":\"0x86d34b5f142df319ba4efc939e04f2010477aa1ff69236ceb71b1c9f9778db94\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://bc59d4ca29cc11bde72f66a9ecacc35f204754a71d7362d5199b61c5b0839d88\",\"dweb:/ipfs/QmTNPECfiVCNaLd835nSBWoRDdcVeLRwLneHRZ4GmSRMt2\"]},\"src/contracts/utils/Ownable.sol\":{\"keccak256\":\"0x8ea310a4885d456bc1cb0006371da56dba2b9c5e8522206aa9368e92494e5af1\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://8efc957ff950c8bad45bfec63c429ec6f00a5fc3193a47cda9699dc767535a80\",\"dweb:/ipfs/Qma681P5CsoLiCRys5tp2QK6ExCQHeLwJ8X4Pz1xDv53MN\"]},\"src/interfaces/utils/IOwnable.sol\":{\"keccak256\":\"0xcbea9fb39c2fbc3c8c69a8f49390646ef0bd9d1c3d705b6da899d9093c5b15dd\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://969d874458d435c24ed924bf932226e0ec7b47f23ffb3f1e1c64e3d34e478d34\",\"dweb:/ipfs/QmRtmbRBEtd1YYoggUc3gXZqdXnpLD4b9BL9YyHyNX19bH\"]},\"src/libraries/Assertions.sol\":{\"keccak256\":\"0xd476ae3f327a9c92cdf3cf2de717c9b5f5614d3064354ecc06f1a970d51ed4ab\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://85473da01ab5ae7d95c2473d482428679f62efa4f56cf72b11c53df9f75ea35d\",\"dweb:/ipfs/QmQiyxsWYmnx8YJPUxT4dScrCtqovneNA47gq1w81zVd2W\"]}},\"version\":1}",
"rawMetadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_factory\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"NullAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_usr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_proxy\",\"type\":\"address\"}],\"name\":\"Build\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"build\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"_proxy\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"build\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"_proxy\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"contract HaiProxyFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"getProxy\",\"outputs\":[{\"internalType\":\"contract HaiProxy\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/contracts/proxies/HaiProxyRegistry.sol\":\"HaiProxyRegistry\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[\":@contracts/=src/contracts/\",\":@defi-wonderland/solidity-utils/=node_modules/@defi-wonderland/solidity-utils/solidity/\",\":@interfaces/=src/interfaces/\",\":@libraries/=src/libraries/\",\":@openzeppelin/=node_modules/@openzeppelin/contracts/\",\":@script/=src/script/\",\":@test/=src/test/\",\":@uniswap/=node_modules/@uniswap/\",\":ds-test/=lib/ds-test/src/\",\":forge-std/=lib/forge-std/src/\",\":isolmate/=lib/isolmate/src/\",\":prb-test/=lib/prb-test/src/\"]},\"sources\":{\"src/contracts/proxies/HaiProxy.sol\":{\"keccak256\":\"0x1944adfa2023f76e1fff587af0dd394d00564ee709e470c23fcf68b6044edecb\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://feffddf8823cc0ff7a39286c2b5851a310fb1bd470852e6fa1bad31d2bcd2a4d\",\"dweb:/ipfs/QmUE5KpUo8yp8MtXDgQVuaHYB7WksDXWZwfsr2LwmMmj8d\"]},\"src/contracts/proxies/HaiProxyFactory.sol\":{\"keccak256\":\"0x55451d90772b808aa7563782fa42127746fd8ae62c36a0ddefc04a8c1cdbd8f1\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://b5539058ba0bf268f54e296307c59d697c78fc9741722bf7a6f20c174643696c\",\"dweb:/ipfs/QmRZo67fv8AxZZM5tT1RVWvEraQXMzVhuPsKbBApHj538n\"]},\"src/contracts/proxies/HaiProxyRegistry.sol\":{\"keccak256\":\"0x86d34b5f142df319ba4efc939e04f2010477aa1ff69236ceb71b1c9f9778db94\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://bc59d4ca29cc11bde72f66a9ecacc35f204754a71d7362d5199b61c5b0839d88\",\"dweb:/ipfs/QmTNPECfiVCNaLd835nSBWoRDdcVeLRwLneHRZ4GmSRMt2\"]},\"src/contracts/utils/Ownable.sol\":{\"keccak256\":\"0x8ea310a4885d456bc1cb0006371da56dba2b9c5e8522206aa9368e92494e5af1\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://8efc957ff950c8bad45bfec63c429ec6f00a5fc3193a47cda9699dc767535a80\",\"dweb:/ipfs/Qma681P5CsoLiCRys5tp2QK6ExCQHeLwJ8X4Pz1xDv53MN\"]},\"src/interfaces/utils/IOwnable.sol\":{\"keccak256\":\"0xcbea9fb39c2fbc3c8c69a8f49390646ef0bd9d1c3d705b6da899d9093c5b15dd\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://969d874458d435c24ed924bf932226e0ec7b47f23ffb3f1e1c64e3d34e478d34\",\"dweb:/ipfs/QmRtmbRBEtd1YYoggUc3gXZqdXnpLD4b9BL9YyHyNX19bH\"]},\"src/libraries/Assertions.sol\":{\"keccak256\":\"0xd476ae3f327a9c92cdf3cf2de717c9b5f5614d3064354ecc06f1a970d51ed4ab\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://85473da01ab5ae7d95c2473d482428679f62efa4f56cf72b11c53df9f75ea35d\",\"dweb:/ipfs/QmQiyxsWYmnx8YJPUxT4dScrCtqovneNA47gq1w81zVd2W\"]}},\"version\":1}",
"metadata": {
"compiler": {
"version": "0.8.19+commit.7dd6d404"
Expand Down Expand Up @@ -214,7 +214,7 @@
],
"stateMutability": "view",
"type": "function",
"name": "proxies",
"name": "getProxy",
"outputs": [
{
"internalType": "contract HaiProxy",
Expand Down Expand Up @@ -450,7 +450,7 @@
"constant": false,
"functionSelector": "c4552791",
"mutability": "mutable",
"name": "proxies",
"name": "getProxy",
"nameLocation": "352:7:120",
"scope": 55255,
"stateVariable": true,
Expand Down Expand Up @@ -1164,7 +1164,7 @@
"leftExpression": {
"baseExpression": {
"id": 55210,
"name": "proxies",
"name": "getProxy",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 55152,
Expand Down Expand Up @@ -1369,7 +1369,7 @@
"expression": {
"baseExpression": {
"id": 55223,
"name": "proxies",
"name": "getProxy",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 55152,
Expand Down Expand Up @@ -1605,7 +1605,7 @@
"leftHandSide": {
"baseExpression": {
"id": 55240,
"name": "proxies",
"name": "getProxy",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 55152,
Expand Down
84 changes: 42 additions & 42 deletions src/contracts/addreses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,28 +37,28 @@ const addresses: Record<GebDeployment, ContractList> = {
'arbitrum-goerli': {
MULTICALL: '',
ETH: '0xEe01c0CD76354C383B8c7B4e65EA88D00B06f36f',
GEB_SYSTEM_COIN: '0x3a35bF1Cf9fa82B216F1f7E25C3b6eFCCc3d031B',
GEB_PROTOCOL_TOKEN: '0x95BC1cAe012b7F084BECEa8162F13e4a7292F7e1',
GEB_SAFE_ENGINE: '0x18F501460f2eD907f12621678d676014138094AC',
GEB_ORACLE_RELAYER: '0x14f9D7feA518890E431afCf01B70818fbf30D97d',
GEB_SURPLUS_AUCTION_HOUSE: '0x9c857d5B0508e312b015Ee300Ac11857b6875Ce3',
GEB_DEBT_AUCTION_HOUSE: '0x28D76996ff24C8Bb174242A79dfD860B0Da7b173',
GEB_ACCOUNTING_ENGINE: '0x0987F0270778A901fB58cA90fb7545d13D463261',
GEB_LIQUIDATION_ENGINE: '0xA11974F58bC2B55Bb45B4104a8b07B93210f8eBa',
GEB_COIN_JOIN: '0x479e3B7da96a3cF7235831641Db95A8eCb98BBEB',
GEB_TAX_COLLECTOR: '0xa6859040ff2f4fC41F5e3Cd9300887768FbEeEE1',
GEB_STABILITY_FEE_TREASURY: '0x5DAE4245CfA26788B9f23B7EaA5C5d9DA2eE123e',
GEB_RRFM_CALCULATOR: '0xf373598b2E0E936216EDeDd9Ee52cC2AF25ff23E',
GEB_RRFM_SETTER: '0xE9A8cD9A7a6Eb4b1E722911fCd98E6B39FAaB300',
GEB_GLOBAL_SETTLEMENT: '0x48133Deba716dCa3E9AcB2210E72FF8Ea56D603e',
SAFE_MANAGER: '0x43b5D6FF641C5db02fe3890b3ef714044cf9193c',
PROXY_FACTORY: '0x79a83634268127b99639af392D48F0Ab0a55E73F',
PROXY_REGISTRY: '0x1eeA49507De4b482F002Db8AD75663EA1b443E28',
PROXY_BASIC_ACTIONS: '0x0Ef74400C4fBE8979da6658De6464A2197abE841',
PROXY_DEBT_AUCTION_ACTIONS: '0xE6AB752cFdD1B8310f5B125E69Cd5D35eDC8C14b',
PROXY_SURPLUS_AUCTION_ACTIONS: '0xA283ADDB70d15033d3c16630EA16F644cb5048AA',
PROXY_COLLATERAL_AUCTION_ACTIONS: '0xE6B66f657B4E61c046621215C71c56C85239B074',
PROXY_REWARDED_ACTIONS: '0x4900ed8E641ca7671e94Ad2Ca640a964C944ea3e',
GEB_SYSTEM_COIN: '0x007b1aC6B1894351cD5B025470119cf07a719d5b',
GEB_PROTOCOL_TOKEN: '0x1A095c17f8503A79E754371EfBb232c1C0D9cb07',
GEB_SAFE_ENGINE: '0x3Ea69ED1931929678DE2de8E0b0C8FBd6FA5CFBA',
GEB_ORACLE_RELAYER: '0x276f2F3e4A5Ca476Ef018cbe8646A5e00Db2dC32',
GEB_SURPLUS_AUCTION_HOUSE: '0x97Ba91F8161c67eC0f5600f96Aa6B78eEcA83E2f',
GEB_DEBT_AUCTION_HOUSE: '0x73098945f3e73caf01909C957A6bd65ED910F637',
GEB_ACCOUNTING_ENGINE: '0xbeed3E8a9F70A91C5bc5f955B71317C456366CFA',
GEB_LIQUIDATION_ENGINE: '0xd4E8C2463ac3388ddAC401EC91652190805E375E',
GEB_COIN_JOIN: '0xb340D8890e90AFb7a79f3cFe88Df9E03B4b99b1f',
GEB_TAX_COLLECTOR: '0xA290676CED25e26828b00294dBbEebCb356CD2E5',
GEB_STABILITY_FEE_TREASURY: '0xf805849c1dE4627ba171F6C93540F77D9B9E6d20',
GEB_RRFM_CALCULATOR: '0x63F197A871dF1485311762bc3284c2E4f0A65c0b',
GEB_RRFM_SETTER: '0xb8E0FF656c799A79F08d44dDaf508D343693DE4e',
GEB_GLOBAL_SETTLEMENT: '0x472Ec291F772F9FF3D3397553A32EdBfDBd881Ec',
SAFE_MANAGER: '0xE4a203f79b4DEf769E4624387bEF5516AC74e7B8',
PROXY_FACTORY: '0x7e65C1e8161e49Ed414bf0C751e9D6B0E370C4db',
PROXY_REGISTRY: '0x7e65C1e8161e49Ed414bf0C751e9D6B0E370C4db',
PROXY_BASIC_ACTIONS: '0x3C929D32b85ffF713b15e6d9C3B0D5868B0C9157',
PROXY_DEBT_AUCTION_ACTIONS: '0xAF44D66b9d035a028328c99f0Adb7AB85928724c',
PROXY_SURPLUS_AUCTION_ACTIONS: '0x267D4BDf13DaDD3Da7C90074E163c44443505CA5',
PROXY_COLLATERAL_AUCTION_ACTIONS: '0x92A093f53360ffc42f75f6D00af51E26138725b4',
PROXY_REWARDED_ACTIONS: '0xA2C86fBae73C2672ace63a732274a1D4c0FE938F',
},
mainnet: {
MULTICALL: '0x0000000000000000000000000000000000000000',
Expand Down Expand Up @@ -135,44 +135,44 @@ const tokens: Record<GebDeployment, TokenList> = {
decimals: 18,
symbol: 'WETH',
bytes32String: WETH,
collateralJoin: '0xe18DDcf644e36f4d232CDbE8330C8BF2Bb2aa200',
collateralAuctionHouse: '0x81dd2cc191a8ECE5FF7858aC9946043B34d1f7B7',
isCollateral: true,
},
FTRG: {
address: '',
decimals: 18,
symbol: 'FTRG',
bytes32String: FTRG,
collateralJoin: '0x8b0711fED18a947a3BF46b7356f1Ab8D416074df',
collateralAuctionHouse: '0x323D952a9bA1bE39AF824C79107D97A39487c3a1',
collateralJoin: '0xd4F5Dc250893cA025603A03d1fe5650D03fA5891',
collateralAuctionHouse: '0x74B840D4B626e9bD174F74eFF8a59dE30Fc03eF9',
isCollateral: true,
},
// FTRG: {
// address: '',
// decimals: 18,
// symbol: 'FTRG',
// bytes32String: FTRG,
// collateralJoin: '0x01c9E717B10605163D5B0beB45ab93497C34E77A',
// collateralAuctionHouse: '0xEc467776f0D8FF8FDE41057b8b2D0ed298072edF',
// isCollateral: true,
// },
WBTC: {
address: '0xa793Aea0A3B0D200f4C3b20B877b43dc5bf9c17c',
address: '0xAcFb9e6FD04FE18c56995C8d58C0785042766736',
decimals: 8,
symbol: 'WBTC',
bytes32String: WBTC,
collateralJoin: '0xb7E52601250357C1FCE47954c6a7D24B4113a774',
collateralAuctionHouse: '0xF1AeB8F15812B50498a30CD570a71bb921E9cb5E',
collateralJoin: '0x32490555704591fF252287E888523bDC0cC42226',
collateralAuctionHouse: '0xf214ADE436451fbb6909F444efFf7C34C2F2bB92',
isCollateral: true,
},
STN: {
address: '0x2C3E2E6cd0DD83C7233Af5a13172974F00AcFE23',
address: '0x7e6Ee244FA65cEEb8b698E7866E127cD8C7440D0',
decimals: 3,
symbol: 'STN',
bytes32String: STONES,
collateralJoin: '0x08F8e63EC811a56B7227AE8772d87D9672727fa8',
collateralAuctionHouse: '0x73c2DB6Dc83a2Dc62139ac89e9014F669d85Ea17',
collateralJoin: '0xeB8AcA91fc4BcEEc73ee8EE6Bcb3a6608F858bD1',
collateralAuctionHouse: '0x85b35CEF271e6c9653b308b6130142B41d1992B8',
isCollateral: true,
},
TOTEM: {
address: '0xa65E8F7e398B82899C83412Ab552593b67da1b83',
address: '0x0Da1F0E501b20f963Ce671e62E11B09259f714c4',
decimals: 3,
symbol: 'TOTEM',
bytes32String: STONES,
collateralJoin: '0xee7DC58C7A911dB8770D85b68549537455b9241E',
collateralAuctionHouse: '0x54867Db0aF2FcAb98BbC054A37a121f6e9f85E19',
collateralJoin: '0xC458429Fc706E4d6eA4852592d4d0F3E19563469',
collateralAuctionHouse: '0x50298A8cAFdB116700Ba84189Ca426464fE872d5',
isCollateral: true,
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/geb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export class Geb {
* @param ownerAddress Externally owned user account aka Ethereum address that owns a GEB proxy.
*/
public async getProxyAction(ownerAddress: string) {
const address = await this.contracts.proxyRegistry.proxies(ownerAddress)
const address = await this.contracts.proxyRegistry.getProxy(ownerAddress)

if (address === NULL_ADDRESS) {
throw new GebError(GebErrorTypes.DOES_NOT_OWN_HAVE_PROXY)
Expand Down

0 comments on commit 95b515f

Please sign in to comment.