From a70478086531f04b6478e7a8e8da763c32d49c5f Mon Sep 17 00:00:00 2001 From: Adrian Li Date: Tue, 2 Jun 2020 18:03:33 -0400 Subject: [PATCH 01/17] add script file with todos --- scripts/getDataFromUMA.js | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 scripts/getDataFromUMA.js diff --git a/scripts/getDataFromUMA.js b/scripts/getDataFromUMA.js new file mode 100644 index 0000000..bb79207 --- /dev/null +++ b/scripts/getDataFromUMA.js @@ -0,0 +1,3 @@ +// 1. get all JSON files from their artifacts directory +// 2. filter only for those that have an ABI +// 3. in a new folder, write JSON files with only the ABI From 10cf64c737e817f03d0345de7521e5ad5d784da2 Mon Sep 17 00:00:00 2001 From: Adrian Li Date: Tue, 2 Jun 2020 18:27:22 -0400 Subject: [PATCH 02/17] enhance uma script --- .gitignore | 1 + scripts/getDataFromUMA.js | 49 ++++++++++++++++++++++++++++++++++++--- 2 files changed, 47 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 9c97bbd..cc44dc2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules dist .env +.temp_* diff --git a/scripts/getDataFromUMA.js b/scripts/getDataFromUMA.js index bb79207..9eefc1c 100644 --- a/scripts/getDataFromUMA.js +++ b/scripts/getDataFromUMA.js @@ -1,3 +1,46 @@ -// 1. get all JSON files from their artifacts directory -// 2. filter only for those that have an ABI -// 3. in a new folder, write JSON files with only the ABI +const path = require("path"); +const fs = require("fs"); + +// Usage: node scripts/getDataFromUMA.js + +// only include the following contracts +const fileFilter = [ + "Finder", + "VotingToken", + "IdentifierWhitelist", + "Voting", + "Registry", + "FinancialContractsAdmin", + "Store", + "Governor", + "DesignatedVotingFactory", + "WETH9", + "ExpiringMultiPartyLib", + "TokenFactory", + "AddressWhitelist", + "ExpiringMultiPartyCreator", +]; + +// get all JSON files from their artifacts directory +const inputPath = process.argv[2]; +const artifactPath = path.join(inputPath, "./core/build/contracts"); +const filenames = fs.readdirSync(artifactPath); + +// create a fresh temp folder to hold ABIs +const outputDir = path.join(process.cwd(), "./src/uma/abi"); +if (fs.existsSync(outputDir)) { + fs.rmdirSync(outputDir, { recursive: true }); +} +fs.mkdirSync(outputDir); + +// write ABIs to new files +filenames.forEach((filename) => { + const contents = require(path.join(artifactPath, filename)); + const name = filename.split(".").slice(0, -1).join("."); + + if (fileFilter.includes(name)) { + const outputPath = path.join(outputDir, filename); + fs.writeFileSync(outputPath, contents.abi); + console.log("written:", outputPath); + } +}); From 20ca8644d7b7ac39ff28445a3ba959ec8796ba0c Mon Sep 17 00:00:00 2001 From: Adrian Li Date: Tue, 2 Jun 2020 18:30:43 -0400 Subject: [PATCH 03/17] update addresses for UMA --- src/uma/contracts.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/uma/contracts.ts b/src/uma/contracts.ts index ee19329..dab3439 100644 --- a/src/uma/contracts.ts +++ b/src/uma/contracts.ts @@ -1,6 +1,6 @@ import addressWhitelistAbi from "./abi/AddressWhitelist.json"; import designatedVotingFactoryAbi from "./abi/DesignatedVotingFactory.json"; -import expiringMultiPartyAbi from "./abi/ExpiringMultiParty.json"; +import expiringMultiPartyLibAbi from "./abi/expiringMultiPartyLib.json"; import expiringMultiPartyCreatorAbi from "./abi/ExpiringMultiPartyCreator.json"; import financialContractsAdminAbi from "./abi/FinancialContractsAdmin.json"; import finderAbi from "./abi/Finder.json"; @@ -8,25 +8,27 @@ import governorAbi from "./abi/Governor.json"; import identifierWhitelistAbi from "./abi/IdentifierWhitelist.json"; import registryAbi from "./abi/Registry.json"; import storeAbi from "./abi/Store.json"; -import syntheticTokenAbi from "./abi/SyntheticToken.json"; -import testnetERC20Abi from "./abi/TestnetERC20.json"; import votingAbi from "./abi/Voting.json"; import votingTokenAbi from "./abi/VotingToken.json"; import weth9Abi from "./abi/WETH9.json"; +import tokenFactoryAbi from "./abi/TokenFactory.json"; const contracts = { addressWhitelist: { abi: addressWhitelistAbi, + address: "0x48e687205D3962c43891b8Cde5A4Fe75FA6C8D7a", }, designatedVotingFactory: { abi: designatedVotingFactoryAbi, address: "0xE81EeE5Da165fA6863bBc82dF66E62d18625d592", }, - expiringMultiParty: { - abi: expiringMultiPartyAbi, + expiringMultiPartyLib: { + abi: expiringMultiPartyLibAbi, + address: "0x09AFD24Acc170c16f4fF64BDf2A4818C515440e8", }, expiringMultiPartyCreator: { abi: expiringMultiPartyCreatorAbi, + address: "0xdebB91Ab3e473025bb8ce278c02361A3C4f13124", }, financialContractsAdmin: { abi: financialContractsAdminAbi, @@ -52,11 +54,9 @@ const contracts = { abi: storeAbi, address: "0x54f44eA3D2e7aA0ac089c4d8F7C93C27844057BF", }, - syntheticToken: { - abi: syntheticTokenAbi, - }, - testnetERC20: { - abi: testnetERC20Abi, + tokenFactory: { + abi: tokenFactoryAbi, + address: "0x7c96d6235CfaaCcAc5d80fCe74E6032B25dd1F03", }, voting: { abi: votingAbi, From 788f43eb062c61a7e2aa34e1cdb4a5028aef647d Mon Sep 17 00:00:00 2001 From: Adrian Li Date: Tue, 2 Jun 2020 18:32:28 -0400 Subject: [PATCH 04/17] rename script --- scripts/{getDataFromUMA.js => getAbisFromUMA.js} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename scripts/{getDataFromUMA.js => getAbisFromUMA.js} (94%) diff --git a/scripts/getDataFromUMA.js b/scripts/getAbisFromUMA.js similarity index 94% rename from scripts/getDataFromUMA.js rename to scripts/getAbisFromUMA.js index 9eefc1c..05654b3 100644 --- a/scripts/getDataFromUMA.js +++ b/scripts/getAbisFromUMA.js @@ -1,7 +1,7 @@ const path = require("path"); const fs = require("fs"); -// Usage: node scripts/getDataFromUMA.js +// Usage: node scripts/getAbisFromUMA.js // only include the following contracts const fileFilter = [ From dfd75fabb08de304920baf254058c9c2f93c33c8 Mon Sep 17 00:00:00 2001 From: Adrian Li Date: Tue, 2 Jun 2020 18:34:41 -0400 Subject: [PATCH 05/17] fix script --- scripts/getAbisFromUMA.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/getAbisFromUMA.js b/scripts/getAbisFromUMA.js index 05654b3..e3b7058 100644 --- a/scripts/getAbisFromUMA.js +++ b/scripts/getAbisFromUMA.js @@ -40,7 +40,7 @@ filenames.forEach((filename) => { if (fileFilter.includes(name)) { const outputPath = path.join(outputDir, filename); - fs.writeFileSync(outputPath, contents.abi); + fs.writeFileSync(outputPath, JSON.stringify(contents.abi, null, 2)); console.log("written:", outputPath); } }); From f45dc2a9947b5a3838232fdaeed7641c4d282285 Mon Sep 17 00:00:00 2001 From: Adrian Li Date: Tue, 2 Jun 2020 18:34:51 -0400 Subject: [PATCH 06/17] new ABIs for UMA --- src/uma/abi/AddressWhitelist.json | 15 +- src/uma/abi/DesignatedVotingFactory.json | 9 +- src/uma/abi/ExpiringMultiParty.json | 1641 -------------------- src/uma/abi/ExpiringMultiPartyCreator.json | 21 +- src/uma/abi/ExpiringMultiPartyLib.json | 1 + src/uma/abi/FinancialContractsAdmin.json | 3 +- src/uma/abi/Finder.json | 9 +- src/uma/abi/Governor.json | 24 +- src/uma/abi/IdentifierWhitelist.json | 6 +- src/uma/abi/Registry.json | 24 +- src/uma/abi/Store.json | 33 +- src/uma/abi/SyntheticToken.json | 618 -------- src/uma/abi/TestnetERC20.json | 317 ---- src/uma/abi/TokenFactory.json | 31 + src/uma/abi/Voting.json | 48 +- src/uma/abi/VotingToken.json | 30 +- src/uma/abi/WETH9.json | 27 +- 17 files changed, 115 insertions(+), 2742 deletions(-) delete mode 100644 src/uma/abi/ExpiringMultiParty.json create mode 100644 src/uma/abi/ExpiringMultiPartyLib.json delete mode 100644 src/uma/abi/SyntheticToken.json delete mode 100644 src/uma/abi/TestnetERC20.json create mode 100644 src/uma/abi/TokenFactory.json diff --git a/src/uma/abi/AddressWhitelist.json b/src/uma/abi/AddressWhitelist.json index 449faee..fbdeeaa 100644 --- a/src/uma/abi/AddressWhitelist.json +++ b/src/uma/abi/AddressWhitelist.json @@ -55,8 +55,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], @@ -95,8 +94,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -115,8 +113,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -161,8 +158,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], @@ -175,7 +171,6 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" } ] \ No newline at end of file diff --git a/src/uma/abi/DesignatedVotingFactory.json b/src/uma/abi/DesignatedVotingFactory.json index ea05cef..8014ca6 100644 --- a/src/uma/abi/DesignatedVotingFactory.json +++ b/src/uma/abi/DesignatedVotingFactory.json @@ -120,8 +120,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -140,8 +139,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -165,8 +163,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ diff --git a/src/uma/abi/ExpiringMultiParty.json b/src/uma/abi/ExpiringMultiParty.json deleted file mode 100644 index 2e83f04..0000000 --- a/src/uma/abi/ExpiringMultiParty.json +++ /dev/null @@ -1,1641 +0,0 @@ -[ - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "expirationTimestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "withdrawalLiveness", - "type": "uint256" - }, - { - "internalType": "address", - "name": "collateralAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "finderAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenFactoryAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "timerAddress", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "priceFeedIdentifier", - "type": "bytes32" - }, - { - "internalType": "string", - "name": "syntheticName", - "type": "string" - }, - { - "internalType": "string", - "name": "syntheticSymbol", - "type": "string" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "minSponsorTokens", - "type": "tuple" - }, - { - "internalType": "uint256", - "name": "liquidationLiveness", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "collateralRequirement", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "disputeBondPct", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "sponsorDisputeRewardPct", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "disputerDisputeRewardPct", - "type": "tuple" - } - ], - "internalType": "struct Liquidatable.ConstructorParams", - "name": "params", - "type": "tuple" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "ContractExpired", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sponsor", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "collateralAmount", - "type": "uint256" - } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sponsor", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "disputer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "liquidationId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "disputeSucceeded", - "type": "bool" - } - ], - "name": "DisputeSettled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "originalExpirationTimestamp", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "shutdownTimestamp", - "type": "uint256" - } - ], - "name": "EmergencyShutdown", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sponsor", - "type": "address" - } - ], - "name": "EndedSponsorPosition", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "FinalFeesPaid", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sponsor", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "liquidationId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokensOutstanding", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "lockedCollateral", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "liquidatedCollateral", - "type": "uint256" - } - ], - "name": "LiquidationCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sponsor", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "disputer", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "liquidationId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "disputeBondAmount", - "type": "uint256" - } - ], - "name": "LiquidationDisputed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "withdrawalAmount", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "enum Liquidatable.Status", - "name": "liquidationStatus", - "type": "uint8" - } - ], - "name": "LiquidationWithdrawn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sponsor", - "type": "address" - } - ], - "name": "NewSponsor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sponsor", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "collateralAmount", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenAmount", - "type": "uint256" - } - ], - "name": "PositionCreated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sponsor", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "collateralAmount", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokenAmount", - "type": "uint256" - } - ], - "name": "Redeem", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "regularFee", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "lateFee", - "type": "uint256" - } - ], - "name": "RegularFeesPaid", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldSponsor", - "type": "address" - } - ], - "name": "RequestTransferPosition", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldSponsor", - "type": "address" - } - ], - "name": "RequestTransferPositionCanceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldSponsor", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newSponsor", - "type": "address" - } - ], - "name": "RequestTransferPositionExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sponsor", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "collateralAmount", - "type": "uint256" - } - ], - "name": "RequestWithdrawal", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sponsor", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "collateralAmount", - "type": "uint256" - } - ], - "name": "RequestWithdrawalCanceled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sponsor", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "collateralAmount", - "type": "uint256" - } - ], - "name": "RequestWithdrawalExecuted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "collateralReturned", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "tokensBurned", - "type": "uint256" - } - ], - "name": "SettleExpiredPosition", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sponsor", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "collateralAmount", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - }, - { - "inputs": [], - "name": "cancelTransferPosition", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "cancelWithdrawal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "collateralCurrency", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "collateralRequirement", - "outputs": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "contractState", - "outputs": [ - { - "internalType": "enum PricelessPositionManager.ContractState", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "collateralAmount", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "numTokens", - "type": "tuple" - } - ], - "name": "create", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sponsor", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "minCollateralPerToken", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "maxCollateralPerToken", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "maxTokensToLiquidate", - "type": "tuple" - }, - { - "internalType": "uint256", - "name": "deadline", - "type": "uint256" - } - ], - "name": "createLiquidation", - "outputs": [ - { - "internalType": "uint256", - "name": "liquidationId", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "tokensLiquidated", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "finalFeeBond", - "type": "tuple" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "cumulativeFeeMultiplier", - "outputs": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "collateralAmount", - "type": "tuple" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sponsor", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "collateralAmount", - "type": "tuple" - } - ], - "name": "depositTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "liquidationId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "sponsor", - "type": "address" - } - ], - "name": "dispute", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "totalPaid", - "type": "tuple" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "disputeBondPct", - "outputs": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "disputerDisputeRewardPct", - "outputs": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "emergencyShutdown", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "expirationTimestamp", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "expire", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "expiryPrice", - "outputs": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "finder", - "outputs": [ - { - "internalType": "contract FinderInterface", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sponsor", - "type": "address" - } - ], - "name": "getCollateral", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "collateralAmount", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getCurrentTime", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sponsor", - "type": "address" - } - ], - "name": "getLiquidations", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "sponsor", - "type": "address" - }, - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "enum Liquidatable.Status", - "name": "state", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "liquidationTime", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "tokensOutstanding", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "lockedCollateral", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "liquidatedCollateral", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "rawUnitCollateral", - "type": "tuple" - }, - { - "internalType": "address", - "name": "disputer", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "settlementPrice", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "finalFee", - "type": "tuple" - } - ], - "internalType": "struct Liquidatable.LiquidationData[]", - "name": "liquidationData", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "liquidationLiveness", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "liquidations", - "outputs": [ - { - "internalType": "address", - "name": "sponsor", - "type": "address" - }, - { - "internalType": "address", - "name": "liquidator", - "type": "address" - }, - { - "internalType": "enum Liquidatable.Status", - "name": "state", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "liquidationTime", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "tokensOutstanding", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "lockedCollateral", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "liquidatedCollateral", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "rawUnitCollateral", - "type": "tuple" - }, - { - "internalType": "address", - "name": "disputer", - "type": "address" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "settlementPrice", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "finalFee", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "minSponsorTokens", - "outputs": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "payRegularFees", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "totalPaid", - "type": "tuple" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "pfc", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "positions", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "tokensOutstanding", - "type": "tuple" - }, - { - "internalType": "uint256", - "name": "requestPassTimestamp", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "withdrawalRequestAmount", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "rawCollateral", - "type": "tuple" - }, - { - "internalType": "uint256", - "name": "transferPositionRequestPassTimestamp", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "priceIdentifier", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rawLiquidationCollateral", - "outputs": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rawTotalPositionCollateral", - "outputs": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "numTokens", - "type": "tuple" - } - ], - "name": "redeem", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "amountWithdrawn", - "type": "tuple" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "remargin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "requestTransferPosition", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "collateralAmount", - "type": "tuple" - } - ], - "name": "requestWithdrawal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "time", - "type": "uint256" - } - ], - "name": "setCurrentTime", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "settleExpired", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "amountWithdrawn", - "type": "tuple" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "sponsorDisputeRewardPct", - "outputs": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "timerAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "tokenCurrency", - "outputs": [ - { - "internalType": "contract ExpandedIERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalPositionCollateral", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "totalCollateral", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalTokensOutstanding", - "outputs": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newSponsorAddress", - "type": "address" - } - ], - "name": "transferPositionPassedRequest", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "collateralAmount", - "type": "tuple" - } - ], - "name": "withdraw", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "amountWithdrawn", - "type": "tuple" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "liquidationId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "sponsor", - "type": "address" - } - ], - "name": "withdrawLiquidation", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "amountWithdrawn", - "type": "tuple" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "withdrawPassedRequest", - "outputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "rawValue", - "type": "uint256" - } - ], - "internalType": "struct FixedPoint.Unsigned", - "name": "amountWithdrawn", - "type": "tuple" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "withdrawalLiveness", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - } -] \ No newline at end of file diff --git a/src/uma/abi/ExpiringMultiPartyCreator.json b/src/uma/abi/ExpiringMultiPartyCreator.json index 3d940cf..27402f8 100644 --- a/src/uma/abi/ExpiringMultiPartyCreator.json +++ b/src/uma/abi/ExpiringMultiPartyCreator.json @@ -55,8 +55,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], @@ -69,8 +68,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], @@ -83,8 +81,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], @@ -97,8 +94,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -124,8 +120,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], @@ -138,8 +133,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -158,8 +152,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ diff --git a/src/uma/abi/ExpiringMultiPartyLib.json b/src/uma/abi/ExpiringMultiPartyLib.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/src/uma/abi/ExpiringMultiPartyLib.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/src/uma/abi/FinancialContractsAdmin.json b/src/uma/abi/FinancialContractsAdmin.json index 73a04a8..8d1889c 100644 --- a/src/uma/abi/FinancialContractsAdmin.json +++ b/src/uma/abi/FinancialContractsAdmin.json @@ -29,8 +29,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], diff --git a/src/uma/abi/Finder.json b/src/uma/abi/Finder.json index a9a0d97..8b7cc59 100644 --- a/src/uma/abi/Finder.json +++ b/src/uma/abi/Finder.json @@ -54,8 +54,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], @@ -68,8 +67,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], @@ -126,7 +124,6 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" } ] \ No newline at end of file diff --git a/src/uma/abi/Governor.json b/src/uma/abi/Governor.json index e1f14b3..517f094 100644 --- a/src/uma/abi/Governor.json +++ b/src/uma/abi/Governor.json @@ -179,8 +179,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -199,8 +198,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -224,8 +222,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -244,8 +241,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -320,8 +316,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -369,8 +364,7 @@ "name": "executeProposal", "outputs": [], "stateMutability": "payable", - "type": "function", - "payable": true + "type": "function" }, { "inputs": [], @@ -383,8 +377,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -432,7 +425,6 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" } ] \ No newline at end of file diff --git a/src/uma/abi/IdentifierWhitelist.json b/src/uma/abi/IdentifierWhitelist.json index 26071c9..ad78a36 100644 --- a/src/uma/abi/IdentifierWhitelist.json +++ b/src/uma/abi/IdentifierWhitelist.json @@ -55,8 +55,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], @@ -121,7 +120,6 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" } ] \ No newline at end of file diff --git a/src/uma/abi/Registry.json b/src/uma/abi/Registry.json index 5c1cdc5..326f6c2 100644 --- a/src/uma/abi/Registry.json +++ b/src/uma/abi/Registry.json @@ -182,8 +182,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -202,8 +201,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -227,8 +225,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -247,8 +244,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -360,8 +356,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -380,8 +375,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], @@ -394,8 +388,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -419,7 +412,6 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" } ] \ No newline at end of file diff --git a/src/uma/abi/Store.json b/src/uma/abi/Store.json index 7c658a6..9de376a 100644 --- a/src/uma/abi/Store.json +++ b/src/uma/abi/Store.json @@ -180,8 +180,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -218,8 +217,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], @@ -232,8 +230,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], @@ -246,8 +243,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -266,8 +262,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -291,8 +286,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -367,8 +361,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], @@ -381,8 +374,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -420,8 +412,7 @@ "name": "payOracleFees", "outputs": [], "stateMutability": "payable", - "type": "function", - "payable": true + "type": "function" }, { "inputs": [ @@ -501,8 +492,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -528,8 +518,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ diff --git a/src/uma/abi/SyntheticToken.json b/src/uma/abi/SyntheticToken.json deleted file mode 100644 index fecbddd..0000000 --- a/src/uma/abi/SyntheticToken.json +++ /dev/null @@ -1,618 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "string", - "name": "tokenName", - "type": "string" - }, - { - "internalType": "string", - "name": "tokenSymbol", - "type": "string" - }, - { - "internalType": "uint8", - "name": "tokenDecimals", - "type": "uint8" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "roleId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "newMember", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "manager", - "type": "address" - } - ], - "name": "AddedSharedMember", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "roleId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "oldMember", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "manager", - "type": "address" - } - ], - "name": "RemovedSharedMember", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "roleId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "newMember", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "manager", - "type": "address" - } - ], - "name": "ResetExclusiveMember", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "roleId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "newMember", - "type": "address" - } - ], - "name": "addMember", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "roleId", - "type": "uint256" - } - ], - "name": "getMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "roleId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "memberToCheck", - "type": "address" - } - ], - "name": "holdsRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "roleId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "memberToRemove", - "type": "address" - } - ], - "name": "removeMember", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "roleId", - "type": "uint256" - } - ], - "name": "renounceMembership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "roleId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "newMember", - "type": "address" - } - ], - "name": "resetMember", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "addMinter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "removeMinter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "addBurner", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "removeBurner", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "resetOwner", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "isMinter", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "isBurner", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } -] \ No newline at end of file diff --git a/src/uma/abi/TestnetERC20.json b/src/uma/abi/TestnetERC20.json deleted file mode 100644 index 692440a..0000000 --- a/src/uma/abi/TestnetERC20.json +++ /dev/null @@ -1,317 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "string", - "name": "_name", - "type": "string" - }, - { - "internalType": "string", - "name": "_symbol", - "type": "string" - }, - { - "internalType": "uint8", - "name": "_decimals", - "type": "uint8" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "ownerAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "allocateTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] \ No newline at end of file diff --git a/src/uma/abi/TokenFactory.json b/src/uma/abi/TokenFactory.json new file mode 100644 index 0000000..eafb797 --- /dev/null +++ b/src/uma/abi/TokenFactory.json @@ -0,0 +1,31 @@ +[ + { + "inputs": [ + { + "internalType": "string", + "name": "tokenName", + "type": "string" + }, + { + "internalType": "string", + "name": "tokenSymbol", + "type": "string" + }, + { + "internalType": "uint8", + "name": "tokenDecimals", + "type": "uint8" + } + ], + "name": "createToken", + "outputs": [ + { + "internalType": "contract ExpandedIERC20", + "name": "newToken", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/src/uma/abi/Voting.json b/src/uma/abi/Voting.json index 4fc1675..4de8978 100644 --- a/src/uma/abi/Voting.json +++ b/src/uma/abi/Voting.json @@ -288,8 +288,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], @@ -302,8 +301,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], @@ -316,8 +314,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], @@ -330,8 +327,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], @@ -344,8 +340,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], @@ -365,8 +360,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -414,8 +408,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -441,8 +434,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -468,8 +460,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], @@ -482,8 +473,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -525,8 +515,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -550,8 +539,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -594,8 +582,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -824,8 +811,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], @@ -838,8 +824,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], @@ -852,8 +837,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ diff --git a/src/uma/abi/VotingToken.json b/src/uma/abi/VotingToken.json index ca11b8f..1ddb798 100644 --- a/src/uma/abi/VotingToken.json +++ b/src/uma/abi/VotingToken.json @@ -182,8 +182,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -226,8 +225,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -251,8 +249,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -278,8 +275,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -322,8 +318,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -347,8 +342,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -409,8 +403,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -472,8 +465,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], @@ -486,8 +478,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -506,8 +497,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ diff --git a/src/uma/abi/WETH9.json b/src/uma/abi/WETH9.json index 25bce4f..3c32b42 100644 --- a/src/uma/abi/WETH9.json +++ b/src/uma/abi/WETH9.json @@ -89,8 +89,7 @@ }, { "stateMutability": "payable", - "type": "fallback", - "payable": true + "type": "fallback" }, { "inputs": [ @@ -114,8 +113,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -134,8 +132,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], @@ -148,8 +145,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], @@ -162,8 +158,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], @@ -176,21 +171,18 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "stateMutability": "payable", - "type": "receive", - "payable": true + "type": "receive" }, { "inputs": [], "name": "deposit", "outputs": [], "stateMutability": "payable", - "type": "function", - "payable": true + "type": "function" }, { "inputs": [ @@ -216,8 +208,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ From d82745b281525ef0f22fb4a41cf1a7be3996ffe1 Mon Sep 17 00:00:00 2001 From: Adrian Li Date: Tue, 2 Jun 2020 18:44:50 -0400 Subject: [PATCH 07/17] expiringMultiPartyLibAbi is empty --- src/uma/contracts.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/uma/contracts.ts b/src/uma/contracts.ts index dab3439..1797e32 100644 --- a/src/uma/contracts.ts +++ b/src/uma/contracts.ts @@ -1,6 +1,5 @@ import addressWhitelistAbi from "./abi/AddressWhitelist.json"; import designatedVotingFactoryAbi from "./abi/DesignatedVotingFactory.json"; -import expiringMultiPartyLibAbi from "./abi/expiringMultiPartyLib.json"; import expiringMultiPartyCreatorAbi from "./abi/ExpiringMultiPartyCreator.json"; import financialContractsAdminAbi from "./abi/FinancialContractsAdmin.json"; import finderAbi from "./abi/Finder.json"; @@ -23,7 +22,7 @@ const contracts = { address: "0xE81EeE5Da165fA6863bBc82dF66E62d18625d592", }, expiringMultiPartyLib: { - abi: expiringMultiPartyLibAbi, + abi: [], address: "0x09AFD24Acc170c16f4fF64BDf2A4818C515440e8", }, expiringMultiPartyCreator: { From c71c9f41c514b9d13085bb9e711dedd4d9b7369b Mon Sep 17 00:00:00 2001 From: Adrian Li Date: Tue, 2 Jun 2020 19:07:40 -0400 Subject: [PATCH 08/17] fix kyber test slippage --- tests/kyber.test.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/kyber.test.ts b/tests/kyber.test.ts index 06ad2a4..33a823b 100644 --- a/tests/kyber.test.ts +++ b/tests/kyber.test.ts @@ -28,8 +28,8 @@ describe("kyber", () => { ); const ethToSwap = 5; - const ethBefore = await wallet.getBalance(); - const daiBefore = await daiContract.balanceOf(wallet.address); + const ethBeforeWei = await wallet.getBalance(); + const daiBeforeWei = await daiContract.balanceOf(wallet.address); const { expectedRate, @@ -40,7 +40,8 @@ describe("kyber", () => { parseEther(`${ethToSwap}`), ); - const expectedDai = expectedRate.mul(bigNumberify(`${ethToSwap}`)); + const expectedDaiWei = expectedRate.mul(bigNumberify(`${ethToSwap}`)); + const expectedDai = parseFloat(fromWei(expectedDaiWei)); // do the actual swapping const minConversionRate = slippageRate; @@ -53,13 +54,14 @@ describe("kyber", () => { }, ); - const ethAfter = await wallet.getBalance(); - const daiAfter = await daiContract.balanceOf(wallet.address); + const ethAfterWei = await wallet.getBalance(); + const daiAfterWei = await daiContract.balanceOf(wallet.address); - const ethLost = parseFloat(fromWei(ethBefore.sub(ethAfter))); + const daiAfter = parseFloat(fromWei(daiAfterWei)); + const ethLost = parseFloat(fromWei(ethBeforeWei.sub(ethAfterWei))); - expect(fromWei(daiBefore)).toBe("0.0"); - expect(fromWei(daiAfter)).toBe(fromWei(expectedDai)); + expect(fromWei(daiBeforeWei)).toBe("0.0"); + expect(daiAfter).toBeCloseTo(expectedDai); expect(ethLost).toBeCloseTo(ethToSwap); }); }); From ec93df71d148e0fdbe4d8da7337c110f7e859e8c Mon Sep 17 00:00:00 2001 From: Adrian Li Date: Tue, 2 Jun 2020 19:12:11 -0400 Subject: [PATCH 09/17] bump version and release --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ba98232..8604664 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@studydefi/money-legos", - "version": "2.2.1", + "version": "2.3.1", "main": "index.js", "types": "index.d.ts", "repository": "git@github.com:studydefi/money-legos.git", From 5302c53fa409c82a3d6f624255c6d38a4735afe6 Mon Sep 17 00:00:00 2001 From: Adrian Li Date: Tue, 2 Jun 2020 22:51:57 -0400 Subject: [PATCH 10/17] add EMP into whitelist for script --- scripts/getAbisFromUMA.js | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/getAbisFromUMA.js b/scripts/getAbisFromUMA.js index e3b7058..013edb0 100644 --- a/scripts/getAbisFromUMA.js +++ b/scripts/getAbisFromUMA.js @@ -16,6 +16,7 @@ const fileFilter = [ "DesignatedVotingFactory", "WETH9", "ExpiringMultiPartyLib", + "ExpiringMultiParty", "TokenFactory", "AddressWhitelist", "ExpiringMultiPartyCreator", From 86b3db89581bc3936291284f429e38fc121c161b Mon Sep 17 00:00:00 2001 From: Adrian Li Date: Tue, 2 Jun 2020 22:52:06 -0400 Subject: [PATCH 11/17] add ABI back in --- src/uma/abi/ExpiringMultiParty.json | 1641 +++++++++++++++++++++++++++ 1 file changed, 1641 insertions(+) create mode 100644 src/uma/abi/ExpiringMultiParty.json diff --git a/src/uma/abi/ExpiringMultiParty.json b/src/uma/abi/ExpiringMultiParty.json new file mode 100644 index 0000000..ba2cc36 --- /dev/null +++ b/src/uma/abi/ExpiringMultiParty.json @@ -0,0 +1,1641 @@ +[ + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "expirationTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "withdrawalLiveness", + "type": "uint256" + }, + { + "internalType": "address", + "name": "collateralAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "finderAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenFactoryAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "timerAddress", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "priceFeedIdentifier", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "syntheticName", + "type": "string" + }, + { + "internalType": "string", + "name": "syntheticSymbol", + "type": "string" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "minSponsorTokens", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "liquidationLiveness", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "collateralRequirement", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "disputeBondPct", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "sponsorDisputeRewardPct", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "disputerDisputeRewardPct", + "type": "tuple" + } + ], + "internalType": "struct Liquidatable.ConstructorParams", + "name": "params", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + } + ], + "name": "ContractExpired", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "collateralAmount", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "liquidator", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "disputer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "liquidationId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "disputeSucceeded", + "type": "bool" + } + ], + "name": "DisputeSettled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "originalExpirationTimestamp", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shutdownTimestamp", + "type": "uint256" + } + ], + "name": "EmergencyShutdown", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sponsor", + "type": "address" + } + ], + "name": "EndedSponsorPosition", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "FinalFeesPaid", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "liquidator", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "liquidationId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokensOutstanding", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lockedCollateral", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "liquidatedCollateral", + "type": "uint256" + } + ], + "name": "LiquidationCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "liquidator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "disputer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "liquidationId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "disputeBondAmount", + "type": "uint256" + } + ], + "name": "LiquidationDisputed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "withdrawalAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "enum Liquidatable.Status", + "name": "liquidationStatus", + "type": "uint8" + } + ], + "name": "LiquidationWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sponsor", + "type": "address" + } + ], + "name": "NewSponsor", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "collateralAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenAmount", + "type": "uint256" + } + ], + "name": "PositionCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "collateralAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenAmount", + "type": "uint256" + } + ], + "name": "Redeem", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "regularFee", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "lateFee", + "type": "uint256" + } + ], + "name": "RegularFeesPaid", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldSponsor", + "type": "address" + } + ], + "name": "RequestTransferPosition", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldSponsor", + "type": "address" + } + ], + "name": "RequestTransferPositionCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldSponsor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newSponsor", + "type": "address" + } + ], + "name": "RequestTransferPositionExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "collateralAmount", + "type": "uint256" + } + ], + "name": "RequestWithdrawal", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "collateralAmount", + "type": "uint256" + } + ], + "name": "RequestWithdrawalCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "collateralAmount", + "type": "uint256" + } + ], + "name": "RequestWithdrawalExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "collateralReturned", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokensBurned", + "type": "uint256" + } + ], + "name": "SettleExpiredPosition", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "collateralAmount", + "type": "uint256" + } + ], + "name": "Withdrawal", + "type": "event" + }, + { + "inputs": [], + "name": "cancelTransferPosition", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "cancelWithdrawal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "collateralCurrency", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "collateralRequirement", + "outputs": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "contractState", + "outputs": [ + { + "internalType": "enum PricelessPositionManager.ContractState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "collateralAmount", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "numTokens", + "type": "tuple" + } + ], + "name": "create", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "minCollateralPerToken", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "maxCollateralPerToken", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "maxTokensToLiquidate", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "createLiquidation", + "outputs": [ + { + "internalType": "uint256", + "name": "liquidationId", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "tokensLiquidated", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "finalFeeBond", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "cumulativeFeeMultiplier", + "outputs": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "collateralAmount", + "type": "tuple" + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "collateralAmount", + "type": "tuple" + } + ], + "name": "depositTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "liquidationId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "sponsor", + "type": "address" + } + ], + "name": "dispute", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "totalPaid", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "disputeBondPct", + "outputs": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "disputerDisputeRewardPct", + "outputs": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "emergencyShutdown", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "expirationTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "expire", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "expiryPrice", + "outputs": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "finder", + "outputs": [ + { + "internalType": "contract FinderInterface", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sponsor", + "type": "address" + } + ], + "name": "getCollateral", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "collateralAmount", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sponsor", + "type": "address" + } + ], + "name": "getLiquidations", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "internalType": "address", + "name": "liquidator", + "type": "address" + }, + { + "internalType": "enum Liquidatable.Status", + "name": "state", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "liquidationTime", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "tokensOutstanding", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "lockedCollateral", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "liquidatedCollateral", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "rawUnitCollateral", + "type": "tuple" + }, + { + "internalType": "address", + "name": "disputer", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "settlementPrice", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "finalFee", + "type": "tuple" + } + ], + "internalType": "struct Liquidatable.LiquidationData[]", + "name": "liquidationData", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "liquidationLiveness", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "liquidations", + "outputs": [ + { + "internalType": "address", + "name": "sponsor", + "type": "address" + }, + { + "internalType": "address", + "name": "liquidator", + "type": "address" + }, + { + "internalType": "enum Liquidatable.Status", + "name": "state", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "liquidationTime", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "tokensOutstanding", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "lockedCollateral", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "liquidatedCollateral", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "rawUnitCollateral", + "type": "tuple" + }, + { + "internalType": "address", + "name": "disputer", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "settlementPrice", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "finalFee", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minSponsorTokens", + "outputs": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "payRegularFees", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "totalPaid", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "pfc", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "positions", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "tokensOutstanding", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "withdrawalRequestPassTimestamp", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "withdrawalRequestAmount", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "rawCollateral", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "transferPositionRequestPassTimestamp", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "priceIdentifier", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rawLiquidationCollateral", + "outputs": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rawTotalPositionCollateral", + "outputs": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "numTokens", + "type": "tuple" + } + ], + "name": "redeem", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "amountWithdrawn", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "remargin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "requestTransferPosition", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "collateralAmount", + "type": "tuple" + } + ], + "name": "requestWithdrawal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "time", + "type": "uint256" + } + ], + "name": "setCurrentTime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "settleExpired", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "amountWithdrawn", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sponsorDisputeRewardPct", + "outputs": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "timerAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tokenCurrency", + "outputs": [ + { + "internalType": "contract ExpandedIERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalPositionCollateral", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "totalCollateral", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalTokensOutstanding", + "outputs": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newSponsorAddress", + "type": "address" + } + ], + "name": "transferPositionPassedRequest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "collateralAmount", + "type": "tuple" + } + ], + "name": "withdraw", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "amountWithdrawn", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "liquidationId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "sponsor", + "type": "address" + } + ], + "name": "withdrawLiquidation", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "amountWithdrawn", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawPassedRequest", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "rawValue", + "type": "uint256" + } + ], + "internalType": "struct FixedPoint.Unsigned", + "name": "amountWithdrawn", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawalLiveness", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } +] \ No newline at end of file From 81a40d646578c7769df87c0fea3c32c6a8b4b76a Mon Sep 17 00:00:00 2001 From: Adrian Li Date: Tue, 2 Jun 2020 22:53:22 -0400 Subject: [PATCH 12/17] link ABI for EMP --- src/uma/contracts.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/uma/contracts.ts b/src/uma/contracts.ts index 1797e32..156b51f 100644 --- a/src/uma/contracts.ts +++ b/src/uma/contracts.ts @@ -1,5 +1,6 @@ import addressWhitelistAbi from "./abi/AddressWhitelist.json"; import designatedVotingFactoryAbi from "./abi/DesignatedVotingFactory.json"; +import expiringMultiPartyAbi from "./abi/ExpiringMultiParty.json"; import expiringMultiPartyCreatorAbi from "./abi/ExpiringMultiPartyCreator.json"; import financialContractsAdminAbi from "./abi/FinancialContractsAdmin.json"; import finderAbi from "./abi/Finder.json"; @@ -7,10 +8,10 @@ import governorAbi from "./abi/Governor.json"; import identifierWhitelistAbi from "./abi/IdentifierWhitelist.json"; import registryAbi from "./abi/Registry.json"; import storeAbi from "./abi/Store.json"; +import tokenFactoryAbi from "./abi/TokenFactory.json"; import votingAbi from "./abi/Voting.json"; import votingTokenAbi from "./abi/VotingToken.json"; import weth9Abi from "./abi/WETH9.json"; -import tokenFactoryAbi from "./abi/TokenFactory.json"; const contracts = { addressWhitelist: { @@ -21,6 +22,9 @@ const contracts = { abi: designatedVotingFactoryAbi, address: "0xE81EeE5Da165fA6863bBc82dF66E62d18625d592", }, + expiringMultiParty: { + abi: expiringMultiPartyAbi, + }, expiringMultiPartyLib: { abi: [], address: "0x09AFD24Acc170c16f4fF64BDf2A4818C515440e8", From 3f758e3bc793682bfa269b19f4090dfcbddfe14d Mon Sep 17 00:00:00 2001 From: Adrian Li Date: Tue, 2 Jun 2020 22:53:58 -0400 Subject: [PATCH 13/17] bump version for missing EMP hotfix --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8604664..519efea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@studydefi/money-legos", - "version": "2.3.1", + "version": "2.3.2", "main": "index.js", "types": "index.d.ts", "repository": "git@github.com:studydefi/money-legos.git", From a78feea851c5b136f5c63c09fabc252bbe1ca9d7 Mon Sep 17 00:00:00 2001 From: Kris Urbas Date: Wed, 17 Jun 2020 19:50:05 +0200 Subject: [PATCH 14/17] add new Idle contracts --- docs/idle.md | 3 +++ src/idle/contracts.ts | 13 +++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/idle.md b/docs/idle.md index cd45e8d..7ec68cb 100644 --- a/docs/idle.md +++ b/docs/idle.md @@ -16,6 +16,9 @@ List of all available contracts idle.maxYield.dai.address; idle.maxYield.usdc.address; idle.maxYield.usdt.address; +idle.maxYield.susd.address; +idle.maxYield.tusd.address; +idle.maxYield.wbtc.address; idle.riskAdjusted.dai.address; idle.riskAdjusted.usdc.address; diff --git a/src/idle/contracts.ts b/src/idle/contracts.ts index 81df729..b471ca4 100644 --- a/src/idle/contracts.ts +++ b/src/idle/contracts.ts @@ -1,7 +1,7 @@ const contracts = { maxYield: { dai: { - address: "0x78751b12da02728f467a44eac40f5cbc16bd7934", + address: "0x78751B12Da02728F467A44eAc40F5cbc16Bd7934", }, usdc: { address: "0x12B98C621E8754Ae70d0fDbBC73D6208bC3e3cA6", @@ -9,6 +9,15 @@ const contracts = { usdt: { address: "0x63D27B3DA94A9E871222CB0A32232674B02D2f2D", }, + susd: { + address: "0xb39ca0261a1b2986a6a9Fe38d344B56374963dE5", + }, + tusd: { + address: "0x7DB7A4a50b26602E56536189Aa94678C80F8E5b6", + }, + wbtc: { + address: "0xD6f279B7ccBCD70F8be439d25B9Df93AEb60eC55", + }, }, riskAdjusted: { dai: { @@ -18,7 +27,7 @@ const contracts = { address: "0xcDdB1Bceb7a1979C6caa0229820707429dd3Ec6C", }, usdt: { - address: "0x42740698959761baf1b06baa51efbd88cb1d862b", + address: "0x42740698959761BAF1B06baa51EfBD88CB1D862B", }, }, }; From 16b87061461ede9d0127edc0d1d3bfcb962c9598 Mon Sep 17 00:00:00 2001 From: Adrian Li Date: Wed, 17 Jun 2020 16:17:54 -0400 Subject: [PATCH 15/17] bump version for new Idle contracts --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 519efea..14cbff0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@studydefi/money-legos", - "version": "2.3.2", + "version": "2.3.3", "main": "index.js", "types": "index.d.ts", "repository": "git@github.com:studydefi/money-legos.git", From d10cb51195822e4aa7914aae59414a02f134bef0 Mon Sep 17 00:00:00 2001 From: Kris Urbas Date: Mon, 22 Jun 2020 09:31:12 +0200 Subject: [PATCH 16/17] Update Idle contracts --- src/idle/contracts.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/idle/contracts.ts b/src/idle/contracts.ts index b471ca4..3a531a3 100644 --- a/src/idle/contracts.ts +++ b/src/idle/contracts.ts @@ -10,10 +10,10 @@ const contracts = { address: "0x63D27B3DA94A9E871222CB0A32232674B02D2f2D", }, susd: { - address: "0xb39ca0261a1b2986a6a9Fe38d344B56374963dE5", + address: "0xE79E177d2a5c7085027d7C64c8F271c81430fc9b", }, tusd: { - address: "0x7DB7A4a50b26602E56536189Aa94678C80F8E5b6", + address: "0x51C77689A9c2e8cCBEcD4eC9770a1fA5fA83EeF1", }, wbtc: { address: "0xD6f279B7ccBCD70F8be439d25B9Df93AEb60eC55", From 0f2c3a58389029a0f7fd1b3eceff807a1942bc86 Mon Sep 17 00:00:00 2001 From: Adrian Li Date: Mon, 22 Jun 2020 11:02:26 -0400 Subject: [PATCH 17/17] Bump version for new release See #63 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 14cbff0..bd657b6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@studydefi/money-legos", - "version": "2.3.3", + "version": "2.3.4", "main": "index.js", "types": "index.d.ts", "repository": "git@github.com:studydefi/money-legos.git",