diff --git a/app/src/abi/airdrop.json b/app/src/abi/airdrop.json new file mode 100644 index 0000000000..2551a0d7fe --- /dev/null +++ b/app/src/abi/airdrop.json @@ -0,0 +1 @@ +[{"inputs":[{"internalType":"address","name":"token_","type":"address"},{"internalType":"bytes32","name":"merkleRoot_","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","type":"event"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"isClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}] \ No newline at end of file diff --git a/app/src/abi/conditionalTokens.json b/app/src/abi/conditionalTokens.json new file mode 100644 index 0000000000..3aba6b6301 --- /dev/null +++ b/app/src/abi/conditionalTokens.json @@ -0,0 +1 @@ +[{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"collateralToken","type":"address"},{"name":"parentCollectionId","type":"bytes32"},{"name":"conditionId","type":"bytes32"},{"name":"indexSets","type":"uint256[]"}],"name":"redeemPositions","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"},{"name":"","type":"uint256"}],"name":"payoutNumerators","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"ids","type":"uint256[]"},{"name":"values","type":"uint256[]"},{"name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"collateralToken","type":"address"},{"name":"collectionId","type":"bytes32"}],"name":"getPositionId","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"owners","type":"address[]"},{"name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"collateralToken","type":"address"},{"name":"parentCollectionId","type":"bytes32"},{"name":"conditionId","type":"bytes32"},{"name":"partition","type":"uint256[]"},{"name":"amount","type":"uint256"}],"name":"splitPosition","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"oracle","type":"address"},{"name":"questionId","type":"bytes32"},{"name":"outcomeSlotCount","type":"uint256"}],"name":"getConditionId","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"parentCollectionId","type":"bytes32"},{"name":"conditionId","type":"bytes32"},{"name":"indexSet","type":"uint256"}],"name":"getCollectionId","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"collateralToken","type":"address"},{"name":"parentCollectionId","type":"bytes32"},{"name":"conditionId","type":"bytes32"},{"name":"partition","type":"uint256[]"},{"name":"amount","type":"uint256"}],"name":"mergePositions","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"operator","type":"address"},{"name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"questionId","type":"bytes32"},{"name":"payouts","type":"uint256[]"}],"name":"reportPayouts","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"conditionId","type":"bytes32"}],"name":"getOutcomeSlotCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"oracle","type":"address"},{"name":"questionId","type":"bytes32"},{"name":"outcomeSlotCount","type":"uint256"}],"name":"prepareCondition","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"payoutDenominator","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"id","type":"uint256"},{"name":"value","type":"uint256"},{"name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"conditionId","type":"bytes32"},{"indexed":true,"name":"oracle","type":"address"},{"indexed":true,"name":"questionId","type":"bytes32"},{"indexed":false,"name":"outcomeSlotCount","type":"uint256"}],"name":"ConditionPreparation","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"conditionId","type":"bytes32"},{"indexed":true,"name":"oracle","type":"address"},{"indexed":true,"name":"questionId","type":"bytes32"},{"indexed":false,"name":"outcomeSlotCount","type":"uint256"},{"indexed":false,"name":"payoutNumerators","type":"uint256[]"}],"name":"ConditionResolution","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"stakeholder","type":"address"},{"indexed":false,"name":"collateralToken","type":"address"},{"indexed":true,"name":"parentCollectionId","type":"bytes32"},{"indexed":true,"name":"conditionId","type":"bytes32"},{"indexed":false,"name":"partition","type":"uint256[]"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"PositionSplit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"stakeholder","type":"address"},{"indexed":false,"name":"collateralToken","type":"address"},{"indexed":true,"name":"parentCollectionId","type":"bytes32"},{"indexed":true,"name":"conditionId","type":"bytes32"},{"indexed":false,"name":"partition","type":"uint256[]"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"PositionsMerge","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"redeemer","type":"address"},{"indexed":true,"name":"collateralToken","type":"address"},{"indexed":true,"name":"parentCollectionId","type":"bytes32"},{"indexed":false,"name":"conditionId","type":"bytes32"},{"indexed":false,"name":"indexSets","type":"uint256[]"},{"indexed":false,"name":"payout","type":"uint256"}],"name":"PayoutRedemption","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"operator","type":"address"},{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"id","type":"uint256"},{"indexed":false,"name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"operator","type":"address"},{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"ids","type":"uint256[]"},{"indexed":false,"name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"operator","type":"address"},{"indexed":false,"name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"value","type":"string"},{"indexed":true,"name":"id","type":"uint256"}],"name":"URI","type":"event"}] \ No newline at end of file diff --git a/app/src/abi/dxTcr.json b/app/src/abi/dxTcr.json new file mode 100644 index 0000000000..875e11f4f9 --- /dev/null +++ b/app/src/abi/dxTcr.json @@ -0,0 +1 @@ +[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"listId","type":"uint256"},{"indexed":false,"internalType":"string","name":"listName","type":"string"}],"name":"AddList","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"listId","type":"uint256"},{"indexed":false,"internalType":"address","name":"token","type":"address"}],"name":"AddToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"listId","type":"uint256"},{"indexed":false,"internalType":"address","name":"token","type":"address"}],"name":"RemoveToken","type":"event"},{"inputs":[{"internalType":"string","name":"_listName","type":"string"}],"name":"addList","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_listId","type":"uint256"},{"internalType":"address[]","name":"_tokens","type":"address[]"}],"name":"addTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_trader","type":"address"},{"internalType":"address[]","name":"_assetAddresses","type":"address[]"}],"name":"getExternalBalances","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_listId","type":"uint256"}],"name":"getTokens","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_tokens","type":"address[]"}],"name":"getTokensData","outputs":[{"internalType":"string[]","name":"names","type":"string[]"},{"internalType":"string[]","name":"symbols","type":"string[]"},{"internalType":"uint256[]","name":"decimals","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_listId","type":"uint256"},{"internalType":"uint256","name":"_start","type":"uint256"},{"internalType":"uint256","name":"_end","type":"uint256"}],"name":"getTokensRange","outputs":[{"internalType":"address[]","name":"tokensRange","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_listId","type":"uint256"},{"internalType":"address","name":"_token","type":"address"}],"name":"isTokenActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"listCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_listId","type":"uint256"},{"internalType":"address[]","name":"_tokens","type":"address[]"}],"name":"removeTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tcrs","outputs":[{"internalType":"uint256","name":"listId","type":"uint256"},{"internalType":"string","name":"listName","type":"string"},{"internalType":"uint256","name":"activeTokenCount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file diff --git a/app/src/abi/erc20.json b/app/src/abi/erc20.json new file mode 100644 index 0000000000..5b86559751 --- /dev/null +++ b/app/src/abi/erc20.json @@ -0,0 +1 @@ +[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"}] \ No newline at end of file diff --git a/app/src/abi/gnosisSafe.json b/app/src/abi/gnosisSafe.json new file mode 100644 index 0000000000..0f3b53fb23 --- /dev/null +++ b/app/src/abi/gnosisSafe.json @@ -0,0 +1 @@ +[{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"constant":true,"inputs":[],"name":"masterCopy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"AddedOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"approvedHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"owner","type":"address"}],"name":"ApproveHash","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"masterCopy","type":"address"}],"name":"ChangedMasterCopy","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"threshold","type":"uint256"}],"name":"ChangedThreshold","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract Module","name":"module","type":"address"}],"name":"DisabledModule","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract Module","name":"module","type":"address"}],"name":"EnabledModule","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"txHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"payment","type":"uint256"}],"name":"ExecutionFailure","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"module","type":"address"}],"name":"ExecutionFromModuleFailure","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"module","type":"address"}],"name":"ExecutionFromModuleSuccess","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"txHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"payment","type":"uint256"}],"name":"ExecutionSuccess","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"RemovedOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"msgHash","type":"bytes32"}],"name":"SignMsg","type":"event"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"constant":true,"inputs":[],"name":"NAME","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"_threshold","type":"uint256"}],"name":"addOwnerWithThreshold","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"hashToApprove","type":"bytes32"}],"name":"approveHash","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"approvedHashes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_masterCopy","type":"address"}],"name":"changeMasterCopy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_threshold","type":"uint256"}],"name":"changeThreshold","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"contract Module","name":"prevModule","type":"address"},{"internalType":"contract Module","name":"module","type":"address"}],"name":"disableModule","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"domainSeparator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"contract Module","name":"module","type":"address"}],"name":"enableModule","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"enum Enum.Operation","name":"operation","type":"uint8"},{"internalType":"uint256","name":"safeTxGas","type":"uint256"},{"internalType":"uint256","name":"baseGas","type":"uint256"},{"internalType":"uint256","name":"gasPrice","type":"uint256"},{"internalType":"address","name":"gasToken","type":"address"},{"internalType":"address","name":"refundReceiver","type":"address"},{"internalType":"uint256","name":"_nonce","type":"uint256"}],"name":"encodeTransactionData","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"enum Enum.Operation","name":"operation","type":"uint8"},{"internalType":"uint256","name":"safeTxGas","type":"uint256"},{"internalType":"uint256","name":"baseGas","type":"uint256"},{"internalType":"uint256","name":"gasPrice","type":"uint256"},{"internalType":"address","name":"gasToken","type":"address"},{"internalType":"address payable","name":"refundReceiver","type":"address"},{"internalType":"bytes","name":"signatures","type":"bytes"}],"name":"execTransaction","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"enum Enum.Operation","name":"operation","type":"uint8"}],"name":"execTransactionFromModule","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"enum Enum.Operation","name":"operation","type":"uint8"}],"name":"execTransactionFromModuleReturnData","outputs":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"bytes","name":"returnData","type":"bytes"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes","name":"message","type":"bytes"}],"name":"getMessageHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getModules","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"start","type":"address"},{"internalType":"uint256","name":"pageSize","type":"uint256"}],"name":"getModulesPaginated","outputs":[{"internalType":"address[]","name":"array","type":"address[]"},{"internalType":"address","name":"next","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getOwners","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"enum Enum.Operation","name":"operation","type":"uint8"},{"internalType":"uint256","name":"safeTxGas","type":"uint256"},{"internalType":"uint256","name":"baseGas","type":"uint256"},{"internalType":"uint256","name":"gasPrice","type":"uint256"},{"internalType":"address","name":"gasToken","type":"address"},{"internalType":"address","name":"refundReceiver","type":"address"},{"internalType":"uint256","name":"_nonce","type":"uint256"}],"name":"getTransactionHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes","name":"_data","type":"bytes"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"isValidSignature","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"nonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"prevOwner","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"_threshold","type":"uint256"}],"name":"removeOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"enum Enum.Operation","name":"operation","type":"uint8"}],"name":"requiredTxGas","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"handler","type":"address"}],"name":"setFallbackHandler","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address[]","name":"_owners","type":"address[]"},{"internalType":"uint256","name":"_threshold","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"address","name":"fallbackHandler","type":"address"},{"internalType":"address","name":"paymentToken","type":"address"},{"internalType":"uint256","name":"payment","type":"uint256"},{"internalType":"address payable","name":"paymentReceiver","type":"address"}],"name":"setup","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"signMessage","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"signedMessages","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"prevOwner","type":"address"},{"internalType":"address","name":"oldOwner","type":"address"},{"internalType":"address","name":"newOwner","type":"address"}],"name":"swapOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file diff --git a/app/src/abi/klerosBadge.json b/app/src/abi/klerosBadge.json new file mode 100644 index 0000000000..1fb5d596ea --- /dev/null +++ b/app/src/abi/klerosBadge.json @@ -0,0 +1 @@ +[{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"AddedOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"approvedHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"owner","type":"address"}],"name":"ApproveHash","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"masterCopy","type":"address"}],"name":"ChangedMasterCopy","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"threshold","type":"uint256"}],"name":"ChangedThreshold","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract Module","name":"module","type":"address"}],"name":"DisabledModule","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract Module","name":"module","type":"address"}],"name":"EnabledModule","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"txHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"payment","type":"uint256"}],"name":"ExecutionFailure","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"module","type":"address"}],"name":"ExecutionFromModuleFailure","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"module","type":"address"}],"name":"ExecutionFromModuleSuccess","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"txHash","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"payment","type":"uint256"}],"name":"ExecutionSuccess","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"RemovedOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"msgHash","type":"bytes32"}],"name":"SignMsg","type":"event"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"constant":true,"inputs":[],"name":"NAME","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"_threshold","type":"uint256"}],"name":"addOwnerWithThreshold","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"hashToApprove","type":"bytes32"}],"name":"approveHash","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"approvedHashes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_masterCopy","type":"address"}],"name":"changeMasterCopy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_threshold","type":"uint256"}],"name":"changeThreshold","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"contract Module","name":"prevModule","type":"address"},{"internalType":"contract Module","name":"module","type":"address"}],"name":"disableModule","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"domainSeparator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"contract Module","name":"module","type":"address"}],"name":"enableModule","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"enum Enum.Operation","name":"operation","type":"uint8"},{"internalType":"uint256","name":"safeTxGas","type":"uint256"},{"internalType":"uint256","name":"baseGas","type":"uint256"},{"internalType":"uint256","name":"gasPrice","type":"uint256"},{"internalType":"address","name":"gasToken","type":"address"},{"internalType":"address","name":"refundReceiver","type":"address"},{"internalType":"uint256","name":"_nonce","type":"uint256"}],"name":"encodeTransactionData","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"enum Enum.Operation","name":"operation","type":"uint8"},{"internalType":"uint256","name":"safeTxGas","type":"uint256"},{"internalType":"uint256","name":"baseGas","type":"uint256"},{"internalType":"uint256","name":"gasPrice","type":"uint256"},{"internalType":"address","name":"gasToken","type":"address"},{"internalType":"address payable","name":"refundReceiver","type":"address"},{"internalType":"bytes","name":"signatures","type":"bytes"}],"name":"execTransaction","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"enum Enum.Operation","name":"operation","type":"uint8"}],"name":"execTransactionFromModule","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"enum Enum.Operation","name":"operation","type":"uint8"}],"name":"execTransactionFromModuleReturnData","outputs":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"bytes","name":"returnData","type":"bytes"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes","name":"message","type":"bytes"}],"name":"getMessageHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getModules","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"start","type":"address"},{"internalType":"uint256","name":"pageSize","type":"uint256"}],"name":"getModulesPaginated","outputs":[{"internalType":"address[]","name":"array","type":"address[]"},{"internalType":"address","name":"next","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getOwners","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"enum Enum.Operation","name":"operation","type":"uint8"},{"internalType":"uint256","name":"safeTxGas","type":"uint256"},{"internalType":"uint256","name":"baseGas","type":"uint256"},{"internalType":"uint256","name":"gasPrice","type":"uint256"},{"internalType":"address","name":"gasToken","type":"address"},{"internalType":"address","name":"refundReceiver","type":"address"},{"internalType":"uint256","name":"_nonce","type":"uint256"}],"name":"getTransactionHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes","name":"_data","type":"bytes"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"isValidSignature","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"nonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"prevOwner","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"_threshold","type":"uint256"}],"name":"removeOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"enum Enum.Operation","name":"operation","type":"uint8"}],"name":"requiredTxGas","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"handler","type":"address"}],"name":"setFallbackHandler","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address[]","name":"_owners","type":"address[]"},{"internalType":"uint256","name":"_threshold","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"address","name":"fallbackHandler","type":"address"},{"internalType":"address","name":"paymentToken","type":"address"},{"internalType":"uint256","name":"payment","type":"uint256"},{"internalType":"address payable","name":"paymentReceiver","type":"address"}],"name":"setup","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"signMessage","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"signedMessages","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"prevOwner","type":"address"},{"internalType":"address","name":"oldOwner","type":"address"},{"internalType":"address","name":"newOwner","type":"address"}],"name":"swapOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file diff --git a/app/src/abi/klerosTokensView.json b/app/src/abi/klerosTokensView.json new file mode 100644 index 0000000000..d898161cd8 --- /dev/null +++ b/app/src/abi/klerosTokensView.json @@ -0,0 +1 @@ +[{"constant":true,"inputs":[{"internalType":"address","name":"_t2crAddress","type":"address"},{"internalType":"address[]","name":"_tokenAddresses","type":"address[]"}],"name":"getTokensIDsForAddresses","outputs":[{"internalType":"bytes32[]","name":"result","type":"bytes32[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_t2crAddress","type":"address"},{"internalType":"bytes32[]","name":"_tokenIDs","type":"bytes32[]"}],"name":"getTokens","outputs":[{"components":[{"internalType":"bytes32","name":"ID","type":"bytes32"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"ticker","type":"string"},{"internalType":"address","name":"addr","type":"address"},{"internalType":"string","name":"symbolMultihash","type":"string"},{"internalType":"enum IArbitrableTokenList.TokenStatus","name":"status","type":"uint8"},{"internalType":"uint256","name":"decimals","type":"uint256"}],"internalType":"struct TokensView.Token[]","name":"tokens","type":"tuple[]"}],"payable":false,"stateMutability":"view","type":"function"}] \ No newline at end of file diff --git a/app/src/abi/marketMaker.json b/app/src/abi/marketMaker.json new file mode 100644 index 0000000000..cf2da1901f --- /dev/null +++ b/app/src/abi/marketMaker.json @@ -0,0 +1 @@ +[{"constant":true,"inputs":[{"name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"amount","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"}],"name":"withdrawFees","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"feesWithdrawableBy","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"sender","type":"address"},{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"investmentAmount","type":"uint256"},{"name":"outcomeIndex","type":"uint256"},{"name":"minOutcomeTokensToBuy","type":"uint256"}],"name":"buy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"returnAmount","type":"uint256"},{"name":"outcomeIndex","type":"uint256"}],"name":"calcSellAmount","outputs":[{"name":"outcomeTokenSellAmount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"conditionalTokens","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"collectedFees","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"collateralToken","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"operator","type":"address"},{"name":"from","type":"address"},{"name":"ids","type":"uint256[]"},{"name":"values","type":"uint256[]"},{"name":"data","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"name":"","type":"bytes4"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"returnAmount","type":"uint256"},{"name":"outcomeIndex","type":"uint256"},{"name":"maxOutcomeTokensToSell","type":"uint256"}],"name":"sell","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"addedFunds","type":"uint256"},{"name":"distributionHint","type":"uint256[]"}],"name":"addFunding","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"conditionIds","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"fee","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"sharesToBurn","type":"uint256"}],"name":"removeFunding","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"operator","type":"address"},{"name":"from","type":"address"},{"name":"id","type":"uint256"},{"name":"value","type":"uint256"},{"name":"data","type":"bytes"}],"name":"onERC1155Received","outputs":[{"name":"","type":"bytes4"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"investmentAmount","type":"uint256"},{"name":"outcomeIndex","type":"uint256"}],"name":"calcBuyAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"funder","type":"address"},{"indexed":false,"name":"amountsAdded","type":"uint256[]"},{"indexed":false,"name":"sharesMinted","type":"uint256"}],"name":"FPMMFundingAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"funder","type":"address"},{"indexed":false,"name":"amountsRemoved","type":"uint256[]"},{"indexed":false,"name":"collateralRemovedFromFeePool","type":"uint256"},{"indexed":false,"name":"sharesBurnt","type":"uint256"}],"name":"FPMMFundingRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"buyer","type":"address"},{"indexed":false,"name":"investmentAmount","type":"uint256"},{"indexed":false,"name":"feeAmount","type":"uint256"},{"indexed":true,"name":"outcomeIndex","type":"uint256"},{"indexed":false,"name":"outcomeTokensBought","type":"uint256"}],"name":"FPMMBuy","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"seller","type":"address"},{"indexed":false,"name":"returnAmount","type":"uint256"},{"indexed":false,"name":"feeAmount","type":"uint256"},{"indexed":true,"name":"outcomeIndex","type":"uint256"},{"indexed":false,"name":"outcomeTokensSold","type":"uint256"}],"name":"FPMMSell","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"}] \ No newline at end of file diff --git a/app/src/abi/marketMakerFactory.json b/app/src/abi/marketMakerFactory.json new file mode 100644 index 0000000000..3f5a880cb0 --- /dev/null +++ b/app/src/abi/marketMakerFactory.json @@ -0,0 +1 @@ +[{"constant":true,"inputs":[{"name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"implementationMaster","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"consData","type":"bytes"}],"name":"cloneConstructor","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"saltNonce","type":"uint256"},{"name":"conditionalTokens","type":"address"},{"name":"collateralToken","type":"address"},{"name":"conditionIds","type":"bytes32[]"},{"name":"fee","type":"uint256"},{"name":"initialFunds","type":"uint256"},{"name":"distributionHint","type":"uint256[]"}],"name":"create2FixedProductMarketMaker","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"operator","type":"address"},{"name":"from","type":"address"},{"name":"ids","type":"uint256[]"},{"name":"values","type":"uint256[]"},{"name":"data","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"name":"","type":"bytes4"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"operator","type":"address"},{"name":"from","type":"address"},{"name":"id","type":"uint256"},{"name":"value","type":"uint256"},{"name":"data","type":"bytes"}],"name":"onERC1155Received","outputs":[{"name":"","type":"bytes4"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"creator","type":"address"},{"indexed":false,"name":"fixedProductMarketMaker","type":"address"},{"indexed":false,"name":"conditionalTokens","type":"address"},{"indexed":false,"name":"collateralToken","type":"address"},{"indexed":false,"name":"conditionIds","type":"bytes32[]"},{"indexed":false,"name":"fee","type":"uint256"}],"name":"FixedProductMarketMakerCreation","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"funder","type":"address"},{"indexed":false,"name":"amountsAdded","type":"uint256[]"},{"indexed":false,"name":"sharesMinted","type":"uint256"}],"name":"FPMMFundingAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"funder","type":"address"},{"indexed":false,"name":"amountsRemoved","type":"uint256[]"},{"indexed":false,"name":"collateralRemovedFromFeePool","type":"uint256"},{"indexed":false,"name":"sharesBurnt","type":"uint256"}],"name":"FPMMFundingRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"buyer","type":"address"},{"indexed":false,"name":"investmentAmount","type":"uint256"},{"indexed":false,"name":"feeAmount","type":"uint256"},{"indexed":true,"name":"outcomeIndex","type":"uint256"},{"indexed":false,"name":"outcomeTokensBought","type":"uint256"}],"name":"FPMMBuy","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"seller","type":"address"},{"indexed":false,"name":"returnAmount","type":"uint256"},{"indexed":false,"name":"feeAmount","type":"uint256"},{"indexed":true,"name":"outcomeIndex","type":"uint256"},{"indexed":false,"name":"outcomeTokensSold","type":"uint256"}],"name":"FPMMSell","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"target","type":"address"},{"indexed":false,"name":"clone","type":"address"}],"name":"CloneCreated","type":"event"}] \ No newline at end of file diff --git a/app/src/abi/multiClaim.json b/app/src/abi/multiClaim.json new file mode 100644 index 0000000000..fc9776e96d --- /dev/null +++ b/app/src/abi/multiClaim.json @@ -0,0 +1 @@ +[{"inputs":[{"internalType":"address[]","name":"bridges","type":"address[]"},{"internalType":"bytes[]","name":"messages","type":"bytes[]"},{"internalType":"bytes[]","name":"signatures","type":"bytes[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file diff --git a/app/src/abi/omniBridgeMainnet.json b/app/src/abi/omniBridgeMainnet.json new file mode 100644 index 0000000000..fe781bcde1 --- /dev/null +++ b/app/src/abi/omniBridgeMainnet.json @@ -0,0 +1 @@ +[{"constant":false,"inputs":[{"name":"token","type":"address"},{"name":"_value","type":"uint256"}],"name":"relayTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_maxPerTx","type":"uint256"}],"name":"setExecutionMaxPerTx","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_token","type":"address"}],"name":"maxPerTx","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_messageId","type":"bytes32"}],"name":"fixFailedMessage","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_bridgeContract","type":"address"}],"name":"setBridgeContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_token","type":"address"},{"name":"_amount","type":"uint256"}],"name":"withinLimit","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_recipient","type":"address"},{"name":"_value","type":"uint256"}],"name":"handleBridgedTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_token","type":"address"}],"name":"executionMaxPerTx","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_token","type":"address"}],"name":"mediatorBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_token","type":"address"}],"name":"isTokenRegistered","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_dailyLimit","type":"uint256"}],"name":"setDailyLimit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_bridgeContract","type":"address"},{"name":"_mediatorContract","type":"address"},{"name":"_dailyLimitMaxPerTxMinPerTxArray","type":"uint256[3]"},{"name":"_executionDailyLimitExecutionMaxPerTxArray","type":"uint256[2]"},{"name":"_requestGasLimit","type":"uint256"},{"name":"_owner","type":"address"}],"name":"initialize","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isInitialized","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_token","type":"address"},{"name":"_amount","type":"uint256"}],"name":"withinExecutionLimit","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getCurrentDay","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_token","type":"address"}],"name":"executionDailyLimit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getBridgeMode","outputs":[{"name":"_data","type":"bytes4"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"_messageId","type":"bytes32"}],"name":"messageFixed","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_to","type":"address"}],"name":"claimTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_mediatorContract","type":"address"}],"name":"setMediatorContractOnOtherSide","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_token","type":"address"}],"name":"maxAvailablePerTx","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_dailyLimit","type":"uint256"}],"name":"setExecutionDailyLimit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_token","type":"address"}],"name":"tokenRegistrationMessageId","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"mediatorContractOnOtherSide","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_messageId","type":"bytes32"}],"name":"requestFailedMessageFix","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getBridgeInterfacesVersion","outputs":[{"name":"major","type":"uint64"},{"name":"minor","type":"uint64"},{"name":"patch","type":"uint64"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"_token","type":"address"}],"name":"minPerTx","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_value","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"onTokenTransfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_token","type":"address"},{"name":"_day","type":"uint256"}],"name":"totalSpentPerDay","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"},{"name":"_receiver","type":"address"},{"name":"_value","type":"uint256"}],"name":"relayTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"requestGasLimit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"bridgeContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_receiver","type":"address"}],"name":"fixMediatorBalance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_maxPerTx","type":"uint256"}],"name":"setMaxPerTx","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_minPerTx","type":"uint256"}],"name":"setMinPerTx","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_token","type":"address"},{"name":"_day","type":"uint256"}],"name":"totalExecutedPerDay","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_requestGasLimit","type":"uint256"}],"name":"setRequestGasLimit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_token","type":"address"}],"name":"dailyLimit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"messageId","type":"bytes32"},{"indexed":false,"name":"token","type":"address"},{"indexed":false,"name":"recipient","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"FailedMessageFixed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"token","type":"address"},{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":true,"name":"messageId","type":"bytes32"}],"name":"TokensBridgingInitiated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"token","type":"address"},{"indexed":true,"name":"recipient","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":true,"name":"messageId","type":"bytes32"}],"name":"TokensBridged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"token","type":"address"},{"indexed":false,"name":"newLimit","type":"uint256"}],"name":"DailyLimitChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"token","type":"address"},{"indexed":false,"name":"newLimit","type":"uint256"}],"name":"ExecutionDailyLimitChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"previousOwner","type":"address"},{"indexed":false,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}] \ No newline at end of file diff --git a/app/src/abi/omniBridgeXdai.json b/app/src/abi/omniBridgeXdai.json new file mode 100644 index 0000000000..b8800045ee --- /dev/null +++ b/app/src/abi/omniBridgeXdai.json @@ -0,0 +1 @@ +[{"type": "function", "stateMutability": "nonpayable", "payable": false, "outputs": [{ "type": "bool", "name": "" }], "name": "transferAndCall", "inputs": [{ "type": "address", "name": "_to" }, { "type": "uint256", "name": "_value" }, { "type": "bytes", "name": "_data" }],"constant": false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bytes32","name":""}],"name":"transactionHash","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"numMessagesSigned","inputs":[{"type":"bytes32","name":"_message"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"sourceChainId","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bytes32","name":""}],"name":"_sendMessage","inputs":[{"type":"address","name":"_contract"},{"type":"bytes","name":"_data"},{"type":"uint256","name":"_gas"},{"type":"uint256","name":"_dataType"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bytes","name":""}],"name":"signature","inputs":[{"type":"bytes32","name":"_hash"},{"type":"uint256","name":"_index"}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":""}],"name":"initialize","inputs":[{"type":"uint256","name":"_sourceChainId"},{"type":"uint256","name":"_destinationChainId"},{"type":"address","name":"_validatorContract"},{"type":"uint256","name":"_maxGasPerTx"},{"type":"uint256","name":"_gasPrice"},{"type":"uint256","name":"_requiredBlockConfirmations"},{"type":"address","name":"_owner"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":""}],"name":"isInitialized","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"requiredBlockConfirmations","inputs":[],"constant":true},{"type":"function","stateMutability":"pure","payable":false,"outputs":[{"type":"uint256","name":"gas"}],"name":"getMinimumGasUsage","inputs":[{"type":"bytes","name":"_data"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":""}],"name":"failedMessageReceiver","inputs":[{"type":"bytes32","name":"_messageId"}],"constant":true},{"type":"function","stateMutability":"pure","payable":false,"outputs":[{"type":"bytes4","name":"_data"}],"name":"getBridgeMode","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setChainIds","inputs":[{"type":"uint256","name":"_sourceChainId"},{"type":"uint256","name":"_destinationChainId"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bytes","name":""}],"name":"message","inputs":[{"type":"bytes32","name":"_hash"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":""}],"name":"failedMessageSender","inputs":[{"type":"bytes32","name":"_messageId"}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"submitSignature","inputs":[{"type":"bytes","name":"signature"},{"type":"bytes","name":"message"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bytes32","name":"id"}],"name":"messageId","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"numAffirmationsSigned","inputs":[{"type":"bytes32","name":"_hash"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":""}],"name":"affirmationsSigned","inputs":[{"type":"bytes32","name":"_hash"}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setMaxGasPerTx","inputs":[{"type":"uint256","name":"_maxGasPerTx"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"requiredSignatures","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":""}],"name":"owner","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":""}],"name":"messagesSigned","inputs":[{"type":"bytes32","name":"_message"}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bytes32","name":""}],"name":"requireToConfirmMessage","inputs":[{"type":"address","name":"_contract"},{"type":"bytes","name":"_data"},{"type":"uint256","name":"_gas"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":""}],"name":"validatorContract","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"deployedAtBlock","inputs":[],"constant":true},{"type":"function","stateMutability":"pure","payable":false,"outputs":[{"type":"uint64","name":"major"},{"type":"uint64","name":"minor"},{"type":"uint64","name":"patch"}],"name":"getBridgeInterfacesVersion","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"id"}],"name":"messageSourceChainId","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setRequiredBlockConfirmations","inputs":[{"type":"uint256","name":"_blockConfirmations"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"destinationChainId","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setGasPrice","inputs":[{"type":"uint256","name":"_gasPrice"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":""}],"name":"messageCallStatus","inputs":[{"type":"bytes32","name":"_messageId"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"sender"}],"name":"messageSender","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"int256","name":""}],"name":"decimalShift","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bytes32","name":""}],"name":"requireToPassMessage","inputs":[{"type":"address","name":"_contract"},{"type":"bytes","name":"_data"},{"type":"uint256","name":"_gas"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bytes32","name":""}],"name":"failedMessageDataHash","inputs":[{"type":"bytes32","name":"_messageId"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"maxGasPerTx","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"executeAffirmation","inputs":[{"type":"bytes","name":"message"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"gasPrice","inputs":[],"constant":true},{"type":"function","stateMutability":"pure","payable":false,"outputs":[{"type":"bool","name":""}],"name":"isAlreadyProcessed","inputs":[{"type":"uint256","name":"_number"}],"constant":true},{"type":"event","name":"UserRequestForSignature","inputs":[{"type":"bytes32","name":"messageId","indexed":true},{"type":"bytes","name":"encodedData","indexed":false}],"anonymous":false},{"type":"event","name":"AffirmationCompleted","inputs":[{"type":"address","name":"sender","indexed":true},{"type":"address","name":"executor","indexed":true},{"type":"bytes32","name":"messageId","indexed":true},{"type":"bool","name":"status","indexed":false}],"anonymous":false},{"type":"event","name":"SignedForUserRequest","inputs":[{"type":"address","name":"signer","indexed":true},{"type":"bytes32","name":"messageHash","indexed":false}],"anonymous":false},{"type":"event","name":"SignedForAffirmation","inputs":[{"type":"address","name":"signer","indexed":true},{"type":"bytes32","name":"messageHash","indexed":false}],"anonymous":false},{"type":"event","name":"CollectedSignatures","inputs":[{"type":"address","name":"authorityResponsibleForRelay","indexed":false},{"type":"bytes32","name":"messageHash","indexed":false},{"type":"uint256","name":"NumberOfCollectedSignatures","indexed":false}],"anonymous":false},{"type":"event","name":"GasPriceChanged","inputs":[{"type":"uint256","name":"gasPrice","indexed":false}],"anonymous":false},{"type":"event","name":"RequiredBlockConfirmationChanged","inputs":[{"type":"uint256","name":"requiredBlockConfirmations","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","indexed":false},{"type":"address","name":"newOwner","indexed":false}],"anonymous":false}] \ No newline at end of file diff --git a/app/src/abi/proxyFactory.json b/app/src/abi/proxyFactory.json new file mode 100644 index 0000000000..92e0a8f4d7 --- /dev/null +++ b/app/src/abi/proxyFactory.json @@ -0,0 +1 @@ +[{"type":"event","name":"ProxyCreation","inputs":[{"type":"address","name":"proxy","internalType":"contract Proxy","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"","internalType":"address"}],"name":"computeProxyAddress","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"uint256","name":"saltNonce","internalType":"uint256"},{"type":"address","name":"masterCopy","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"payable","payable":true,"outputs":[],"name":"createProxyAndExecTransaction","inputs":[{"type":"address","name":"masterCopy","internalType":"address"},{"type":"uint256","name":"saltNonce","internalType":"uint256"},{"type":"address","name":"fallbackHandler","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"},{"type":"bytes","name":"data","internalType":"bytes"},{"type":"uint8","name":"operation","internalType":"enum Enum.Operation"},{"type":"address","name":"owner","internalType":"address"},{"type":"bytes","name":"signatures","internalType":"bytes"}],"constant":false},{"type":"function","stateMutability":"payable","payable":true,"outputs":[{"type":"bool","name":"execTransactionSuccess","internalType":"bool"}],"name":"execTransaction","inputs":[{"type":"address","name":"proxy","internalType":"address payable"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"},{"type":"bytes","name":"data","internalType":"bytes"},{"type":"uint8","name":"operation","internalType":"enum Enum.Operation"},{"type":"uint256","name":"safeTxGas","internalType":"uint256"},{"type":"uint256","name":"baseGas","internalType":"uint256"},{"type":"uint256","name":"gasPrice","internalType":"uint256"},{"type":"address","name":"gasToken","internalType":"address"},{"type":"address","name":"refundReceiver","internalType":"address payable"},{"type":"bytes","name":"signatures","internalType":"bytes"}],"constant":false},{"type":"function","stateMutability":"pure","payable":false,"outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"getTransactionHash","inputs":[{"type":"address","name":"proxy","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"},{"type":"bytes","name":"data","internalType":"bytes"},{"type":"uint8","name":"operation","internalType":"enum Enum.Operation"},{"type":"uint256","name":"safeTxGas","internalType":"uint256"},{"type":"uint256","name":"baseGas","internalType":"uint256"},{"type":"uint256","name":"gasPrice","internalType":"uint256"},{"type":"address","name":"gasToken","internalType":"address"},{"type":"address","name":"refundReceiver","internalType":"address"},{"type":"uint256","name":"_nonce","internalType":"uint256"}],"constant":true},{"type":"function","stateMutability":"pure","payable":false,"outputs":[{"type":"bytes","name":"","internalType":"bytes"}],"name":"proxyCreationCode","inputs":[],"constant":true}] \ No newline at end of file diff --git a/app/src/abi/proxy_factory.ts b/app/src/abi/proxy_factory.ts deleted file mode 100644 index 8f6973943b..0000000000 --- a/app/src/abi/proxy_factory.ts +++ /dev/null @@ -1,258 +0,0 @@ -export const proxyFactoryAbi = [ - { - constant: false, - inputs: [ - { - internalType: 'address', - name: 'masterCopy', - type: 'address', - }, - { - internalType: 'uint256', - name: 'saltNonce', - type: 'uint256', - }, - { - internalType: 'address', - name: 'fallbackHandler', - type: 'address', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - { - internalType: 'enum Enum.Operation', - name: 'operation', - type: 'uint8', - }, - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'bytes', - name: 'signatures', - type: 'bytes', - }, - ], - name: 'createProxyAndExecTransaction', - outputs: [], - payable: true, - stateMutability: 'payable', - type: 'function', - }, - { - constant: false, - inputs: [ - { - internalType: 'address payable', - name: 'proxy', - type: 'address', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - { - internalType: 'enum Enum.Operation', - name: 'operation', - type: 'uint8', - }, - { - internalType: 'uint256', - name: 'safeTxGas', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'baseGas', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'gasPrice', - type: 'uint256', - }, - { - internalType: 'address', - name: 'gasToken', - type: 'address', - }, - { - internalType: 'address payable', - name: 'refundReceiver', - type: 'address', - }, - { - internalType: 'bytes', - name: 'signatures', - type: 'bytes', - }, - ], - name: 'execTransaction', - outputs: [ - { - internalType: 'bool', - name: 'execTransactionSuccess', - type: 'bool', - }, - ], - payable: true, - stateMutability: 'payable', - type: 'function', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'contract Proxy', - name: 'proxy', - type: 'address', - }, - ], - name: 'ProxyCreation', - type: 'event', - }, - { - constant: true, - inputs: [ - { - internalType: 'address', - name: 'owner', - type: 'address', - }, - { - internalType: 'uint256', - name: 'saltNonce', - type: 'uint256', - }, - { - internalType: 'address', - name: 'masterCopy', - type: 'address', - }, - ], - name: 'computeProxyAddress', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [ - { - internalType: 'address', - name: 'proxy', - type: 'address', - }, - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - { - internalType: 'enum Enum.Operation', - name: 'operation', - type: 'uint8', - }, - { - internalType: 'uint256', - name: 'safeTxGas', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'baseGas', - type: 'uint256', - }, - { - internalType: 'uint256', - name: 'gasPrice', - type: 'uint256', - }, - { - internalType: 'address', - name: 'gasToken', - type: 'address', - }, - { - internalType: 'address', - name: 'refundReceiver', - type: 'address', - }, - { - internalType: 'uint256', - name: '_nonce', - type: 'uint256', - }, - ], - name: 'getTransactionHash', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'proxyCreationCode', - outputs: [ - { - internalType: 'bytes', - name: '', - type: 'bytes', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, -] diff --git a/app/src/abi/realitio.json b/app/src/abi/realitio.json new file mode 100644 index 0000000000..eb11d5c97c --- /dev/null +++ b/app/src/abi/realitio.json @@ -0,0 +1 @@ +[{"constant":false,"inputs":[{"name":"question_id","type":"bytes32"},{"name":"history_hashes","type":"bytes32[]"},{"name":"addrs","type":"address[]"},{"name":"bonds","type":"uint256[]"},{"name":"answers","type":"bytes32[]"}],"name":"claimWinnings","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"question_id","type":"bytes32"},{"name":"content_hash","type":"bytes32"},{"name":"arbitrator","type":"address"},{"name":"min_timeout","type":"uint32"},{"name":"min_bond","type":"uint256"}],"name":"getFinalAnswerIfMatches","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"question_id","type":"bytes32"}],"name":"getBounty","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"question_id","type":"bytes32"}],"name":"getArbitrator","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"question_id","type":"bytes32"}],"name":"getBond","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"question_ids","type":"bytes32[]"},{"name":"lengths","type":"uint256[]"},{"name":"hist_hashes","type":"bytes32[]"},{"name":"addrs","type":"address[]"},{"name":"bonds","type":"uint256[]"},{"name":"answers","type":"bytes32[]"}],"name":"claimMultipleAndWithdrawBalance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"question_id","type":"bytes32"},{"name":"answer","type":"bytes32"},{"name":"nonce","type":"uint256"},{"name":"bond","type":"uint256"}],"name":"submitAnswerReveal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"fee","type":"uint256"}],"name":"setQuestionFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"template_hashes","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"question_id","type":"bytes32"}],"name":"getContentHash","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"question_claims","outputs":[{"name":"payee","type":"address"},{"name":"last_bond","type":"uint256"},{"name":"queued_funds","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"question_id","type":"bytes32"}],"name":"fundAnswerBounty","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"arbitrator_question_fees","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"template_id","type":"uint256"},{"name":"question","type":"string"},{"name":"arbitrator","type":"address"},{"name":"timeout","type":"uint32"},{"name":"opening_ts","type":"uint32"},{"name":"nonce","type":"uint256"}],"name":"askQuestion","outputs":[{"name":"","type":"bytes32"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"question_id","type":"bytes32"},{"name":"answer","type":"bytes32"},{"name":"max_previous","type":"uint256"}],"name":"submitAnswer","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"question_id","type":"bytes32"}],"name":"isFinalized","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"question_id","type":"bytes32"}],"name":"getHistoryHash","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"commitments","outputs":[{"name":"reveal_ts","type":"uint32"},{"name":"is_revealed","type":"bool"},{"name":"revealed_answer","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"content","type":"string"}],"name":"createTemplate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"question_id","type":"bytes32"}],"name":"getBestAnswer","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"question_id","type":"bytes32"}],"name":"isPendingArbitration","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"questions","outputs":[{"name":"content_hash","type":"bytes32"},{"name":"arbitrator","type":"address"},{"name":"opening_ts","type":"uint32"},{"name":"timeout","type":"uint32"},{"name":"finalize_ts","type":"uint32"},{"name":"is_pending_arbitration","type":"bool"},{"name":"bounty","type":"uint256"},{"name":"best_answer","type":"bytes32"},{"name":"history_hash","type":"bytes32"},{"name":"bond","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"question_id","type":"bytes32"}],"name":"getOpeningTS","outputs":[{"name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"question_id","type":"bytes32"}],"name":"getTimeout","outputs":[{"name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"content","type":"string"},{"name":"question","type":"string"},{"name":"arbitrator","type":"address"},{"name":"timeout","type":"uint32"},{"name":"opening_ts","type":"uint32"},{"name":"nonce","type":"uint256"}],"name":"createTemplateAndAskQuestion","outputs":[{"name":"","type":"bytes32"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"question_id","type":"bytes32"}],"name":"getFinalAnswer","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"question_id","type":"bytes32"}],"name":"getFinalizeTS","outputs":[{"name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"templates","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"question_id","type":"bytes32"}],"name":"resultFor","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"question_id","type":"bytes32"},{"name":"answer_hash","type":"bytes32"},{"name":"max_previous","type":"uint256"},{"name":"_answerer","type":"address"}],"name":"submitAnswerCommitment","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"question_id","type":"bytes32"},{"name":"requester","type":"address"},{"name":"max_previous","type":"uint256"}],"name":"notifyOfArbitrationRequest","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"question_id","type":"bytes32"},{"name":"answer","type":"bytes32"},{"name":"answerer","type":"address"}],"name":"submitAnswerByArbitrator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"arbitrator","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"LogSetQuestionFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"template_id","type":"uint256"},{"indexed":true,"name":"user","type":"address"},{"indexed":false,"name":"question_text","type":"string"}],"name":"LogNewTemplate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"question_id","type":"bytes32"},{"indexed":true,"name":"user","type":"address"},{"indexed":false,"name":"template_id","type":"uint256"},{"indexed":false,"name":"question","type":"string"},{"indexed":true,"name":"content_hash","type":"bytes32"},{"indexed":false,"name":"arbitrator","type":"address"},{"indexed":false,"name":"timeout","type":"uint32"},{"indexed":false,"name":"opening_ts","type":"uint32"},{"indexed":false,"name":"nonce","type":"uint256"},{"indexed":false,"name":"created","type":"uint256"}],"name":"LogNewQuestion","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"question_id","type":"bytes32"},{"indexed":false,"name":"bounty_added","type":"uint256"},{"indexed":false,"name":"bounty","type":"uint256"},{"indexed":true,"name":"user","type":"address"}],"name":"LogFundAnswerBounty","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"answer","type":"bytes32"},{"indexed":true,"name":"question_id","type":"bytes32"},{"indexed":false,"name":"history_hash","type":"bytes32"},{"indexed":true,"name":"user","type":"address"},{"indexed":false,"name":"bond","type":"uint256"},{"indexed":false,"name":"ts","type":"uint256"},{"indexed":false,"name":"is_commitment","type":"bool"}],"name":"LogNewAnswer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"question_id","type":"bytes32"},{"indexed":true,"name":"user","type":"address"},{"indexed":true,"name":"answer_hash","type":"bytes32"},{"indexed":false,"name":"answer","type":"bytes32"},{"indexed":false,"name":"nonce","type":"uint256"},{"indexed":false,"name":"bond","type":"uint256"}],"name":"LogAnswerReveal","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"question_id","type":"bytes32"},{"indexed":true,"name":"user","type":"address"}],"name":"LogNotifyOfArbitrationRequest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"question_id","type":"bytes32"},{"indexed":true,"name":"answer","type":"bytes32"}],"name":"LogFinalize","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"question_id","type":"bytes32"},{"indexed":true,"name":"user","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"LogClaim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"user","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"LogWithdraw","type":"event"}] \ No newline at end of file diff --git a/app/src/abi/realitioScalarAdapter.json b/app/src/abi/realitioScalarAdapter.json new file mode 100644 index 0000000000..480c06fdea --- /dev/null +++ b/app/src/abi/realitioScalarAdapter.json @@ -0,0 +1 @@ +[{"inputs":[{"internalType":"contract IConditionalTokens","name":"_conditionalTokens","type":"address"},{"internalType":"contract IRealitio","name":"_realitio","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"realitioQuestionId","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"conditionQuestionId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"low","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"high","type":"uint256"}],"name":"QuestionIdAnnouncement","type":"event"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"questionId","type":"bytes32"},{"internalType":"uint256","name":"low","type":"uint256"},{"internalType":"uint256","name":"high","type":"uint256"}],"name":"announceConditionQuestionId","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"conditionalTokens","outputs":[{"internalType":"contract IConditionalTokens","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"realitio","outputs":[{"internalType":"contract IRealitio","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"questionId","type":"bytes32"},{"internalType":"string","name":"question","type":"string"},{"internalType":"uint256","name":"low","type":"uint256"},{"internalType":"uint256","name":"high","type":"uint256"}],"name":"resolve","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file diff --git a/app/src/abi/realitionProxyOracle.json b/app/src/abi/realitionProxyOracle.json new file mode 100644 index 0000000000..1da45494d4 --- /dev/null +++ b/app/src/abi/realitionProxyOracle.json @@ -0,0 +1 @@ +[{"inputs":[{"internalType":"contract IConditionalTokens","name":"_conditionalTokens","type":"address"},{"internalType":"contract IRealitio","name":"_realitio","type":"address"},{"internalType":"uint256","name":"_nuancedBinaryTemplateId","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"constant":true,"inputs":[],"name":"conditionalTokens","outputs":[{"internalType":"contract IConditionalTokens","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"nuancedBinaryTemplateId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"realitio","outputs":[{"internalType":"contract IRealitio","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"questionId","type":"bytes32"},{"internalType":"uint256","name":"templateId","type":"uint256"},{"internalType":"string","name":"question","type":"string"},{"internalType":"uint256","name":"numOutcomes","type":"uint256"}],"name":"resolve","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file diff --git a/app/src/abi/wrappedAsset.json b/app/src/abi/wrappedAsset.json new file mode 100644 index 0000000000..13e246cdbf --- /dev/null +++ b/app/src/abi/wrappedAsset.json @@ -0,0 +1 @@ +[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"guy","type":"address"},{"name":"wad","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"src","type":"address"},{"name":"dst","type":"address"},{"name":"wad","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"wad","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"dst","type":"address"},{"name":"wad","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"deposit","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"src","type":"address"},{"indexed":true,"name":"guy","type":"address"},{"indexed":false,"name":"wad","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"src","type":"address"},{"indexed":true,"name":"dst","type":"address"},{"indexed":false,"name":"wad","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"dst","type":"address"},{"indexed":false,"name":"wad","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"src","type":"address"},{"indexed":false,"name":"wad","type":"uint256"}],"name":"Withdrawal","type":"event"}] \ No newline at end of file diff --git a/app/src/abi/wrapped_asset.ts b/app/src/abi/wrapped_asset.ts deleted file mode 100644 index 8949e2e189..0000000000 --- a/app/src/abi/wrapped_asset.ts +++ /dev/null @@ -1,463 +0,0 @@ -/* eslint no-use-before-define: 0 */ // --> OFF - -export const wETHabi = [ - { - constant: true, - inputs: [], - name: 'name', - outputs: [{ name: '', type: 'string' }], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { name: 'guy', type: 'address' }, - { name: 'wad', type: 'uint256' }, - ], - name: 'approve', - outputs: [{ name: '', type: 'bool' }], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'totalSupply', - outputs: [{ name: '', type: 'uint256' }], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { name: 'src', type: 'address' }, - { name: 'dst', type: 'address' }, - { name: 'wad', type: 'uint256' }, - ], - name: 'transferFrom', - outputs: [{ name: '', type: 'bool' }], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [{ name: 'wad', type: 'uint256' }], - name: 'withdraw', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'decimals', - outputs: [{ name: '', type: 'uint8' }], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [{ name: '', type: 'address' }], - name: 'balanceOf', - outputs: [{ name: '', type: 'uint256' }], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: true, - inputs: [], - name: 'symbol', - outputs: [{ name: '', type: 'string' }], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { - constant: false, - inputs: [ - { name: 'dst', type: 'address' }, - { name: 'wad', type: 'uint256' }, - ], - name: 'transfer', - outputs: [{ name: '', type: 'bool' }], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [], - name: 'deposit', - outputs: [], - payable: true, - stateMutability: 'payable', - type: 'function', - }, - { - constant: true, - inputs: [ - { name: '', type: 'address' }, - { name: '', type: 'address' }, - ], - name: 'allowance', - outputs: [{ name: '', type: 'uint256' }], - payable: false, - stateMutability: 'view', - type: 'function', - }, - { payable: true, stateMutability: 'payable', type: 'fallback' }, - { - anonymous: false, - inputs: [ - { indexed: true, name: 'src', type: 'address' }, - { indexed: true, name: 'guy', type: 'address' }, - { indexed: false, name: 'wad', type: 'uint256' }, - ], - name: 'Approval', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { indexed: true, name: 'src', type: 'address' }, - { indexed: true, name: 'dst', type: 'address' }, - { indexed: false, name: 'wad', type: 'uint256' }, - ], - name: 'Transfer', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { indexed: true, name: 'dst', type: 'address' }, - { indexed: false, name: 'wad', type: 'uint256' }, - ], - name: 'Deposit', - type: 'event', - }, - { - anonymous: false, - inputs: [ - { indexed: true, name: 'src', type: 'address' }, - { indexed: false, name: 'wad', type: 'uint256' }, - ], - name: 'Withdrawal', - type: 'event', - }, -] - -export const wxDaiabi = [ - { - type: 'function', - stateMutability: 'view', - payable: false, - outputs: [{ type: 'string', name: '' }], - name: 'name', - inputs: [], - constant: true, - }, - { - type: 'function', - stateMutability: 'nonpayable', - payable: false, - outputs: [{ type: 'bool', name: '' }], - name: 'approve', - inputs: [ - { type: 'address', name: 'guy' }, - { type: 'uint256', name: 'wad' }, - ], - constant: false, - }, - { - type: 'function', - stateMutability: 'view', - payable: false, - outputs: [{ type: 'uint256', name: '' }], - name: 'totalSupply', - inputs: [], - constant: true, - }, - { - type: 'function', - stateMutability: 'nonpayable', - payable: false, - outputs: [{ type: 'bool', name: '' }], - name: 'transferFrom', - inputs: [ - { type: 'address', name: 'src' }, - { type: 'address', name: 'dst' }, - { type: 'uint256', name: 'wad' }, - ], - constant: false, - }, - { - type: 'function', - stateMutability: 'nonpayable', - payable: false, - outputs: [], - name: 'withdraw', - inputs: [{ type: 'uint256', name: 'wad' }], - constant: false, - }, - { - type: 'function', - stateMutability: 'view', - payable: false, - outputs: [{ type: 'uint8', name: '' }], - name: 'decimals', - inputs: [], - constant: true, - }, - { - type: 'function', - stateMutability: 'view', - payable: false, - outputs: [{ type: 'uint256', name: '' }], - name: 'balanceOf', - inputs: [{ type: 'address', name: '' }], - constant: true, - }, - { - type: 'function', - stateMutability: 'view', - payable: false, - outputs: [{ type: 'string', name: '' }], - name: 'symbol', - inputs: [], - constant: true, - }, - { - type: 'function', - stateMutability: 'nonpayable', - payable: false, - outputs: [{ type: 'bool', name: '' }], - name: 'transfer', - inputs: [ - { type: 'address', name: 'dst' }, - { type: 'uint256', name: 'wad' }, - ], - constant: false, - }, - { - type: 'function', - stateMutability: 'payable', - payable: true, - outputs: [], - name: 'deposit', - inputs: [], - constant: false, - }, - { - type: 'function', - stateMutability: 'view', - payable: false, - outputs: [{ type: 'uint256', name: '' }], - name: 'allowance', - inputs: [ - { type: 'address', name: '' }, - { type: 'address', name: '' }, - ], - constant: true, - }, - { type: 'fallback', stateMutability: 'payable', payable: true }, - { - type: 'event', - name: 'Approval', - inputs: [ - { type: 'address', name: 'src', indexed: true }, - { type: 'address', name: 'guy', indexed: true }, - { type: 'uint256', name: 'wad', indexed: false }, - ], - anonymous: false, - }, - { - type: 'event', - name: 'Transfer', - inputs: [ - { type: 'address', name: 'src', indexed: true }, - { type: 'address', name: 'dst', indexed: true }, - { type: 'uint256', name: 'wad', indexed: false }, - ], - anonymous: false, - }, - { - type: 'event', - name: 'Deposit', - inputs: [ - { type: 'address', name: 'dst', indexed: true }, - { type: 'uint256', name: 'wad', indexed: false }, - ], - anonymous: false, - }, - { - type: 'event', - name: 'Withdrawal', - inputs: [ - { type: 'address', name: 'src', indexed: true }, - { type: 'uint256', name: 'wad', indexed: false }, - ], - anonymous: false, - }, -] - -export const wsPOAabi = [ - { - type: 'function', - stateMutability: 'view', - payable: false, - outputs: [{ type: 'string', name: '' }], - name: 'name', - inputs: [], - constant: true, - }, - { - type: 'function', - stateMutability: 'nonpayable', - payable: false, - outputs: [{ type: 'bool', name: '' }], - name: 'approve', - inputs: [ - { type: 'address', name: 'guy' }, - { type: 'uint256', name: 'wad' }, - ], - constant: false, - }, - { - type: 'function', - stateMutability: 'view', - payable: false, - outputs: [{ type: 'uint256', name: '' }], - name: 'totalSupply', - inputs: [], - constant: true, - }, - { - type: 'function', - stateMutability: 'nonpayable', - payable: false, - outputs: [{ type: 'bool', name: '' }], - name: 'transferFrom', - inputs: [ - { type: 'address', name: 'src' }, - { type: 'address', name: 'dst' }, - { type: 'uint256', name: 'wad' }, - ], - constant: false, - }, - { - type: 'function', - stateMutability: 'nonpayable', - payable: false, - outputs: [], - name: 'withdraw', - inputs: [{ type: 'uint256', name: 'wad' }], - constant: false, - }, - { - type: 'function', - stateMutability: 'view', - payable: false, - outputs: [{ type: 'uint8', name: '' }], - name: 'decimals', - inputs: [], - constant: true, - }, - { - type: 'function', - stateMutability: 'view', - payable: false, - outputs: [{ type: 'uint256', name: '' }], - name: 'balanceOf', - inputs: [{ type: 'address', name: '' }], - constant: true, - }, - { - type: 'function', - stateMutability: 'view', - payable: false, - outputs: [{ type: 'string', name: '' }], - name: 'symbol', - inputs: [], - constant: true, - }, - { - type: 'function', - stateMutability: 'nonpayable', - payable: false, - outputs: [{ type: 'bool', name: '' }], - name: 'transfer', - inputs: [ - { type: 'address', name: 'dst' }, - { type: 'uint256', name: 'wad' }, - ], - constant: false, - }, - { - type: 'function', - stateMutability: 'payable', - payable: true, - outputs: [], - name: 'deposit', - inputs: [], - constant: false, - }, - { - type: 'function', - stateMutability: 'view', - payable: false, - outputs: [{ type: 'uint256', name: '' }], - name: 'allowance', - inputs: [ - { type: 'address', name: '' }, - { type: 'address', name: '' }, - ], - constant: true, - }, - { type: 'fallback', stateMutability: 'payable', payable: true }, - { - type: 'event', - name: 'Approval', - inputs: [ - { type: 'address', name: 'src', indexed: true }, - { type: 'address', name: 'guy', indexed: true }, - { type: 'uint256', name: 'wad', indexed: false }, - ], - anonymous: false, - }, - { - type: 'event', - name: 'Transfer', - inputs: [ - { type: 'address', name: 'src', indexed: true }, - { type: 'address', name: 'dst', indexed: true }, - { type: 'uint256', name: 'wad', indexed: false }, - ], - anonymous: false, - }, - { - type: 'event', - name: 'Deposit', - inputs: [ - { type: 'address', name: 'dst', indexed: true }, - { type: 'uint256', name: 'wad', indexed: false }, - ], - anonymous: false, - }, - { - type: 'event', - name: 'Withdrawal', - inputs: [ - { type: 'address', name: 'src', indexed: true }, - { type: 'uint256', name: 'wad', indexed: false }, - ], - anonymous: false, - }, -] diff --git a/app/src/abi/xDaiForeignBridge.json b/app/src/abi/xDaiForeignBridge.json new file mode 100644 index 0000000000..87ee94ad32 --- /dev/null +++ b/app/src/abi/xDaiForeignBridge.json @@ -0,0 +1 @@ +[{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"numMessagesSigned","inputs":[{"type":"bytes32","name":"_message"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"totalBurntCoins","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bytes","name":""}],"name":"signature","inputs":[{"type":"bytes32","name":"_hash"},{"type":"uint256","name":"_index"}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"prepareToPOSDAO","inputs":[],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setBlockRewardContract","inputs":[{"type":"address","name":"_blockReward"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setForeignFee","inputs":[{"type":"uint256","name":"_fee"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":""}],"name":"fixedAssets","inputs":[{"type":"bytes32","name":"_txHash"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"totalSpentPerDay","inputs":[{"type":"uint256","name":"_day"}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setHomeFee","inputs":[{"type":"uint256","name":"_fee"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":""}],"name":"isInitialized","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setExecutionDailyLimit","inputs":[{"type":"uint256","name":"_dailyLimit"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"getCurrentDay","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"requiredBlockConfirmations","inputs":[],"constant":true},{"type":"function","stateMutability":"pure","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"requiredMessageLength","inputs":[],"constant":true},{"type":"function","stateMutability":"pure","payable":false,"outputs":[{"type":"bytes4","name":"_data"}],"name":"getBridgeMode","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"executionDailyLimit","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bytes","name":""}],"name":"message","inputs":[{"type":"bytes32","name":"_hash"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"totalExecutedPerDay","inputs":[{"type":"uint256","name":"_day"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":""}],"name":"blockRewardContract","inputs":[],"constant":true},{"type":"function","stateMutability":"payable","payable":true,"outputs":[],"name":"relayTokens","inputs":[{"type":"address","name":"_receiver"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setFeeManagerContract","inputs":[{"type":"address","name":"_feeManager"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"submitSignature","inputs":[{"type":"bytes","name":"signature"},{"type":"bytes","name":"message"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":""}],"name":"initialize","inputs":[{"type":"address","name":"_validatorContract"},{"type":"uint256[]","name":"_dailyLimitMaxPerTxMinPerTxArray"},{"type":"uint256","name":"_homeGasPrice"},{"type":"uint256","name":"_requiredBlockConfirmations"},{"type":"address","name":"_blockReward"},{"type":"uint256[]","name":"_foreignDailyLimitForeignMaxPerTxArray"},{"type":"address","name":"_owner"},{"type":"uint256","name":"_decimalShift"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"dailyLimit","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"claimTokens","inputs":[{"type":"address","name":"_token"},{"type":"address","name":"_to"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"numAffirmationsSigned","inputs":[{"type":"bytes32","name":"_withdrawal"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":""}],"name":"affirmationsSigned","inputs":[{"type":"bytes32","name":"_withdrawal"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":""}],"name":"withinExecutionLimit","inputs":[{"type":"uint256","name":"_amount"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"executionMaxPerTx","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"requiredSignatures","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":""}],"name":"owner","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":""}],"name":"messagesSigned","inputs":[{"type":"bytes32","name":"_message"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"getAmountToBurn","inputs":[{"type":"uint256","name":"_value"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"getHomeFee","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":""}],"name":"validatorContract","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"executeAffirmation","inputs":[{"type":"address","name":"recipient"},{"type":"uint256","name":"value"},{"type":"bytes32","name":"transactionHash"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"deployedAtBlock","inputs":[],"constant":true},{"type":"function","stateMutability":"pure","payable":false,"outputs":[{"type":"uint64","name":"major"},{"type":"uint64","name":"minor"},{"type":"uint64","name":"patch"}],"name":"getBridgeInterfacesVersion","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"outOfLimitAmount","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setMinPerTx","inputs":[{"type":"uint256","name":"_minPerTx"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"fixAssetsAboveLimits","inputs":[{"type":"bytes32","name":"txHash"},{"type":"bool","name":"unlockOnForeign"},{"type":"uint256","name":"valueToUnlock"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setRequiredBlockConfirmations","inputs":[{"type":"uint256","name":"_blockConfirmations"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setDailyLimit","inputs":[{"type":"uint256","name":"_dailyLimit"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setGasPrice","inputs":[{"type":"uint256","name":"_gasPrice"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setMaxPerTx","inputs":[{"type":"uint256","name":"_maxPerTx"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"decimalShift","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":""}],"name":"feeManagerContract","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"minPerTx","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":""}],"name":"rewardableInitialize","inputs":[{"type":"address","name":"_validatorContract"},{"type":"uint256[]","name":"_dailyLimitMaxPerTxMinPerTxArray"},{"type":"uint256","name":"_homeGasPrice"},{"type":"uint256","name":"_requiredBlockConfirmations"},{"type":"address","name":"_blockReward"},{"type":"uint256[]","name":"_foreignDailyLimitForeignMaxPerTxArray"},{"type":"address","name":"_owner"},{"type":"address","name":"_feeManager"},{"type":"uint256[]","name":"_homeFeeForeignFeeArray"},{"type":"uint256","name":"_decimalShift"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":""}],"name":"withinLimit","inputs":[{"type":"uint256","name":"_amount"}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"setExecutionMaxPerTx","inputs":[{"type":"uint256","name":"_maxPerTx"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bytes4","name":""}],"name":"getFeeManagerMode","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"maxPerTx","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"gasPrice","inputs":[],"constant":true},{"type":"function","stateMutability":"pure","payable":false,"outputs":[{"type":"bool","name":""}],"name":"isAlreadyProcessed","inputs":[{"type":"uint256","name":"_number"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"getForeignFee","inputs":[],"constant":true},{"type":"fallback","stateMutability":"payable","payable":true},{"type":"event","name":"UserRequestForSignature","inputs":[{"type":"address","name":"recipient","indexed":false},{"type":"uint256","name":"value","indexed":false}],"anonymous":false},{"type":"event","name":"AffirmationCompleted","inputs":[{"type":"address","name":"recipient","indexed":false},{"type":"uint256","name":"value","indexed":false},{"type":"bytes32","name":"transactionHash","indexed":false}],"anonymous":false},{"type":"event","name":"SignedForUserRequest","inputs":[{"type":"address","name":"signer","indexed":true},{"type":"bytes32","name":"messageHash","indexed":false}],"anonymous":false},{"type":"event","name":"SignedForAffirmation","inputs":[{"type":"address","name":"signer","indexed":true},{"type":"bytes32","name":"transactionHash","indexed":false}],"anonymous":false},{"type":"event","name":"CollectedSignatures","inputs":[{"type":"address","name":"authorityResponsibleForRelay","indexed":false},{"type":"bytes32","name":"messageHash","indexed":false},{"type":"uint256","name":"NumberOfCollectedSignatures","indexed":false}],"anonymous":false},{"type":"event","name":"DailyLimitChanged","inputs":[{"type":"uint256","name":"newLimit","indexed":false}],"anonymous":false},{"type":"event","name":"ExecutionDailyLimitChanged","inputs":[{"type":"uint256","name":"newLimit","indexed":false}],"anonymous":false},{"type":"event","name":"GasPriceChanged","inputs":[{"type":"uint256","name":"gasPrice","indexed":false}],"anonymous":false},{"type":"event","name":"RequiredBlockConfirmationChanged","inputs":[{"type":"uint256","name":"requiredBlockConfirmations","indexed":false}],"anonymous":false},{"type":"event","name":"FeeDistributedFromAffirmation","inputs":[{"type":"uint256","name":"feeAmount","indexed":false},{"type":"bytes32","name":"transactionHash","indexed":true}],"anonymous":false},{"type":"event","name":"FeeDistributedFromSignatures","inputs":[{"type":"uint256","name":"feeAmount","indexed":false},{"type":"bytes32","name":"transactionHash","indexed":true}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","indexed":false},{"type":"address","name":"newOwner","indexed":false}],"anonymous":false},{"type":"event","name":"AmountLimitExceeded","inputs":[{"type":"address","name":"recipient","indexed":false},{"type":"uint256","name":"value","indexed":false},{"type":"bytes32","name":"transactionHash","indexed":false}],"anonymous":false},{"type":"event","name":"AssetAboveLimitsFixed","inputs":[{"type":"bytes32","name":"transactionHash","indexed":true},{"type":"uint256","name":"value","indexed":false},{"type":"uint256","name":"remaining","indexed":false}],"anonymous":false}] \ No newline at end of file diff --git a/app/src/abi/xDaiMainnetBridge.json b/app/src/abi/xDaiMainnetBridge.json new file mode 100644 index 0000000000..86f3a3ad25 --- /dev/null +++ b/app/src/abi/xDaiMainnetBridge.json @@ -0,0 +1 @@ +[{"constant":true,"inputs":[],"name":"erc20token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_txHash","type":"bytes32"}],"name":"relayedMessages","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_day","type":"uint256"}],"name":"totalSpentPerDay","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isChaiTokenEnabled","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dsrBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isHDTokenBalanceAboveMinBalance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isInitialized","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_dailyLimit","type":"uint256"}],"name":"setExecutionDailyLimit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getCurrentDay","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"requiredBlockConfirmations","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"message","type":"bytes"},{"name":"signatures","type":"bytes"}],"name":"executeSignatures","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"minHDTokenBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getBridgeMode","outputs":[{"name":"_data","type":"bytes4"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"executionDailyLimit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_day","type":"uint256"}],"name":"totalExecutedPerDay","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"isTokenSwapAllowed","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"dailyLimit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"minDaiTokenBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_to","type":"address"}],"name":"claimTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_minBalance","type":"uint256"}],"name":"setMinHDTokenBalance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"swapTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_amount","type":"uint256"}],"name":"withinExecutionLimit","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"executionMaxPerTx","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"requiredSignatures","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"period","type":"uint256"}],"name":"setInterestCollectionPeriod","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"interestCollectionPeriod","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"validatorContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"deployedAtBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getBridgeInterfacesVersion","outputs":[{"name":"major","type":"uint64"},{"name":"minor","type":"uint64"},{"name":"patch","type":"uint64"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"name":"receiver","type":"address"}],"name":"setInterestReceiver","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_receiver","type":"address"}],"name":"fixLockedSai","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"payInterest","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isDaiNeedsToBeInvested","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_minPerTx","type":"uint256"}],"name":"setMinPerTx","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"halfDuplexErc20token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"name":"_minBalance","type":"uint256"}],"name":"setMinDaiTokenBalance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"chaiToken","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_blockConfirmations","type":"uint256"}],"name":"setRequiredBlockConfirmations","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_sender","type":"address"},{"name":"_receiver","type":"address"},{"name":"_amount","type":"uint256"}],"name":"relayTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_dailyLimit","type":"uint256"}],"name":"setDailyLimit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_validatorContract","type":"address"},{"name":"_erc20token","type":"address"},{"name":"_requiredBlockConfirmations","type":"uint256"},{"name":"_gasPrice","type":"uint256"},{"name":"_dailyLimitMaxPerTxMinPerTxArray","type":"uint256[]"},{"name":"_homeDailyLimitHomeMaxPerTxArray","type":"uint256[]"},{"name":"_owner","type":"address"},{"name":"_decimalShift","type":"uint256"},{"name":"_bridgeOnOtherSide","type":"address"}],"name":"initialize","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"investedAmountInDai","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_gasPrice","type":"uint256"}],"name":"setGasPrice","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_maxPerTx","type":"uint256"}],"name":"setMaxPerTx","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"interestReceiver","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_interestReceiver","type":"address"}],"name":"initializeChaiToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"chaiBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"convertDaiToChai","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"removeChaiToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimalShift","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"minPerTx","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_amount","type":"uint256"}],"name":"withinLimit","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastInterestPayment","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"initializeChaiToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_maxPerTx","type":"uint256"}],"name":"setExecutionMaxPerTx","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"maxPerTx","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"gasPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"PaidInterest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"TokensSwapped","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"recipient","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"transactionHash","type":"bytes32"}],"name":"RelayedMessage","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"recipient","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"UserRequestForAffirmation","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newLimit","type":"uint256"}],"name":"DailyLimitChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newLimit","type":"uint256"}],"name":"ExecutionDailyLimitChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"gasPrice","type":"uint256"}],"name":"GasPriceChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"requiredBlockConfirmations","type":"uint256"}],"name":"RequiredBlockConfirmationChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"previousOwner","type":"address"},{"indexed":false,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}] \ No newline at end of file diff --git a/app/src/components/market/common_sections/history/history_section/history_select.tsx b/app/src/components/market/common_sections/history/history_section/history_select.tsx index 153a534bbb..881016ee96 100644 --- a/app/src/components/market/common_sections/history/history_section/history_select.tsx +++ b/app/src/components/market/common_sections/history/history_section/history_select.tsx @@ -3,6 +3,7 @@ import { BigNumber, Interface, bigNumberify } from 'ethers/utils' import React, { useEffect, useState } from 'react' import styled from 'styled-components' +import realitioAbi from '../../../../../abi/realitio.json' import { STANDARD_DECIMALS } from '../../../../../common/constants' import { useConnectedWeb3Context } from '../../../../../contexts' import { useContracts } from '../../../../../hooks' @@ -11,7 +12,6 @@ import { HistoryType, useGraphFpmmTransactionsFromQuestion, } from '../../../../../hooks/graph/useGraphFpmmTransactionsFromQuestion' -import { realitioAbi } from '../../../../../services/realitio' import { SafeService } from '../../../../../services/safe' import { getContractAddress } from '../../../../../util/networks' import { calcPrice, calcSellAmountInCollateral, formatTimestampToDate } from '../../../../../util/tools' diff --git a/app/src/hooks/useContracts.tsx b/app/src/hooks/useContracts.tsx index f55637309c..eb126ca9e9 100644 --- a/app/src/hooks/useContracts.tsx +++ b/app/src/hooks/useContracts.tsx @@ -52,6 +52,7 @@ export const useContracts = (context: ConnectedWeb3Context) => { const klerosTokenViewAddress = getContractAddress(networkId, 'klerosTokenView') const klerosTCRAddress = getContractAddress(networkId, 'klerosTCR') const omenVerifiedMarketsAddress = getContractAddress(networkId, 'omenVerifiedMarkets') + const kleros = useMemo( () => new KlerosService( @@ -72,6 +73,7 @@ export const useContracts = (context: ConnectedWeb3Context) => { ) const dxTCRAddress = getContractAddress(networkId, 'dxTCR') + const dxTCR = useMemo(() => new DxTCRService(dxTCRAddress, provider), [provider, dxTCRAddress]) return useMemo( diff --git a/app/src/services/airdrop/index.ts b/app/src/services/airdrop.ts similarity index 94% rename from app/src/services/airdrop/index.ts rename to app/src/services/airdrop.ts index b80bbb7d51..772596fd1f 100644 --- a/app/src/services/airdrop/index.ts +++ b/app/src/services/airdrop.ts @@ -1,10 +1,9 @@ import { Contract, Wallet, ethers, utils } from 'ethers' import { BigNumber } from 'ethers/utils' -import { Transaction } from '../../util/cpk' -import { getAirdrops } from '../../util/networks' - -import { airdropAbi } from './abi' +import airdropAbi from '../abi/airdrop.json' +import { Transaction } from '../util/cpk' +import { getAirdrops } from '../util/networks' class AirdropService { airdrops?: Contract[] diff --git a/app/src/services/airdrop/abi.ts b/app/src/services/airdrop/abi.ts deleted file mode 100644 index a51a54258b..0000000000 --- a/app/src/services/airdrop/abi.ts +++ /dev/null @@ -1,116 +0,0 @@ -export const airdropAbi = [ - { - inputs: [ - { - internalType: 'address', - name: 'token_', - type: 'address', - }, - { - internalType: 'bytes32', - name: 'merkleRoot_', - type: 'bytes32', - }, - ], - stateMutability: 'nonpayable', - type: 'constructor', - }, - { - anonymous: false, - inputs: [ - { - indexed: false, - internalType: 'uint256', - name: 'index', - type: 'uint256', - }, - { - indexed: false, - internalType: 'address', - name: 'account', - type: 'address', - }, - { - indexed: false, - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - ], - name: 'Claimed', - type: 'event', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'index', - type: 'uint256', - }, - { - internalType: 'address', - name: 'account', - type: 'address', - }, - { - internalType: 'uint256', - name: 'amount', - type: 'uint256', - }, - { - internalType: 'bytes32[]', - name: 'merkleProof', - type: 'bytes32[]', - }, - ], - name: 'claim', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, - { - inputs: [ - { - internalType: 'uint256', - name: 'index', - type: 'uint256', - }, - ], - name: 'isClaimed', - outputs: [ - { - internalType: 'bool', - name: '', - type: 'bool', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'merkleRoot', - outputs: [ - { - internalType: 'bytes32', - name: '', - type: 'bytes32', - }, - ], - stateMutability: 'view', - type: 'function', - }, - { - inputs: [], - name: 'token', - outputs: [ - { - internalType: 'address', - name: '', - type: 'address', - }, - ], - stateMutability: 'view', - type: 'function', - }, -] diff --git a/app/src/services/conditional_token.ts b/app/src/services/conditional_token.ts index 19e5303346..e3543062b3 100644 --- a/app/src/services/conditional_token.ts +++ b/app/src/services/conditional_token.ts @@ -2,28 +2,13 @@ import { Contract, Wallet, ethers, utils } from 'ethers' import { TransactionReceipt } from 'ethers/providers' import { BigNumber, BigNumberish, bigNumberify } from 'ethers/utils' +import conditionalTokensAbi from '../abi/conditionalTokens.json' import { getLogger } from '../util/logger' import { getEarliestBlockToCheck } from '../util/networks' import { getIndexSets } from '../util/tools' const logger = getLogger('Services::Conditional-Token') -const conditionalTokensAbi = [ - 'function prepareCondition(address oracle, bytes32 questionId, uint outcomeSlotCount) external', - 'event ConditionPreparation(bytes32 indexed conditionId, address indexed oracle, bytes32 indexed questionId, uint outcomeSlotCount)', - 'function setApprovalForAll(address operator, bool approved) external', - 'function isApprovedForAll(address owner, address operator) external view returns (bool)', - 'function payoutNumerators(bytes32, uint) public view returns (uint)', - 'function payoutDenominator(bytes32) public view returns (uint)', - 'function redeemPositions(address collateralToken, bytes32 parentCollectionId, bytes32 conditionId, uint[] indexSets) external', - 'function getCollectionId(bytes32 parentCollectionId, bytes32 conditionId, uint indexSet) external view returns (bytes32) ', - 'function getPositionId(address collateralToken, bytes32 collectionId) external pure returns (uint) ', - 'function balanceOf(address owner, uint256 positionId) external view returns (uint256)', - 'function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes data) external', - 'function getOutcomeSlotCount(bytes32 conditionId) external view returns (uint)', - 'function mergePositions(address collateralToken, bytes32 parentCollectionId, bytes32 conditionId, uint[] partition, uint amount) external', -] - class ConditionalTokenService { contract: Contract signerAddress: Maybe diff --git a/app/src/services/cpk/fns.ts b/app/src/services/cpk/fns.ts index 47ab6f2f1c..7d9e58c81b 100644 --- a/app/src/services/cpk/fns.ts +++ b/app/src/services/cpk/fns.ts @@ -159,6 +159,7 @@ interface UnwrapParams { export const unwrap = async (params: UnwrapParams) => { const { amount, collateral, transactions, wrapper } = params + if (collateral.address.toLowerCase() === wrapper.address.toLowerCase() && !amount.isZero()) { const encodedWithdrawFunction = UnwrapTokenService.withdrawAmount(collateral.symbol, amount) transactions.push({ diff --git a/app/src/services/dx_tcr.ts b/app/src/services/dx_tcr.ts index dac156c041..4e43d1af96 100644 --- a/app/src/services/dx_tcr.ts +++ b/app/src/services/dx_tcr.ts @@ -1,7 +1,7 @@ import { Contract, ethers } from 'ethers' import { BigNumberish } from 'ethers/utils' -const dxTCRAbi = ['function getTokens(uint256 _listId) public view returns (address[])'] +import dxTCRAbi from '../abi/dxTcr.json' export class DxTCRService { contract: Contract diff --git a/app/src/services/erc20.ts b/app/src/services/erc20.ts index a58b8854db..fc36a6af39 100644 --- a/app/src/services/erc20.ts +++ b/app/src/services/erc20.ts @@ -2,24 +2,13 @@ import { Contract, Wallet, ethers, utils } from 'ethers' import { TransactionReceipt } from 'ethers/providers' import { BigNumber } from 'ethers/utils' +import erc20Abi from '../abi/erc20.json' import { STANDARD_DECIMALS } from '../common/constants' import { getLogger } from '../util/logger' import { isAddress, isContract } from '../util/tools' import { Token } from '../util/types' - const logger = getLogger('Services::Erc20') -const erc20Abi = [ - 'function allowance(address owner, address spender) external view returns (uint256)', - 'function approve(address spender, uint256 amount) external returns (bool)', - 'function balanceOf(address marketMaker) external view returns (uint256)', - 'function symbol() external view returns (string)', - 'function name() external view returns (string)', - 'function decimals() external view returns (uint8)', - 'function transferFrom(address sender, address recipient, uint256 amount) public returns (bool)', - 'function transfer(address to, uint256 value) public returns (bool)', -] - class ERC20Service { provider: any contract: Contract diff --git a/app/src/services/index.ts b/app/src/services/index.tsx similarity index 100% rename from app/src/services/index.ts rename to app/src/services/index.tsx diff --git a/app/src/services/kleros.ts b/app/src/services/kleros.ts index 89640d510e..199f6234e7 100644 --- a/app/src/services/kleros.ts +++ b/app/src/services/kleros.ts @@ -6,6 +6,8 @@ import { Contract, ethers } from 'ethers' import { Web3Provider } from 'ethers/providers' import { BigNumber } from 'ethers/utils' +import klerosBadgeAbi from '../abi/klerosBadge.json' +import klerosTokensViewAbi from '../abi/klerosTokensView.json' import { STANDARD_DECIMALS } from '../common/constants' import { getGraphUris, getKlerosCurateGraphUris, getTokensByNetwork, networkIds } from '../util/networks' import { waitABit } from '../util/tools' @@ -19,15 +21,6 @@ import { Token, } from '../util/types' -const klerosBadgeAbi = [ - 'function queryAddresses(address _cursor, uint _count, bool[8] _filter, bool _oldestFirst) external view returns (address[] values, bool hasMore)', -] - -const klerosTokensViewAbi = [ - 'function getTokensIDsForAddresses(address _t2crAddress, address[] _tokenAddresses ) external view returns (bytes32[] result)', - 'function getTokens(address _t2crAddress, bytes32[] _tokenIDs ) external view returns (tuple(bytes32 ID, string name, string ticker, address addr, string symbolMultihash, uint8 status, uint256 decimals)[] result)', -] - interface MetaEvidence { fileURI: string } diff --git a/app/src/services/market_maker.ts b/app/src/services/market_maker.ts index 717b3f7044..a8f7603f5a 100644 --- a/app/src/services/market_maker.ts +++ b/app/src/services/market_maker.ts @@ -1,6 +1,7 @@ import { Contract, Wallet, ethers, utils } from 'ethers' import { BigNumber } from 'ethers/utils' +import marketMakerAbi from '../abi/marketMaker.json' import { getLogger } from '../util/logger' import { getContractAddress } from '../util/networks' import { calcDistributionHint, calcPrice } from '../util/tools' @@ -11,23 +12,6 @@ import { RealitioService } from './realitio' const logger = getLogger('Services::MarketMaker') -const marketMakerAbi = [ - 'function conditionalTokens() external view returns (address)', - 'function balanceOf(address addr) external view returns (uint256)', - 'function collateralToken() external view returns (address)', - 'function fee() external view returns (uint)', - 'function conditionIds(uint256) external view returns (bytes32)', - 'function addFunding(uint addedFunds, uint[] distributionHint) external', - 'function removeFunding(uint sharesToBurn) external', - 'function totalSupply() external view returns (uint256)', - 'function collectedFees() external view returns (uint)', - 'function feesWithdrawableBy(address addr) public view returns (uint)', - 'function buy(uint investmentAmount, uint outcomeIndex, uint minOutcomeTokensToBuy) external', - 'function calcBuyAmount(uint investmentAmount, uint outcomeIndex) public view returns (uint)', - 'function sell(uint returnAmount, uint outcomeIndex, uint maxOutcomeTokensToSell) external', - 'function calcSellAmount(uint returnAmount, uint outcomeIndex) public view returns (uint)', -] - class MarketMakerService { contract: Contract conditionalTokens: ConditionalTokenService diff --git a/app/src/services/market_maker_factory.ts b/app/src/services/market_maker_factory.ts index 01bfe8db03..f43f3ebfbf 100644 --- a/app/src/services/market_maker_factory.ts +++ b/app/src/services/market_maker_factory.ts @@ -2,6 +2,7 @@ import { Contract, Wallet, ethers, utils } from 'ethers' import { BigNumber } from 'ethers/utils' import { LogDescription } from 'ethers/utils/interface' +import marketMakerFactoryAbi from '../abi/marketMakerFactory.json' import { MARKET_FEE } from '../common/constants' import { getLogger } from '../util/logger' import { getContractAddress } from '../util/networks' @@ -10,7 +11,6 @@ import { Log, Market, MarketWithExtraData } from '../util/types' import { ConditionalTokenService } from './conditional_token' import { MarketMakerService } from './market_maker' import { RealitioService } from './realitio' - const logger = getLogger('Services::MarketMakerFactory') interface GetMarketsOptions { @@ -18,32 +18,6 @@ interface GetMarketsOptions { to: number } -const marketMakerFactoryAbi = [ - `function create2FixedProductMarketMaker( - uint saltNonce, - address conditionalTokens, - address collateralToken, - bytes32[] conditionIds, - uint fee, - uint initialFunds, - uint[] distributionHint - ) public returns (address)`, - 'function implementationMaster() public constant returns (address)', - `event FixedProductMarketMakerCreation(address indexed creator, address fixedProductMarketMaker, address conditionalTokens, address collateralToken, bytes32[] conditionIds, uint fee)`, -] - -const marketMakerFactoryCallAbi = [ - `function create2FixedProductMarketMaker( - uint saltNonce, - address conditionalTokens, - address collateralToken, - bytes32[] conditionIds, - uint fee, - uint initialFunds, - uint[] distributionHint - ) public constant returns (address)`, -] - class MarketMakerFactoryService { contract: Contract constantContract: Contract @@ -59,7 +33,7 @@ class MarketMakerFactoryService { this.contract = new ethers.Contract(address, marketMakerFactoryAbi, provider) } - this.constantContract = new ethers.Contract(address, marketMakerFactoryCallAbi, provider) + this.constantContract = new ethers.Contract(address, marketMakerFactoryAbi, provider) this.signerAddress = signerAddress this.provider = provider } diff --git a/app/src/services/oracle.ts b/app/src/services/oracle.ts index a9f7f2fe9f..7ea1b1d3f9 100644 --- a/app/src/services/oracle.ts +++ b/app/src/services/oracle.ts @@ -3,17 +3,11 @@ import { Contract, Wallet, ethers, utils } from 'ethers' import { TransactionReceipt } from 'ethers/providers' import { BigNumber } from 'ethers/utils' +import oracleAbi from '../abi/realitionProxyOracle.json' import { getLogger } from '../util/logger' import { INVALID_ANSWER_ID, Question, TransactionStep } from '../util/types' - const logger = getLogger('Services::Oracle') -const oracleAbi = [ - 'function resolve(bytes32 questionId, uint256 templateId, string question, uint256 numOutcomes) external', - 'function conditionalTokens() public view returns (address)', - 'function realitio() public view returns (address)', -] - export class OracleService { contract: Contract provider: any diff --git a/app/src/services/realitio.ts b/app/src/services/realitio.ts index 56039cc2f5..92aeda6c53 100644 --- a/app/src/services/realitio.ts +++ b/app/src/services/realitio.ts @@ -6,6 +6,8 @@ import { BigNumber, bigNumberify } from 'ethers/utils' // eslint-disable-next-line import/named import { Moment } from 'moment' +import realitioAbi from '../abi/realitio.json' +import realitioScalarAdapterAbi from '../abi/realitioScalarAdapter.json' import { REALITIO_TIMEOUT, SINGLE_SELECT_TEMPLATE_ID, UINT_TEMPLATE_ID } from '../common/constants' import { Outcome } from '../components/market/market_create/steps/outcomes' import { getLogger } from '../util/logger' @@ -14,43 +16,8 @@ import { Question, QuestionLog, TransactionStep } from '../util/types' const logger = getLogger('Services::Realitio') -export const realitioAbi = [ - 'function askQuestion(uint256 template_id, string question, address arbitrator, uint32 timeout, uint32 opening_ts, uint256 nonce) public payable returns (bytes32)', - 'event LogNewAnswer(bytes32 answer, bytes32 indexed question_id, bytes32 history_hash, address indexed user, uint256 bond, uint256 ts, bool is_commitment)', - 'event LogNewQuestion(bytes32 indexed question_id, address indexed user, uint256 template_id, string question, bytes32 indexed content_hash, address arbitrator, uint32 timeout, uint32 opening_ts, uint256 nonce, uint256 created)', - 'function isFinalized(bytes32 question_id) view public returns (bool)', - 'function resultFor(bytes32 question_id) external view returns (bytes32)', - 'function submitAnswer(bytes32 question_id, bytes32 answer, uint256 max_previous)', - 'function withdraw()', - 'function claimWinnings(bytes32 question_id, bytes32[] history_hashes, address[] addrs, uint256[] bonds, bytes32[] answers)', - 'function questions(bytes32 question_id) view public returns (bytes32 content_hash, address arbitrator, uint32 opening_ts, uint32 timeout, uint32 finalize_ts, bool is_pending_arbitration, uint256 bounty, bytes32 best_answer, bytes32 history_hash, uint256 bond)', - 'event LogClaim(bytes32 indexed question_id, address indexed user, uint256 amount)', -] -const realitioCallAbi = [ +const askQuestionConstant = [ 'function askQuestion(uint256 template_id, string question, address arbitrator, uint32 timeout, uint32 opening_ts, uint256 nonce) public constant returns (bytes32)', - { - constant: true, - inputs: [ - { - name: '', - type: 'address', - }, - ], - name: 'balanceOf', - outputs: [ - { - name: '', - type: 'uint256', - }, - ], - payable: false, - stateMutability: 'view', - type: 'function', - }, -] -const realitioScalarAdapterAbi = [ - 'function announceConditionQuestionId(bytes32 questionId, uint256 low, uint256 high)', - 'function resolve(bytes32 questionId, string question, uint256 low, uint256 high)', ] interface TransactionResult { @@ -119,7 +86,7 @@ class RealitioService { this.scalarContract = new ethers.Contract(scalarAddress, realitioScalarAdapterAbi, provider) } - this.constantContract = new ethers.Contract(address, realitioCallAbi, provider) + this.constantContract = new ethers.Contract(address, askQuestionConstant, provider) this.signerAddress = signerAddress this.provider = provider } @@ -378,7 +345,7 @@ class RealitioService { } getBalanceOf = async (address: string): Promise => { - const result = await this.constantContract.balanceOf(address) + const result = await this.contract.balanceOf(address) return result } diff --git a/app/src/services/safe.ts b/app/src/services/safe.ts index ce6f7342fa..068d398fb9 100644 --- a/app/src/services/safe.ts +++ b/app/src/services/safe.ts @@ -1,14 +1,7 @@ import { ethers } from 'ethers' import { BigNumber } from 'ethers/utils' -const proxyAbi = [ - 'function masterCopy() external view returns (address)', - 'function changeMasterCopy(address _masterCopy) external', - 'function swapOwner(address prevOwner, address oldOwner, address newOwner) external', - 'function getOwners() public view returns (address[] memory)', - 'function getThreshold() public view returns (uint256)', - 'function nonce() public view returns (uint256)', -] +import proxyAbi from '../abi/gnosisSafe.json' class SafeService { safe: any diff --git a/app/src/services/unwrap_token.ts b/app/src/services/unwrap_token.ts index 5597671fe3..4cad5a0cff 100644 --- a/app/src/services/unwrap_token.ts +++ b/app/src/services/unwrap_token.ts @@ -1,28 +1,13 @@ import { utils } from 'ethers' import { BigNumber } from 'ethers/utils' -import { wETHabi, wsPOAabi, wxDaiabi } from '../abi/wrapped_asset' +import wrappedAsset from '../abi/wrappedAsset.json' class UnwrapTokenService { static withdrawAmount = (symbol: string, amount: BigNumber): string => { - const contractABI = UnwrapTokenService.getABI(symbol.toLowerCase()) - const withdrawInterface = new utils.Interface(contractABI) + const withdrawInterface = new utils.Interface(wrappedAsset) return withdrawInterface.functions.withdraw.encode([amount.toString()]) } - - static getABI = (symbol: string) => { - const symbolLowerCase = symbol.toLowerCase() - switch (symbolLowerCase) { - case 'wxdai': - return wxDaiabi - case 'wspoa': - return wsPOAabi - case 'weth': - return wETHabi - default: - return [] - } - } } export { UnwrapTokenService } diff --git a/app/src/services/xdai.ts b/app/src/services/xdai.ts index df5e9504b6..97dff51130 100644 --- a/app/src/services/xdai.ts +++ b/app/src/services/xdai.ts @@ -2,6 +2,11 @@ import axios from 'axios' import { Contract, ethers, utils } from 'ethers' import { BigNumber } from 'ethers/utils' +import erc20 from '../abi/erc20.json' +import multiClaimAbi from '../abi/multiClaim.json' +import omniBridgeXdai from '../abi/omniBridgeXdai.json' +import xDaiForeignBridge from '../abi/xDaiForeignBridge.json' +import xDaiMainnetBridge from '../abi/xDaiMainnetBridge.json' import { DAI_TO_XDAI_TOKEN_BRIDGE_ADDRESS, DEFAULT_TOKEN_ADDRESS, @@ -20,110 +25,6 @@ import { waitABit } from '../util/tools' import { ERC20Service } from './erc20' -const abi = [ - { - constant: false, - inputs: [ - { name: 'message', type: 'bytes' }, - { name: 'signatures', type: 'bytes' }, - ], - name: 'executeSignatures', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: false, - inputs: [ - { name: '_sender', type: 'address' }, - { name: '_receiver', type: 'address' }, - { name: '_amount', type: 'uint256' }, - ], - name: 'relayTokens', - outputs: [], - payable: false, - stateMutability: 'nonpayable', - type: 'function', - }, - { - constant: true, - inputs: [{ name: '_txHash', type: 'bytes32' }], - name: 'relayedMessages', - outputs: [{ name: '', type: 'bool' }], - payable: false, - stateMutability: 'view', - type: 'function', - }, -] - -const omniBridgeAbi = [ - { - type: 'function', - stateMutability: 'view', - payable: false, - outputs: [{ type: 'bool', name: '' }], - name: 'messageCallStatus', - inputs: [{ type: 'bytes32', name: '_messageId' }], - constant: true, - }, -] - -const xdaiBridgeAbi = [ - { - type: 'function', - stateMutability: 'payable', - payable: true, - outputs: [], - name: 'relayTokens', - inputs: [{ type: 'address', name: '_receiver' }], - constant: false, - }, -] - -const multiClaimAbi = [ - { - inputs: [ - { internalType: 'address[]', name: 'bridges', type: 'address[]' }, - { internalType: 'bytes[]', name: 'messages', type: 'bytes[]' }, - { internalType: 'bytes[]', name: 'signatures', type: 'bytes[]' }, - ], - name: 'claim', - outputs: [], - stateMutability: 'nonpayable', - type: 'function', - }, -] -const omenAbi = [ - { - type: 'function', - stateMutability: 'nonpayable', - payable: false, - outputs: [{ type: 'bool', name: '' }], - name: 'transferAndCall', - inputs: [ - { type: 'address', name: '_to' }, - { type: 'uint256', name: '_value' }, - { type: 'bytes', name: '_data' }, - ], - constant: false, - }, -] -const approveAbi = [ - { - type: 'function', - stateMutability: 'nonpayable', - payable: false, - outputs: [{ type: 'bool', name: '' }], - name: 'approve', - inputs: [ - { type: 'address', name: '_spender' }, - { type: 'uint256', name: '_value' }, - ], - constant: false, - }, -] - class XdaiService { provider: any abi: any @@ -131,7 +32,7 @@ class XdaiService { constructor(provider: any) { this.provider = provider - this.abi = abi + this.abi = xDaiMainnetBridge } generateErc20ContractInstance = async (address: string) => { @@ -193,15 +94,15 @@ class XdaiService { } static encodeRelayTokens = (receiver: string): string => { - const transferFromInterface = new utils.Interface(xdaiBridgeAbi) + const transferFromInterface = new utils.Interface(xDaiForeignBridge) return transferFromInterface.functions.relayTokens.encode([receiver]) } static encodeApprove = (address: any, value: any) => { - const transferFromInterface = new utils.Interface(approveAbi) + const transferFromInterface = new utils.Interface(erc20) return transferFromInterface.functions.approve.encode([address, value]) } static encodeTokenBridgeTransfer = (receiver: string, amount: BigNumber, data: any) => { - const transferFromInterface = new utils.Interface(omenAbi) + const transferFromInterface = new utils.Interface(omniBridgeXdai) return transferFromInterface.functions.transferAndCall.encode([receiver, amount, data]) } @@ -215,7 +116,7 @@ class XdaiService { const log = transaction.logs[transaction.logs.length - 1] const messageId = log.topics[log.topics.length - 1] // check if the message has been processed - const xdaiOmni = new ethers.Contract(OMNI_BRIDGE_VALIDATORS, omniBridgeAbi, provider.signer) + const xdaiOmni = new ethers.Contract(OMNI_BRIDGE_VALIDATORS, omniBridgeXdai, provider.signer) status = await xdaiOmni.messageCallStatus(messageId) } await waitABit() @@ -249,7 +150,7 @@ class XdaiService { } encodeClaimDaiTokens = (message: string, signatures: string): string => { - const transferFromInterface = new utils.Interface(abi) + const transferFromInterface = new utils.Interface(xDaiMainnetBridge) return transferFromInterface.functions.executeSignatures.encode([message, signatures]) } @@ -408,7 +309,7 @@ class XdaiService { ) // double check if txs have been executed - const bridge = new ethers.Contract(OMNI_CLAIM_ADDRESS, omniBridgeAbi, this.provider.signer.signer) + const bridge = new ethers.Contract(OMNI_CLAIM_ADDRESS, omniBridgeXdai, this.provider.signer.signer) const executed = await Promise.all( results.map(async ({ messageId }: any) => await bridge.messageCallStatus(messageId)), ) diff --git a/app/src/util/cpk.ts b/app/src/util/cpk.ts index 5905fa273a..6e3cc000f0 100644 --- a/app/src/util/cpk.ts +++ b/app/src/util/cpk.ts @@ -7,7 +7,7 @@ import { getHexDataLength, joinHexData } from 'contract-proxy-kit/lib/esm/utils/ import { ethers } from 'ethers' import { Web3Provider } from 'ethers/providers' -import { proxyFactoryAbi } from '../abi/proxy_factory' +import proxyFactoryAbi from '../abi/proxyFactory.json' import { RelayService } from '../services/relay' import { SafeService } from '../services/safe'