From 68442850062d26a0ae939f56860b696cc2203667 Mon Sep 17 00:00:00 2001 From: derekpierre Date: Tue, 9 Apr 2024 15:03:58 -0400 Subject: [PATCH 1/7] Add networks entry to support Polygon Amoy. --- pique/constants/networks.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pique/constants/networks.py b/pique/constants/networks.py index 58fa591..4fce6c7 100644 --- a/pique/constants/networks.py +++ b/pique/constants/networks.py @@ -4,4 +4,5 @@ 11155111: {"name": "sepolia", "explorer": "sepolia.etherscan.io"}, 137: {"name": "polygon-mainnet", "explorer": "polygonscan.com"}, 80001: {"name": "polygon-mumbai", "explorer": "mumbai.polygonscan.com"}, + 80002: {"name": "polygon-amoy", "explorer": "oklink.com/amoy"}, } From 5c11cb285d6ef69f91e38a13bb7c784666a50ccd Mon Sep 17 00:00:00 2001 From: derekpierre Date: Tue, 9 Apr 2024 15:04:47 -0400 Subject: [PATCH 2/7] Fix bug with explorer link support. --- pique/discord/embeds.py | 35 ++++++++++------------------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/pique/discord/embeds.py b/pique/discord/embeds.py index 12961a1..9f2cbb7 100644 --- a/pique/discord/embeds.py +++ b/pique/discord/embeds.py @@ -12,8 +12,8 @@ def _inline_code(text): return f"`{text}`" -def _etherscan_link(network, explorer, path, text): - base_url = f"https://{network}.{explorer}" +def _blockchain_explorer_link(explorer, path, text): + base_url = f"https://{explorer}" return f"[{text}]({base_url}/{path})" @@ -103,30 +103,15 @@ async def make_status_embed(w3c, ctx): embed.set_footer(text=f"Status requested by: {ctx.author.display_name}") return embed - -def get_field_values(event, base_url): - contract_address_link = _etherscan_link(event.contract_address, "address", base_url) - transaction_hash_link = _etherscan_link(event.tx_hash.hex(), "tx", base_url) - block_number_link = _etherscan_link(event.block_number, "block", base_url) - - return { - "Contract Address": (contract_address_link, False), - "Transaction Hash": (transaction_hash_link, False), - "Block Number": (block_number_link, True), - "Transaction Index": (event.tx_index, True), - "Log Index": (event.log_index, True), - } - - -def add_predefined_fields(embed, event, network, explorer): - contract_link = _etherscan_link( - network, explorer, f"address/{event.contract_address}", event.contract_address +def add_predefined_fields(embed, event, explorer): + contract_link = _blockchain_explorer_link( + explorer, f"address/{event.contract_address}", event.contract_address ) - tx_link = _etherscan_link( - network, explorer, f"tx/{event.tx_hash.hex()}", event.tx_hash.hex() + tx_link = _blockchain_explorer_link( + explorer, f"tx/{event.tx_hash.hex()}", event.tx_hash.hex() ) - block_link = _etherscan_link( - network, explorer, f"block/{event.block_number}", str(event.block_number) + block_link = _blockchain_explorer_link( + explorer, f"block/{event.block_number}", str(event.block_number) ) embed.add_field(name="Contract Address", value=contract_link, inline=False) embed.add_field(name="Transaction Hash", value=tx_link, inline=False) @@ -146,7 +131,7 @@ def create_event_embed(event: "Event"): ) # Add fields to the embed - add_predefined_fields(embed, event, network, explorer) + add_predefined_fields(embed, event, explorer) add_event_args_fields(embed, event) LOGGER.debug(f"Created embed for event: {event}") From 901cea287b568995039e480e4561257a711fb7f6 Mon Sep 17 00:00:00 2001 From: derekpierre Date: Tue, 9 Apr 2024 15:05:32 -0400 Subject: [PATCH 3/7] Update example with latest information from Lynx and Tapir testnets for TACo. --- examples/taco/README.md | 2 +- examples/taco/abis/Coordinator.json | 1 - examples/taco/abis/CoordinatorLynx.json | 1866 ++++++++++++++++++++++ examples/taco/abis/CoordinatorTapir.json | 1866 ++++++++++++++++++++++ examples/taco/pique.yml | 14 +- 5 files changed, 3740 insertions(+), 9 deletions(-) delete mode 100644 examples/taco/abis/Coordinator.json create mode 100644 examples/taco/abis/CoordinatorLynx.json create mode 100644 examples/taco/abis/CoordinatorTapir.json diff --git a/examples/taco/README.md b/examples/taco/README.md index ff11af6..eba449a 100644 --- a/examples/taco/README.md +++ b/examples/taco/README.md @@ -1 +1 @@ -To excute the demo run: `pique`. +To execute the demo run: `pique`. diff --git a/examples/taco/abis/Coordinator.json b/examples/taco/abis/Coordinator.json deleted file mode 100644 index b09444c..0000000 --- a/examples/taco/abis/Coordinator.json +++ /dev/null @@ -1 +0,0 @@ -[{"inputs":[{"internalType":"contract ITACoChildApplication","name":"_application","type":"address"},{"internalType":"uint32","name":"_timeout","type":"uint32"},{"internalType":"uint16","name":"_maxDkgSize","type":"uint16"},{"internalType":"address","name":"_admin","type":"address"},{"internalType":"contract IERC20","name":"_currency","type":"address"},{"internalType":"uint256","name":"_feeRatePerSecond","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint32","name":"ritualId","type":"uint32"},{"indexed":true,"internalType":"address","name":"node","type":"address"},{"indexed":false,"internalType":"bytes32","name":"aggregatedTranscriptDigest","type":"bytes32"}],"name":"AggregationPosted","type":"event"},{"anonymous":false,"inputs":[],"name":"DefaultAdminDelayChangeCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint48","name":"newDelay","type":"uint48"},{"indexed":false,"internalType":"uint48","name":"effectSchedule","type":"uint48"}],"name":"DefaultAdminDelayChangeScheduled","type":"event"},{"anonymous":false,"inputs":[],"name":"DefaultAdminTransferCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newAdmin","type":"address"},{"indexed":false,"internalType":"uint48","name":"acceptSchedule","type":"uint48"}],"name":"DefaultAdminTransferScheduled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint32","name":"ritualId","type":"uint32"},{"indexed":false,"internalType":"bool","name":"successful","type":"bool"}],"name":"EndRitual","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"oldSize","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"newSize","type":"uint16"}],"name":"MaxDkgSizeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint32","name":"ritualId","type":"uint32"},{"indexed":true,"internalType":"address","name":"participant","type":"address"},{"components":[{"internalType":"bytes32","name":"word0","type":"bytes32"},{"internalType":"bytes32","name":"word1","type":"bytes32"},{"internalType":"bytes32","name":"word2","type":"bytes32"}],"indexed":false,"internalType":"struct BLS12381.G2Point","name":"publicKey","type":"tuple"}],"name":"ParticipantPublicKeySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint32","name":"ritualId","type":"uint32"}],"name":"StartAggregationRound","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint32","name":"ritualId","type":"uint32"},{"indexed":true,"internalType":"address","name":"authority","type":"address"},{"indexed":false,"internalType":"address[]","name":"participants","type":"address[]"}],"name":"StartRitual","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"oldTimeout","type":"uint32"},{"indexed":false,"internalType":"uint32","name":"newTimeout","type":"uint32"}],"name":"TimeoutChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint32","name":"ritualId","type":"uint32"},{"indexed":true,"internalType":"address","name":"node","type":"address"},{"indexed":false,"internalType":"bytes32","name":"transcriptDigest","type":"bytes32"}],"name":"TranscriptPosted","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INITIATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TREASURY_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptDefaultAdminTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"application","outputs":[{"internalType":"contract ITACoChildApplication","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"beginDefaultAdminTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cancelDefaultAdminTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint48","name":"newDelay","type":"uint48"}],"name":"changeDefaultAdminDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"nodes","type":"address[]"}],"name":"cohortFingerprint","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"currency","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultAdminDelay","outputs":[{"internalType":"uint48","name":"","type":"uint48"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultAdminDelayIncreaseWait","outputs":[{"internalType":"uint48","name":"","type":"uint48"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeRatePerSecond","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"ritualId","type":"uint32"}],"name":"getAuthority","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"ritualId","type":"uint32"},{"internalType":"address","name":"provider","type":"address"}],"name":"getParticipantFromProvider","outputs":[{"components":[{"internalType":"address","name":"provider","type":"address"},{"internalType":"bool","name":"aggregated","type":"bool"},{"internalType":"bytes","name":"transcript","type":"bytes"},{"internalType":"bytes","name":"decryptionRequestStaticKey","type":"bytes"}],"internalType":"struct Coordinator.Participant","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"ritualId","type":"uint32"}],"name":"getParticipants","outputs":[{"components":[{"internalType":"address","name":"provider","type":"address"},{"internalType":"bool","name":"aggregated","type":"bool"},{"internalType":"bytes","name":"transcript","type":"bytes"},{"internalType":"bytes","name":"decryptionRequestStaticKey","type":"bytes"}],"internalType":"struct Coordinator.Participant[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_provider","type":"address"},{"internalType":"uint256","name":"_ritualId","type":"uint256"}],"name":"getProviderPublicKey","outputs":[{"components":[{"internalType":"bytes32","name":"word0","type":"bytes32"},{"internalType":"bytes32","name":"word1","type":"bytes32"},{"internalType":"bytes32","name":"word2","type":"bytes32"}],"internalType":"struct BLS12381.G2Point","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"ritualId","type":"uint32"}],"name":"getPublicKeyFromRitualId","outputs":[{"components":[{"internalType":"bytes32","name":"word0","type":"bytes32"},{"internalType":"bytes16","name":"word1","type":"bytes16"}],"internalType":"struct BLS12381.G1Point","name":"dkgPublicKey","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"word0","type":"bytes32"},{"internalType":"bytes16","name":"word1","type":"bytes16"}],"internalType":"struct BLS12381.G1Point","name":"dkgPublicKey","type":"tuple"}],"name":"getRitualIdFromPublicKey","outputs":[{"internalType":"uint32","name":"ritualId","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"providers","type":"address[]"},{"internalType":"uint32","name":"duration","type":"uint32"}],"name":"getRitualInitiationCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"ritualId","type":"uint32"}],"name":"getRitualState","outputs":[{"internalType":"enum Coordinator.RitualState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"size","type":"uint16"}],"name":"getThresholdForRitualSize","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"providers","type":"address[]"},{"internalType":"address","name":"authority","type":"address"},{"internalType":"uint32","name":"duration","type":"uint32"},{"internalType":"contract IEncryptionAuthorizer","name":"accessController","type":"address"}],"name":"initiateRitual","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"ritualId","type":"uint32"},{"internalType":"bytes","name":"evidence","type":"bytes"},{"internalType":"bytes","name":"ciphertextHeader","type":"bytes"}],"name":"isEncryptionAuthorized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isInitiationPublic","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_provider","type":"address"}],"name":"isProviderPublicKeySet","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"ritualId","type":"uint32"}],"name":"isRitualFinalized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"makeInitiationPublic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxDkgSize","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numberOfRituals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingDefaultAdmin","outputs":[{"internalType":"address","name":"newAdmin","type":"address"},{"internalType":"uint48","name":"schedule","type":"uint48"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingDefaultAdminDelay","outputs":[{"internalType":"uint48","name":"newDelay","type":"uint48"},{"internalType":"uint48","name":"schedule","type":"uint48"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"pendingFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"ritualId","type":"uint32"},{"internalType":"bytes","name":"aggregatedTranscript","type":"bytes"},{"components":[{"internalType":"bytes32","name":"word0","type":"bytes32"},{"internalType":"bytes16","name":"word1","type":"bytes16"}],"internalType":"struct BLS12381.G1Point","name":"dkgPublicKey","type":"tuple"},{"internalType":"bytes","name":"decryptionRequestStaticKey","type":"bytes"}],"name":"postAggregation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"ritualId","type":"uint32"},{"internalType":"bytes","name":"transcript","type":"bytes"}],"name":"postTranscript","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"ritualId","type":"uint32"}],"name":"processPendingFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rituals","outputs":[{"internalType":"address","name":"initiator","type":"address"},{"internalType":"uint32","name":"initTimestamp","type":"uint32"},{"internalType":"uint32","name":"endTimestamp","type":"uint32"},{"internalType":"uint16","name":"totalTranscripts","type":"uint16"},{"internalType":"uint16","name":"totalAggregations","type":"uint16"},{"internalType":"address","name":"authority","type":"address"},{"internalType":"uint16","name":"dkgSize","type":"uint16"},{"internalType":"uint16","name":"threshold","type":"uint16"},{"internalType":"bool","name":"aggregationMismatch","type":"bool"},{"internalType":"contract IEncryptionAuthorizer","name":"accessController","type":"address"},{"components":[{"internalType":"bytes32","name":"word0","type":"bytes32"},{"internalType":"bytes16","name":"word1","type":"bytes16"}],"internalType":"struct BLS12381.G1Point","name":"publicKey","type":"tuple"},{"internalType":"bytes","name":"aggregatedTranscript","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rollbackDefaultAdminDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"newSize","type":"uint16"}],"name":"setMaxDkgSize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"word0","type":"bytes32"},{"internalType":"bytes32","name":"word1","type":"bytes32"},{"internalType":"bytes32","name":"word2","type":"bytes32"}],"internalType":"struct BLS12381.G2Point","name":"_publicKey","type":"tuple"}],"name":"setProviderPublicKey","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IReimbursementPool","name":"pool","type":"address"}],"name":"setReimbursementPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"ritualId","type":"uint32"},{"internalType":"address","name":"authority","type":"address"}],"name":"setRitualAuthority","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"newTimeout","type":"uint32"}],"name":"setTimeout","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timeout","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalPendingFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"}] \ No newline at end of file diff --git a/examples/taco/abis/CoordinatorLynx.json b/examples/taco/abis/CoordinatorLynx.json new file mode 100644 index 0000000..cf37d23 --- /dev/null +++ b/examples/taco/abis/CoordinatorLynx.json @@ -0,0 +1,1866 @@ +[ + { + "type":"constructor", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"_application", + "type":"address", + "internalType":"contract ITACoChildApplication" + }, + { + "name":"_currency", + "type":"address", + "internalType":"contract IERC20" + }, + { + "name":"_feeRatePerSecond", + "type":"uint256", + "internalType":"uint256" + } + ] + }, + { + "type":"error", + "name":"AccessControlBadConfirmation", + "inputs":[ + + ] + }, + { + "type":"error", + "name":"AccessControlEnforcedDefaultAdminDelay", + "inputs":[ + { + "name":"schedule", + "type":"uint48", + "internalType":"uint48" + } + ] + }, + { + "type":"error", + "name":"AccessControlEnforcedDefaultAdminRules", + "inputs":[ + + ] + }, + { + "type":"error", + "name":"AccessControlInvalidDefaultAdmin", + "inputs":[ + { + "name":"defaultAdmin", + "type":"address", + "internalType":"address" + } + ] + }, + { + "type":"error", + "name":"AccessControlUnauthorizedAccount", + "inputs":[ + { + "name":"account", + "type":"address", + "internalType":"address" + }, + { + "name":"neededRole", + "type":"bytes32", + "internalType":"bytes32" + } + ] + }, + { + "type":"error", + "name":"AddressEmptyCode", + "inputs":[ + { + "name":"target", + "type":"address", + "internalType":"address" + } + ] + }, + { + "type":"error", + "name":"AddressInsufficientBalance", + "inputs":[ + { + "name":"account", + "type":"address", + "internalType":"address" + } + ] + }, + { + "type":"error", + "name":"FailedInnerCall", + "inputs":[ + + ] + }, + { + "type":"error", + "name":"InvalidInitialization", + "inputs":[ + + ] + }, + { + "type":"error", + "name":"NotInitializing", + "inputs":[ + + ] + }, + { + "type":"error", + "name":"SafeCastOverflowedUintDowncast", + "inputs":[ + { + "name":"bits", + "type":"uint8", + "internalType":"uint8" + }, + { + "name":"value", + "type":"uint256", + "internalType":"uint256" + } + ] + }, + { + "type":"error", + "name":"SafeERC20FailedOperation", + "inputs":[ + { + "name":"token", + "type":"address", + "internalType":"address" + } + ] + }, + { + "type":"event", + "name":"AggregationPosted", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32", + "indexed":true + }, + { + "name":"node", + "type":"address", + "internalType":"address", + "indexed":true + }, + { + "name":"aggregatedTranscriptDigest", + "type":"bytes32", + "internalType":"bytes32", + "indexed":false + } + ], + "anonymous":false + }, + { + "type":"event", + "name":"DefaultAdminDelayChangeCanceled", + "inputs":[ + + ], + "anonymous":false + }, + { + "type":"event", + "name":"DefaultAdminDelayChangeScheduled", + "inputs":[ + { + "name":"newDelay", + "type":"uint48", + "internalType":"uint48", + "indexed":false + }, + { + "name":"effectSchedule", + "type":"uint48", + "internalType":"uint48", + "indexed":false + } + ], + "anonymous":false + }, + { + "type":"event", + "name":"DefaultAdminTransferCanceled", + "inputs":[ + + ], + "anonymous":false + }, + { + "type":"event", + "name":"DefaultAdminTransferScheduled", + "inputs":[ + { + "name":"newAdmin", + "type":"address", + "internalType":"address", + "indexed":true + }, + { + "name":"acceptSchedule", + "type":"uint48", + "internalType":"uint48", + "indexed":false + } + ], + "anonymous":false + }, + { + "type":"event", + "name":"EndRitual", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32", + "indexed":true + }, + { + "name":"successful", + "type":"bool", + "internalType":"bool", + "indexed":false + } + ], + "anonymous":false + }, + { + "type":"event", + "name":"Initialized", + "inputs":[ + { + "name":"version", + "type":"uint64", + "internalType":"uint64", + "indexed":false + } + ], + "anonymous":false + }, + { + "type":"event", + "name":"MaxDkgSizeChanged", + "inputs":[ + { + "name":"oldSize", + "type":"uint16", + "internalType":"uint16", + "indexed":false + }, + { + "name":"newSize", + "type":"uint16", + "internalType":"uint16", + "indexed":false + } + ], + "anonymous":false + }, + { + "type":"event", + "name":"ParticipantPublicKeySet", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32", + "indexed":true + }, + { + "name":"participant", + "type":"address", + "internalType":"address", + "indexed":true + }, + { + "name":"publicKey", + "type":"tuple", + "components":[ + { + "name":"word0", + "type":"bytes32", + "internalType":"bytes32" + }, + { + "name":"word1", + "type":"bytes32", + "internalType":"bytes32" + }, + { + "name":"word2", + "type":"bytes32", + "internalType":"bytes32" + } + ], + "internalType":"struct BLS12381.G2Point", + "indexed":false + } + ], + "anonymous":false + }, + { + "type":"event", + "name":"ReimbursementPoolSet", + "inputs":[ + { + "name":"pool", + "type":"address", + "internalType":"address", + "indexed":true + } + ], + "anonymous":false + }, + { + "type":"event", + "name":"RitualAuthorityTransferred", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32", + "indexed":true + }, + { + "name":"previousAuthority", + "type":"address", + "internalType":"address", + "indexed":true + }, + { + "name":"newAuthority", + "type":"address", + "internalType":"address", + "indexed":true + } + ], + "anonymous":false + }, + { + "type":"event", + "name":"RoleAdminChanged", + "inputs":[ + { + "name":"role", + "type":"bytes32", + "internalType":"bytes32", + "indexed":true + }, + { + "name":"previousAdminRole", + "type":"bytes32", + "internalType":"bytes32", + "indexed":true + }, + { + "name":"newAdminRole", + "type":"bytes32", + "internalType":"bytes32", + "indexed":true + } + ], + "anonymous":false + }, + { + "type":"event", + "name":"RoleGranted", + "inputs":[ + { + "name":"role", + "type":"bytes32", + "internalType":"bytes32", + "indexed":true + }, + { + "name":"account", + "type":"address", + "internalType":"address", + "indexed":true + }, + { + "name":"sender", + "type":"address", + "internalType":"address", + "indexed":true + } + ], + "anonymous":false + }, + { + "type":"event", + "name":"RoleRevoked", + "inputs":[ + { + "name":"role", + "type":"bytes32", + "internalType":"bytes32", + "indexed":true + }, + { + "name":"account", + "type":"address", + "internalType":"address", + "indexed":true + }, + { + "name":"sender", + "type":"address", + "internalType":"address", + "indexed":true + } + ], + "anonymous":false + }, + { + "type":"event", + "name":"StartAggregationRound", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32", + "indexed":true + } + ], + "anonymous":false + }, + { + "type":"event", + "name":"StartRitual", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32", + "indexed":true + }, + { + "name":"authority", + "type":"address", + "internalType":"address", + "indexed":true + }, + { + "name":"participants", + "type":"address[]", + "internalType":"address[]", + "indexed":false + } + ], + "anonymous":false + }, + { + "type":"event", + "name":"TimeoutChanged", + "inputs":[ + { + "name":"oldTimeout", + "type":"uint32", + "internalType":"uint32", + "indexed":false + }, + { + "name":"newTimeout", + "type":"uint32", + "internalType":"uint32", + "indexed":false + } + ], + "anonymous":false + }, + { + "type":"event", + "name":"TranscriptPosted", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32", + "indexed":true + }, + { + "name":"node", + "type":"address", + "internalType":"address", + "indexed":true + }, + { + "name":"transcriptDigest", + "type":"bytes32", + "internalType":"bytes32", + "indexed":false + } + ], + "anonymous":false + }, + { + "type":"function", + "name":"DEFAULT_ADMIN_ROLE", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"", + "type":"bytes32", + "internalType":"bytes32" + } + ] + }, + { + "type":"function", + "name":"INITIATOR_ROLE", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"", + "type":"bytes32", + "internalType":"bytes32" + } + ] + }, + { + "type":"function", + "name":"TREASURY_ROLE", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"", + "type":"bytes32", + "internalType":"bytes32" + } + ] + }, + { + "type":"function", + "name":"acceptDefaultAdminTransfer", + "stateMutability":"nonpayable", + "inputs":[ + + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"application", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"", + "type":"address", + "internalType":"contract ITACoChildApplication" + } + ] + }, + { + "type":"function", + "name":"beginDefaultAdminTransfer", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"newAdmin", + "type":"address", + "internalType":"address" + } + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"cancelDefaultAdminTransfer", + "stateMutability":"nonpayable", + "inputs":[ + + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"changeDefaultAdminDelay", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"newDelay", + "type":"uint48", + "internalType":"uint48" + } + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"cohortFingerprint", + "stateMutability":"pure", + "inputs":[ + { + "name":"nodes", + "type":"address[]", + "internalType":"address[]" + } + ], + "outputs":[ + { + "name":"", + "type":"bytes32", + "internalType":"bytes32" + } + ] + }, + { + "type":"function", + "name":"currency", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"", + "type":"address", + "internalType":"contract IERC20" + } + ] + }, + { + "type":"function", + "name":"defaultAdmin", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"", + "type":"address", + "internalType":"address" + } + ] + }, + { + "type":"function", + "name":"defaultAdminDelay", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"", + "type":"uint48", + "internalType":"uint48" + } + ] + }, + { + "type":"function", + "name":"defaultAdminDelayIncreaseWait", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"", + "type":"uint48", + "internalType":"uint48" + } + ] + }, + { + "type":"function", + "name":"feeDeduction", + "stateMutability":"pure", + "inputs":[ + { + "name":"", + "type":"uint256", + "internalType":"uint256" + }, + { + "name":"", + "type":"uint256", + "internalType":"uint256" + } + ], + "outputs":[ + { + "name":"", + "type":"uint256", + "internalType":"uint256" + } + ] + }, + { + "type":"function", + "name":"feeRatePerSecond", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"", + "type":"uint256", + "internalType":"uint256" + } + ] + }, + { + "type":"function", + "name":"getAuthority", + "stateMutability":"view", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + } + ], + "outputs":[ + { + "name":"", + "type":"address", + "internalType":"address" + } + ] + }, + { + "type":"function", + "name":"getParticipant", + "stateMutability":"view", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + }, + { + "name":"provider", + "type":"address", + "internalType":"address" + }, + { + "name":"transcript", + "type":"bool", + "internalType":"bool" + } + ], + "outputs":[ + { + "name":"", + "type":"tuple", + "components":[ + { + "name":"provider", + "type":"address", + "internalType":"address" + }, + { + "name":"aggregated", + "type":"bool", + "internalType":"bool" + }, + { + "name":"transcript", + "type":"bytes", + "internalType":"bytes" + }, + { + "name":"decryptionRequestStaticKey", + "type":"bytes", + "internalType":"bytes" + } + ], + "internalType":"struct Coordinator.Participant" + } + ] + }, + { + "type":"function", + "name":"getParticipantFromProvider", + "stateMutability":"view", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + }, + { + "name":"provider", + "type":"address", + "internalType":"address" + } + ], + "outputs":[ + { + "name":"", + "type":"tuple", + "components":[ + { + "name":"provider", + "type":"address", + "internalType":"address" + }, + { + "name":"aggregated", + "type":"bool", + "internalType":"bool" + }, + { + "name":"transcript", + "type":"bytes", + "internalType":"bytes" + }, + { + "name":"decryptionRequestStaticKey", + "type":"bytes", + "internalType":"bytes" + } + ], + "internalType":"struct Coordinator.Participant" + } + ] + }, + { + "type":"function", + "name":"getParticipants", + "stateMutability":"view", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + } + ], + "outputs":[ + { + "name":"", + "type":"tuple[]", + "components":[ + { + "name":"provider", + "type":"address", + "internalType":"address" + }, + { + "name":"aggregated", + "type":"bool", + "internalType":"bool" + }, + { + "name":"transcript", + "type":"bytes", + "internalType":"bytes" + }, + { + "name":"decryptionRequestStaticKey", + "type":"bytes", + "internalType":"bytes" + } + ], + "internalType":"struct Coordinator.Participant[]" + } + ] + }, + { + "type":"function", + "name":"getParticipants", + "stateMutability":"view", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + }, + { + "name":"startIndex", + "type":"uint256", + "internalType":"uint256" + }, + { + "name":"maxParticipants", + "type":"uint256", + "internalType":"uint256" + }, + { + "name":"includeTranscript", + "type":"bool", + "internalType":"bool" + } + ], + "outputs":[ + { + "name":"", + "type":"tuple[]", + "components":[ + { + "name":"provider", + "type":"address", + "internalType":"address" + }, + { + "name":"aggregated", + "type":"bool", + "internalType":"bool" + }, + { + "name":"transcript", + "type":"bytes", + "internalType":"bytes" + }, + { + "name":"decryptionRequestStaticKey", + "type":"bytes", + "internalType":"bytes" + } + ], + "internalType":"struct Coordinator.Participant[]" + } + ] + }, + { + "type":"function", + "name":"getProviderPublicKey", + "stateMutability":"view", + "inputs":[ + { + "name":"provider", + "type":"address", + "internalType":"address" + }, + { + "name":"ritualId", + "type":"uint256", + "internalType":"uint256" + } + ], + "outputs":[ + { + "name":"", + "type":"tuple", + "components":[ + { + "name":"word0", + "type":"bytes32", + "internalType":"bytes32" + }, + { + "name":"word1", + "type":"bytes32", + "internalType":"bytes32" + }, + { + "name":"word2", + "type":"bytes32", + "internalType":"bytes32" + } + ], + "internalType":"struct BLS12381.G2Point" + } + ] + }, + { + "type":"function", + "name":"getProviders", + "stateMutability":"view", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + } + ], + "outputs":[ + { + "name":"", + "type":"address[]", + "internalType":"address[]" + } + ] + }, + { + "type":"function", + "name":"getPublicKeyFromRitualId", + "stateMutability":"view", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + } + ], + "outputs":[ + { + "name":"", + "type":"tuple", + "components":[ + { + "name":"word0", + "type":"bytes32", + "internalType":"bytes32" + }, + { + "name":"word1", + "type":"bytes16", + "internalType":"bytes16" + } + ], + "internalType":"struct BLS12381.G1Point" + } + ] + }, + { + "type":"function", + "name":"getRitualIdFromPublicKey", + "stateMutability":"view", + "inputs":[ + { + "name":"dkgPublicKey", + "type":"tuple", + "components":[ + { + "name":"word0", + "type":"bytes32", + "internalType":"bytes32" + }, + { + "name":"word1", + "type":"bytes16", + "internalType":"bytes16" + } + ], + "internalType":"struct BLS12381.G1Point" + } + ], + "outputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + } + ] + }, + { + "type":"function", + "name":"getRitualInitiationCost", + "stateMutability":"view", + "inputs":[ + { + "name":"providers", + "type":"address[]", + "internalType":"address[]" + }, + { + "name":"duration", + "type":"uint32", + "internalType":"uint32" + } + ], + "outputs":[ + { + "name":"", + "type":"uint256", + "internalType":"uint256" + } + ] + }, + { + "type":"function", + "name":"getRitualState", + "stateMutability":"view", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + } + ], + "outputs":[ + { + "name":"", + "type":"uint8", + "internalType":"enum Coordinator.RitualState" + } + ] + }, + { + "type":"function", + "name":"getRoleAdmin", + "stateMutability":"view", + "inputs":[ + { + "name":"role", + "type":"bytes32", + "internalType":"bytes32" + } + ], + "outputs":[ + { + "name":"", + "type":"bytes32", + "internalType":"bytes32" + } + ] + }, + { + "type":"function", + "name":"getThresholdForRitualSize", + "stateMutability":"pure", + "inputs":[ + { + "name":"size", + "type":"uint16", + "internalType":"uint16" + } + ], + "outputs":[ + { + "name":"", + "type":"uint16", + "internalType":"uint16" + } + ] + }, + { + "type":"function", + "name":"grantRole", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"role", + "type":"bytes32", + "internalType":"bytes32" + }, + { + "name":"account", + "type":"address", + "internalType":"address" + } + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"hasRole", + "stateMutability":"view", + "inputs":[ + { + "name":"role", + "type":"bytes32", + "internalType":"bytes32" + }, + { + "name":"account", + "type":"address", + "internalType":"address" + } + ], + "outputs":[ + { + "name":"", + "type":"bool", + "internalType":"bool" + } + ] + }, + { + "type":"function", + "name":"initialize", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"_timeout", + "type":"uint32", + "internalType":"uint32" + }, + { + "name":"_maxDkgSize", + "type":"uint16", + "internalType":"uint16" + }, + { + "name":"_admin", + "type":"address", + "internalType":"address" + } + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"initiateRitual", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"providers", + "type":"address[]", + "internalType":"address[]" + }, + { + "name":"authority", + "type":"address", + "internalType":"address" + }, + { + "name":"duration", + "type":"uint32", + "internalType":"uint32" + }, + { + "name":"accessController", + "type":"address", + "internalType":"contract IEncryptionAuthorizer" + } + ], + "outputs":[ + { + "name":"", + "type":"uint32", + "internalType":"uint32" + } + ] + }, + { + "type":"function", + "name":"isEncryptionAuthorized", + "stateMutability":"view", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + }, + { + "name":"evidence", + "type":"bytes", + "internalType":"bytes" + }, + { + "name":"ciphertextHeader", + "type":"bytes", + "internalType":"bytes" + } + ], + "outputs":[ + { + "name":"", + "type":"bool", + "internalType":"bool" + } + ] + }, + { + "type":"function", + "name":"isInitiationPublic", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"", + "type":"bool", + "internalType":"bool" + } + ] + }, + { + "type":"function", + "name":"isParticipant", + "stateMutability":"view", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + }, + { + "name":"provider", + "type":"address", + "internalType":"address" + } + ], + "outputs":[ + { + "name":"", + "type":"bool", + "internalType":"bool" + } + ] + }, + { + "type":"function", + "name":"isProviderPublicKeySet", + "stateMutability":"view", + "inputs":[ + { + "name":"provider", + "type":"address", + "internalType":"address" + } + ], + "outputs":[ + { + "name":"", + "type":"bool", + "internalType":"bool" + } + ] + }, + { + "type":"function", + "name":"isRitualActive", + "stateMutability":"view", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + } + ], + "outputs":[ + { + "name":"", + "type":"bool", + "internalType":"bool" + } + ] + }, + { + "type":"function", + "name":"makeInitiationPublic", + "stateMutability":"nonpayable", + "inputs":[ + + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"maxDkgSize", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"", + "type":"uint16", + "internalType":"uint16" + } + ] + }, + { + "type":"function", + "name":"numberOfRituals", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"", + "type":"uint256", + "internalType":"uint256" + } + ] + }, + { + "type":"function", + "name":"owner", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"", + "type":"address", + "internalType":"address" + } + ] + }, + { + "type":"function", + "name":"pendingDefaultAdmin", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"newAdmin", + "type":"address", + "internalType":"address" + }, + { + "name":"schedule", + "type":"uint48", + "internalType":"uint48" + } + ] + }, + { + "type":"function", + "name":"pendingDefaultAdminDelay", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"newDelay", + "type":"uint48", + "internalType":"uint48" + }, + { + "name":"schedule", + "type":"uint48", + "internalType":"uint48" + } + ] + }, + { + "type":"function", + "name":"pendingFees", + "stateMutability":"view", + "inputs":[ + { + "name":"", + "type":"uint256", + "internalType":"uint256" + } + ], + "outputs":[ + { + "name":"", + "type":"uint256", + "internalType":"uint256" + } + ] + }, + { + "type":"function", + "name":"postAggregation", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + }, + { + "name":"aggregatedTranscript", + "type":"bytes", + "internalType":"bytes" + }, + { + "name":"dkgPublicKey", + "type":"tuple", + "components":[ + { + "name":"word0", + "type":"bytes32", + "internalType":"bytes32" + }, + { + "name":"word1", + "type":"bytes16", + "internalType":"bytes16" + } + ], + "internalType":"struct BLS12381.G1Point" + }, + { + "name":"decryptionRequestStaticKey", + "type":"bytes", + "internalType":"bytes" + } + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"postTranscript", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + }, + { + "name":"transcript", + "type":"bytes", + "internalType":"bytes" + } + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"processPendingFee", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + } + ], + "outputs":[ + { + "name":"refundableFee", + "type":"uint256", + "internalType":"uint256" + } + ] + }, + { + "type":"function", + "name":"renounceRole", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"role", + "type":"bytes32", + "internalType":"bytes32" + }, + { + "name":"account", + "type":"address", + "internalType":"address" + } + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"revokeRole", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"role", + "type":"bytes32", + "internalType":"bytes32" + }, + { + "name":"account", + "type":"address", + "internalType":"address" + } + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"rituals", + "stateMutability":"view", + "inputs":[ + { + "name":"", + "type":"uint256", + "internalType":"uint256" + } + ], + "outputs":[ + { + "name":"initiator", + "type":"address", + "internalType":"address" + }, + { + "name":"initTimestamp", + "type":"uint32", + "internalType":"uint32" + }, + { + "name":"endTimestamp", + "type":"uint32", + "internalType":"uint32" + }, + { + "name":"totalTranscripts", + "type":"uint16", + "internalType":"uint16" + }, + { + "name":"totalAggregations", + "type":"uint16", + "internalType":"uint16" + }, + { + "name":"authority", + "type":"address", + "internalType":"address" + }, + { + "name":"dkgSize", + "type":"uint16", + "internalType":"uint16" + }, + { + "name":"threshold", + "type":"uint16", + "internalType":"uint16" + }, + { + "name":"aggregationMismatch", + "type":"bool", + "internalType":"bool" + }, + { + "name":"accessController", + "type":"address", + "internalType":"contract IEncryptionAuthorizer" + }, + { + "name":"publicKey", + "type":"tuple", + "components":[ + { + "name":"word0", + "type":"bytes32", + "internalType":"bytes32" + }, + { + "name":"word1", + "type":"bytes16", + "internalType":"bytes16" + } + ], + "internalType":"struct BLS12381.G1Point" + }, + { + "name":"aggregatedTranscript", + "type":"bytes", + "internalType":"bytes" + } + ] + }, + { + "type":"function", + "name":"rollbackDefaultAdminDelay", + "stateMutability":"nonpayable", + "inputs":[ + + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"setMaxDkgSize", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"newSize", + "type":"uint16", + "internalType":"uint16" + } + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"setProviderPublicKey", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"publicKey", + "type":"tuple", + "components":[ + { + "name":"word0", + "type":"bytes32", + "internalType":"bytes32" + }, + { + "name":"word1", + "type":"bytes32", + "internalType":"bytes32" + }, + { + "name":"word2", + "type":"bytes32", + "internalType":"bytes32" + } + ], + "internalType":"struct BLS12381.G2Point" + } + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"setReimbursementPool", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"pool", + "type":"address", + "internalType":"contract IReimbursementPool" + } + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"setTimeout", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"newTimeout", + "type":"uint32", + "internalType":"uint32" + } + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"supportsInterface", + "stateMutability":"view", + "inputs":[ + { + "name":"interfaceId", + "type":"bytes4", + "internalType":"bytes4" + } + ], + "outputs":[ + { + "name":"", + "type":"bool", + "internalType":"bool" + } + ] + }, + { + "type":"function", + "name":"timeout", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"", + "type":"uint32", + "internalType":"uint32" + } + ] + }, + { + "type":"function", + "name":"totalPendingFees", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"", + "type":"uint256", + "internalType":"uint256" + } + ] + }, + { + "type":"function", + "name":"transferRitualAuthority", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + }, + { + "name":"newAuthority", + "type":"address", + "internalType":"address" + } + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"withdrawTokens", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"token", + "type":"address", + "internalType":"contract IERC20" + }, + { + "name":"amount", + "type":"uint256", + "internalType":"uint256" + } + ], + "outputs":[ + + ] + } +] diff --git a/examples/taco/abis/CoordinatorTapir.json b/examples/taco/abis/CoordinatorTapir.json new file mode 100644 index 0000000..cf37d23 --- /dev/null +++ b/examples/taco/abis/CoordinatorTapir.json @@ -0,0 +1,1866 @@ +[ + { + "type":"constructor", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"_application", + "type":"address", + "internalType":"contract ITACoChildApplication" + }, + { + "name":"_currency", + "type":"address", + "internalType":"contract IERC20" + }, + { + "name":"_feeRatePerSecond", + "type":"uint256", + "internalType":"uint256" + } + ] + }, + { + "type":"error", + "name":"AccessControlBadConfirmation", + "inputs":[ + + ] + }, + { + "type":"error", + "name":"AccessControlEnforcedDefaultAdminDelay", + "inputs":[ + { + "name":"schedule", + "type":"uint48", + "internalType":"uint48" + } + ] + }, + { + "type":"error", + "name":"AccessControlEnforcedDefaultAdminRules", + "inputs":[ + + ] + }, + { + "type":"error", + "name":"AccessControlInvalidDefaultAdmin", + "inputs":[ + { + "name":"defaultAdmin", + "type":"address", + "internalType":"address" + } + ] + }, + { + "type":"error", + "name":"AccessControlUnauthorizedAccount", + "inputs":[ + { + "name":"account", + "type":"address", + "internalType":"address" + }, + { + "name":"neededRole", + "type":"bytes32", + "internalType":"bytes32" + } + ] + }, + { + "type":"error", + "name":"AddressEmptyCode", + "inputs":[ + { + "name":"target", + "type":"address", + "internalType":"address" + } + ] + }, + { + "type":"error", + "name":"AddressInsufficientBalance", + "inputs":[ + { + "name":"account", + "type":"address", + "internalType":"address" + } + ] + }, + { + "type":"error", + "name":"FailedInnerCall", + "inputs":[ + + ] + }, + { + "type":"error", + "name":"InvalidInitialization", + "inputs":[ + + ] + }, + { + "type":"error", + "name":"NotInitializing", + "inputs":[ + + ] + }, + { + "type":"error", + "name":"SafeCastOverflowedUintDowncast", + "inputs":[ + { + "name":"bits", + "type":"uint8", + "internalType":"uint8" + }, + { + "name":"value", + "type":"uint256", + "internalType":"uint256" + } + ] + }, + { + "type":"error", + "name":"SafeERC20FailedOperation", + "inputs":[ + { + "name":"token", + "type":"address", + "internalType":"address" + } + ] + }, + { + "type":"event", + "name":"AggregationPosted", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32", + "indexed":true + }, + { + "name":"node", + "type":"address", + "internalType":"address", + "indexed":true + }, + { + "name":"aggregatedTranscriptDigest", + "type":"bytes32", + "internalType":"bytes32", + "indexed":false + } + ], + "anonymous":false + }, + { + "type":"event", + "name":"DefaultAdminDelayChangeCanceled", + "inputs":[ + + ], + "anonymous":false + }, + { + "type":"event", + "name":"DefaultAdminDelayChangeScheduled", + "inputs":[ + { + "name":"newDelay", + "type":"uint48", + "internalType":"uint48", + "indexed":false + }, + { + "name":"effectSchedule", + "type":"uint48", + "internalType":"uint48", + "indexed":false + } + ], + "anonymous":false + }, + { + "type":"event", + "name":"DefaultAdminTransferCanceled", + "inputs":[ + + ], + "anonymous":false + }, + { + "type":"event", + "name":"DefaultAdminTransferScheduled", + "inputs":[ + { + "name":"newAdmin", + "type":"address", + "internalType":"address", + "indexed":true + }, + { + "name":"acceptSchedule", + "type":"uint48", + "internalType":"uint48", + "indexed":false + } + ], + "anonymous":false + }, + { + "type":"event", + "name":"EndRitual", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32", + "indexed":true + }, + { + "name":"successful", + "type":"bool", + "internalType":"bool", + "indexed":false + } + ], + "anonymous":false + }, + { + "type":"event", + "name":"Initialized", + "inputs":[ + { + "name":"version", + "type":"uint64", + "internalType":"uint64", + "indexed":false + } + ], + "anonymous":false + }, + { + "type":"event", + "name":"MaxDkgSizeChanged", + "inputs":[ + { + "name":"oldSize", + "type":"uint16", + "internalType":"uint16", + "indexed":false + }, + { + "name":"newSize", + "type":"uint16", + "internalType":"uint16", + "indexed":false + } + ], + "anonymous":false + }, + { + "type":"event", + "name":"ParticipantPublicKeySet", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32", + "indexed":true + }, + { + "name":"participant", + "type":"address", + "internalType":"address", + "indexed":true + }, + { + "name":"publicKey", + "type":"tuple", + "components":[ + { + "name":"word0", + "type":"bytes32", + "internalType":"bytes32" + }, + { + "name":"word1", + "type":"bytes32", + "internalType":"bytes32" + }, + { + "name":"word2", + "type":"bytes32", + "internalType":"bytes32" + } + ], + "internalType":"struct BLS12381.G2Point", + "indexed":false + } + ], + "anonymous":false + }, + { + "type":"event", + "name":"ReimbursementPoolSet", + "inputs":[ + { + "name":"pool", + "type":"address", + "internalType":"address", + "indexed":true + } + ], + "anonymous":false + }, + { + "type":"event", + "name":"RitualAuthorityTransferred", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32", + "indexed":true + }, + { + "name":"previousAuthority", + "type":"address", + "internalType":"address", + "indexed":true + }, + { + "name":"newAuthority", + "type":"address", + "internalType":"address", + "indexed":true + } + ], + "anonymous":false + }, + { + "type":"event", + "name":"RoleAdminChanged", + "inputs":[ + { + "name":"role", + "type":"bytes32", + "internalType":"bytes32", + "indexed":true + }, + { + "name":"previousAdminRole", + "type":"bytes32", + "internalType":"bytes32", + "indexed":true + }, + { + "name":"newAdminRole", + "type":"bytes32", + "internalType":"bytes32", + "indexed":true + } + ], + "anonymous":false + }, + { + "type":"event", + "name":"RoleGranted", + "inputs":[ + { + "name":"role", + "type":"bytes32", + "internalType":"bytes32", + "indexed":true + }, + { + "name":"account", + "type":"address", + "internalType":"address", + "indexed":true + }, + { + "name":"sender", + "type":"address", + "internalType":"address", + "indexed":true + } + ], + "anonymous":false + }, + { + "type":"event", + "name":"RoleRevoked", + "inputs":[ + { + "name":"role", + "type":"bytes32", + "internalType":"bytes32", + "indexed":true + }, + { + "name":"account", + "type":"address", + "internalType":"address", + "indexed":true + }, + { + "name":"sender", + "type":"address", + "internalType":"address", + "indexed":true + } + ], + "anonymous":false + }, + { + "type":"event", + "name":"StartAggregationRound", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32", + "indexed":true + } + ], + "anonymous":false + }, + { + "type":"event", + "name":"StartRitual", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32", + "indexed":true + }, + { + "name":"authority", + "type":"address", + "internalType":"address", + "indexed":true + }, + { + "name":"participants", + "type":"address[]", + "internalType":"address[]", + "indexed":false + } + ], + "anonymous":false + }, + { + "type":"event", + "name":"TimeoutChanged", + "inputs":[ + { + "name":"oldTimeout", + "type":"uint32", + "internalType":"uint32", + "indexed":false + }, + { + "name":"newTimeout", + "type":"uint32", + "internalType":"uint32", + "indexed":false + } + ], + "anonymous":false + }, + { + "type":"event", + "name":"TranscriptPosted", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32", + "indexed":true + }, + { + "name":"node", + "type":"address", + "internalType":"address", + "indexed":true + }, + { + "name":"transcriptDigest", + "type":"bytes32", + "internalType":"bytes32", + "indexed":false + } + ], + "anonymous":false + }, + { + "type":"function", + "name":"DEFAULT_ADMIN_ROLE", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"", + "type":"bytes32", + "internalType":"bytes32" + } + ] + }, + { + "type":"function", + "name":"INITIATOR_ROLE", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"", + "type":"bytes32", + "internalType":"bytes32" + } + ] + }, + { + "type":"function", + "name":"TREASURY_ROLE", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"", + "type":"bytes32", + "internalType":"bytes32" + } + ] + }, + { + "type":"function", + "name":"acceptDefaultAdminTransfer", + "stateMutability":"nonpayable", + "inputs":[ + + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"application", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"", + "type":"address", + "internalType":"contract ITACoChildApplication" + } + ] + }, + { + "type":"function", + "name":"beginDefaultAdminTransfer", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"newAdmin", + "type":"address", + "internalType":"address" + } + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"cancelDefaultAdminTransfer", + "stateMutability":"nonpayable", + "inputs":[ + + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"changeDefaultAdminDelay", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"newDelay", + "type":"uint48", + "internalType":"uint48" + } + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"cohortFingerprint", + "stateMutability":"pure", + "inputs":[ + { + "name":"nodes", + "type":"address[]", + "internalType":"address[]" + } + ], + "outputs":[ + { + "name":"", + "type":"bytes32", + "internalType":"bytes32" + } + ] + }, + { + "type":"function", + "name":"currency", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"", + "type":"address", + "internalType":"contract IERC20" + } + ] + }, + { + "type":"function", + "name":"defaultAdmin", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"", + "type":"address", + "internalType":"address" + } + ] + }, + { + "type":"function", + "name":"defaultAdminDelay", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"", + "type":"uint48", + "internalType":"uint48" + } + ] + }, + { + "type":"function", + "name":"defaultAdminDelayIncreaseWait", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"", + "type":"uint48", + "internalType":"uint48" + } + ] + }, + { + "type":"function", + "name":"feeDeduction", + "stateMutability":"pure", + "inputs":[ + { + "name":"", + "type":"uint256", + "internalType":"uint256" + }, + { + "name":"", + "type":"uint256", + "internalType":"uint256" + } + ], + "outputs":[ + { + "name":"", + "type":"uint256", + "internalType":"uint256" + } + ] + }, + { + "type":"function", + "name":"feeRatePerSecond", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"", + "type":"uint256", + "internalType":"uint256" + } + ] + }, + { + "type":"function", + "name":"getAuthority", + "stateMutability":"view", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + } + ], + "outputs":[ + { + "name":"", + "type":"address", + "internalType":"address" + } + ] + }, + { + "type":"function", + "name":"getParticipant", + "stateMutability":"view", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + }, + { + "name":"provider", + "type":"address", + "internalType":"address" + }, + { + "name":"transcript", + "type":"bool", + "internalType":"bool" + } + ], + "outputs":[ + { + "name":"", + "type":"tuple", + "components":[ + { + "name":"provider", + "type":"address", + "internalType":"address" + }, + { + "name":"aggregated", + "type":"bool", + "internalType":"bool" + }, + { + "name":"transcript", + "type":"bytes", + "internalType":"bytes" + }, + { + "name":"decryptionRequestStaticKey", + "type":"bytes", + "internalType":"bytes" + } + ], + "internalType":"struct Coordinator.Participant" + } + ] + }, + { + "type":"function", + "name":"getParticipantFromProvider", + "stateMutability":"view", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + }, + { + "name":"provider", + "type":"address", + "internalType":"address" + } + ], + "outputs":[ + { + "name":"", + "type":"tuple", + "components":[ + { + "name":"provider", + "type":"address", + "internalType":"address" + }, + { + "name":"aggregated", + "type":"bool", + "internalType":"bool" + }, + { + "name":"transcript", + "type":"bytes", + "internalType":"bytes" + }, + { + "name":"decryptionRequestStaticKey", + "type":"bytes", + "internalType":"bytes" + } + ], + "internalType":"struct Coordinator.Participant" + } + ] + }, + { + "type":"function", + "name":"getParticipants", + "stateMutability":"view", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + } + ], + "outputs":[ + { + "name":"", + "type":"tuple[]", + "components":[ + { + "name":"provider", + "type":"address", + "internalType":"address" + }, + { + "name":"aggregated", + "type":"bool", + "internalType":"bool" + }, + { + "name":"transcript", + "type":"bytes", + "internalType":"bytes" + }, + { + "name":"decryptionRequestStaticKey", + "type":"bytes", + "internalType":"bytes" + } + ], + "internalType":"struct Coordinator.Participant[]" + } + ] + }, + { + "type":"function", + "name":"getParticipants", + "stateMutability":"view", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + }, + { + "name":"startIndex", + "type":"uint256", + "internalType":"uint256" + }, + { + "name":"maxParticipants", + "type":"uint256", + "internalType":"uint256" + }, + { + "name":"includeTranscript", + "type":"bool", + "internalType":"bool" + } + ], + "outputs":[ + { + "name":"", + "type":"tuple[]", + "components":[ + { + "name":"provider", + "type":"address", + "internalType":"address" + }, + { + "name":"aggregated", + "type":"bool", + "internalType":"bool" + }, + { + "name":"transcript", + "type":"bytes", + "internalType":"bytes" + }, + { + "name":"decryptionRequestStaticKey", + "type":"bytes", + "internalType":"bytes" + } + ], + "internalType":"struct Coordinator.Participant[]" + } + ] + }, + { + "type":"function", + "name":"getProviderPublicKey", + "stateMutability":"view", + "inputs":[ + { + "name":"provider", + "type":"address", + "internalType":"address" + }, + { + "name":"ritualId", + "type":"uint256", + "internalType":"uint256" + } + ], + "outputs":[ + { + "name":"", + "type":"tuple", + "components":[ + { + "name":"word0", + "type":"bytes32", + "internalType":"bytes32" + }, + { + "name":"word1", + "type":"bytes32", + "internalType":"bytes32" + }, + { + "name":"word2", + "type":"bytes32", + "internalType":"bytes32" + } + ], + "internalType":"struct BLS12381.G2Point" + } + ] + }, + { + "type":"function", + "name":"getProviders", + "stateMutability":"view", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + } + ], + "outputs":[ + { + "name":"", + "type":"address[]", + "internalType":"address[]" + } + ] + }, + { + "type":"function", + "name":"getPublicKeyFromRitualId", + "stateMutability":"view", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + } + ], + "outputs":[ + { + "name":"", + "type":"tuple", + "components":[ + { + "name":"word0", + "type":"bytes32", + "internalType":"bytes32" + }, + { + "name":"word1", + "type":"bytes16", + "internalType":"bytes16" + } + ], + "internalType":"struct BLS12381.G1Point" + } + ] + }, + { + "type":"function", + "name":"getRitualIdFromPublicKey", + "stateMutability":"view", + "inputs":[ + { + "name":"dkgPublicKey", + "type":"tuple", + "components":[ + { + "name":"word0", + "type":"bytes32", + "internalType":"bytes32" + }, + { + "name":"word1", + "type":"bytes16", + "internalType":"bytes16" + } + ], + "internalType":"struct BLS12381.G1Point" + } + ], + "outputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + } + ] + }, + { + "type":"function", + "name":"getRitualInitiationCost", + "stateMutability":"view", + "inputs":[ + { + "name":"providers", + "type":"address[]", + "internalType":"address[]" + }, + { + "name":"duration", + "type":"uint32", + "internalType":"uint32" + } + ], + "outputs":[ + { + "name":"", + "type":"uint256", + "internalType":"uint256" + } + ] + }, + { + "type":"function", + "name":"getRitualState", + "stateMutability":"view", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + } + ], + "outputs":[ + { + "name":"", + "type":"uint8", + "internalType":"enum Coordinator.RitualState" + } + ] + }, + { + "type":"function", + "name":"getRoleAdmin", + "stateMutability":"view", + "inputs":[ + { + "name":"role", + "type":"bytes32", + "internalType":"bytes32" + } + ], + "outputs":[ + { + "name":"", + "type":"bytes32", + "internalType":"bytes32" + } + ] + }, + { + "type":"function", + "name":"getThresholdForRitualSize", + "stateMutability":"pure", + "inputs":[ + { + "name":"size", + "type":"uint16", + "internalType":"uint16" + } + ], + "outputs":[ + { + "name":"", + "type":"uint16", + "internalType":"uint16" + } + ] + }, + { + "type":"function", + "name":"grantRole", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"role", + "type":"bytes32", + "internalType":"bytes32" + }, + { + "name":"account", + "type":"address", + "internalType":"address" + } + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"hasRole", + "stateMutability":"view", + "inputs":[ + { + "name":"role", + "type":"bytes32", + "internalType":"bytes32" + }, + { + "name":"account", + "type":"address", + "internalType":"address" + } + ], + "outputs":[ + { + "name":"", + "type":"bool", + "internalType":"bool" + } + ] + }, + { + "type":"function", + "name":"initialize", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"_timeout", + "type":"uint32", + "internalType":"uint32" + }, + { + "name":"_maxDkgSize", + "type":"uint16", + "internalType":"uint16" + }, + { + "name":"_admin", + "type":"address", + "internalType":"address" + } + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"initiateRitual", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"providers", + "type":"address[]", + "internalType":"address[]" + }, + { + "name":"authority", + "type":"address", + "internalType":"address" + }, + { + "name":"duration", + "type":"uint32", + "internalType":"uint32" + }, + { + "name":"accessController", + "type":"address", + "internalType":"contract IEncryptionAuthorizer" + } + ], + "outputs":[ + { + "name":"", + "type":"uint32", + "internalType":"uint32" + } + ] + }, + { + "type":"function", + "name":"isEncryptionAuthorized", + "stateMutability":"view", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + }, + { + "name":"evidence", + "type":"bytes", + "internalType":"bytes" + }, + { + "name":"ciphertextHeader", + "type":"bytes", + "internalType":"bytes" + } + ], + "outputs":[ + { + "name":"", + "type":"bool", + "internalType":"bool" + } + ] + }, + { + "type":"function", + "name":"isInitiationPublic", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"", + "type":"bool", + "internalType":"bool" + } + ] + }, + { + "type":"function", + "name":"isParticipant", + "stateMutability":"view", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + }, + { + "name":"provider", + "type":"address", + "internalType":"address" + } + ], + "outputs":[ + { + "name":"", + "type":"bool", + "internalType":"bool" + } + ] + }, + { + "type":"function", + "name":"isProviderPublicKeySet", + "stateMutability":"view", + "inputs":[ + { + "name":"provider", + "type":"address", + "internalType":"address" + } + ], + "outputs":[ + { + "name":"", + "type":"bool", + "internalType":"bool" + } + ] + }, + { + "type":"function", + "name":"isRitualActive", + "stateMutability":"view", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + } + ], + "outputs":[ + { + "name":"", + "type":"bool", + "internalType":"bool" + } + ] + }, + { + "type":"function", + "name":"makeInitiationPublic", + "stateMutability":"nonpayable", + "inputs":[ + + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"maxDkgSize", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"", + "type":"uint16", + "internalType":"uint16" + } + ] + }, + { + "type":"function", + "name":"numberOfRituals", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"", + "type":"uint256", + "internalType":"uint256" + } + ] + }, + { + "type":"function", + "name":"owner", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"", + "type":"address", + "internalType":"address" + } + ] + }, + { + "type":"function", + "name":"pendingDefaultAdmin", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"newAdmin", + "type":"address", + "internalType":"address" + }, + { + "name":"schedule", + "type":"uint48", + "internalType":"uint48" + } + ] + }, + { + "type":"function", + "name":"pendingDefaultAdminDelay", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"newDelay", + "type":"uint48", + "internalType":"uint48" + }, + { + "name":"schedule", + "type":"uint48", + "internalType":"uint48" + } + ] + }, + { + "type":"function", + "name":"pendingFees", + "stateMutability":"view", + "inputs":[ + { + "name":"", + "type":"uint256", + "internalType":"uint256" + } + ], + "outputs":[ + { + "name":"", + "type":"uint256", + "internalType":"uint256" + } + ] + }, + { + "type":"function", + "name":"postAggregation", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + }, + { + "name":"aggregatedTranscript", + "type":"bytes", + "internalType":"bytes" + }, + { + "name":"dkgPublicKey", + "type":"tuple", + "components":[ + { + "name":"word0", + "type":"bytes32", + "internalType":"bytes32" + }, + { + "name":"word1", + "type":"bytes16", + "internalType":"bytes16" + } + ], + "internalType":"struct BLS12381.G1Point" + }, + { + "name":"decryptionRequestStaticKey", + "type":"bytes", + "internalType":"bytes" + } + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"postTranscript", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + }, + { + "name":"transcript", + "type":"bytes", + "internalType":"bytes" + } + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"processPendingFee", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + } + ], + "outputs":[ + { + "name":"refundableFee", + "type":"uint256", + "internalType":"uint256" + } + ] + }, + { + "type":"function", + "name":"renounceRole", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"role", + "type":"bytes32", + "internalType":"bytes32" + }, + { + "name":"account", + "type":"address", + "internalType":"address" + } + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"revokeRole", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"role", + "type":"bytes32", + "internalType":"bytes32" + }, + { + "name":"account", + "type":"address", + "internalType":"address" + } + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"rituals", + "stateMutability":"view", + "inputs":[ + { + "name":"", + "type":"uint256", + "internalType":"uint256" + } + ], + "outputs":[ + { + "name":"initiator", + "type":"address", + "internalType":"address" + }, + { + "name":"initTimestamp", + "type":"uint32", + "internalType":"uint32" + }, + { + "name":"endTimestamp", + "type":"uint32", + "internalType":"uint32" + }, + { + "name":"totalTranscripts", + "type":"uint16", + "internalType":"uint16" + }, + { + "name":"totalAggregations", + "type":"uint16", + "internalType":"uint16" + }, + { + "name":"authority", + "type":"address", + "internalType":"address" + }, + { + "name":"dkgSize", + "type":"uint16", + "internalType":"uint16" + }, + { + "name":"threshold", + "type":"uint16", + "internalType":"uint16" + }, + { + "name":"aggregationMismatch", + "type":"bool", + "internalType":"bool" + }, + { + "name":"accessController", + "type":"address", + "internalType":"contract IEncryptionAuthorizer" + }, + { + "name":"publicKey", + "type":"tuple", + "components":[ + { + "name":"word0", + "type":"bytes32", + "internalType":"bytes32" + }, + { + "name":"word1", + "type":"bytes16", + "internalType":"bytes16" + } + ], + "internalType":"struct BLS12381.G1Point" + }, + { + "name":"aggregatedTranscript", + "type":"bytes", + "internalType":"bytes" + } + ] + }, + { + "type":"function", + "name":"rollbackDefaultAdminDelay", + "stateMutability":"nonpayable", + "inputs":[ + + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"setMaxDkgSize", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"newSize", + "type":"uint16", + "internalType":"uint16" + } + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"setProviderPublicKey", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"publicKey", + "type":"tuple", + "components":[ + { + "name":"word0", + "type":"bytes32", + "internalType":"bytes32" + }, + { + "name":"word1", + "type":"bytes32", + "internalType":"bytes32" + }, + { + "name":"word2", + "type":"bytes32", + "internalType":"bytes32" + } + ], + "internalType":"struct BLS12381.G2Point" + } + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"setReimbursementPool", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"pool", + "type":"address", + "internalType":"contract IReimbursementPool" + } + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"setTimeout", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"newTimeout", + "type":"uint32", + "internalType":"uint32" + } + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"supportsInterface", + "stateMutability":"view", + "inputs":[ + { + "name":"interfaceId", + "type":"bytes4", + "internalType":"bytes4" + } + ], + "outputs":[ + { + "name":"", + "type":"bool", + "internalType":"bool" + } + ] + }, + { + "type":"function", + "name":"timeout", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"", + "type":"uint32", + "internalType":"uint32" + } + ] + }, + { + "type":"function", + "name":"totalPendingFees", + "stateMutability":"view", + "inputs":[ + + ], + "outputs":[ + { + "name":"", + "type":"uint256", + "internalType":"uint256" + } + ] + }, + { + "type":"function", + "name":"transferRitualAuthority", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + }, + { + "name":"newAuthority", + "type":"address", + "internalType":"address" + } + ], + "outputs":[ + + ] + }, + { + "type":"function", + "name":"withdrawTokens", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"token", + "type":"address", + "internalType":"contract IERC20" + }, + { + "name":"amount", + "type":"uint256", + "internalType":"uint256" + } + ], + "outputs":[ + + ] + } +] diff --git a/examples/taco/pique.yml b/examples/taco/pique.yml index 61f523c..2480f8f 100644 --- a/examples/taco/pique.yml +++ b/examples/taco/pique.yml @@ -17,18 +17,18 @@ contracts: loop_interval: 180 # seconds track: - name: "Coordinator" - address: "0x8E49989F9D3aD89c8ab0de21FbA2E00C67ca872F" + address: "0xE9e94499bB0f67b9DBD75506ec1735486DE57770" description: "Lynx Domain DKG" - chain_id: 80001 - abi_file: './abis/Coordinator.json' + chain_id: 80002 + abi_file: './abis/CoordinatorLynx.json' events: - EndRitual - StartRitual - - name: "Coodinator" - address: "0xF429C1f2d42765FE2b04CC62ab037564C2C66e5E" + - name: "Coordinator" + address: "0xE690b6bCC0616Dc5294fF84ff4e00335cA52C388" description: "Tapir Domain DKG" - chain_id: 80001 - abi_file: './abis/Coordinator.json' + chain_id: 80002 + abi_file: './abis/CoordinatorTapir.json' events: - StartRitual - EndRitual From 0b8eed9a6fab6e2b5ef517a6f2859564a7f986e7 Mon Sep 17 00:00:00 2001 From: derekpierre Date: Thu, 11 Apr 2024 08:11:37 -0400 Subject: [PATCH 4/7] Fix resolution of the explorer base path; previously the key in the dictionary was used instead of the actual value. --- pique/discord/embeds.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pique/discord/embeds.py b/pique/discord/embeds.py index 9f2cbb7..91be48a 100644 --- a/pique/discord/embeds.py +++ b/pique/discord/embeds.py @@ -3,7 +3,7 @@ from discord import Embed from web3.contract import Contract -from pique._utils import bytes_to_hex, find_read_functions_without_input +from pique._utils import find_read_functions_without_input from pique.constants.networks import NETWORKS from pique.log import LOGGER @@ -103,6 +103,7 @@ async def make_status_embed(w3c, ctx): embed.set_footer(text=f"Status requested by: {ctx.author.display_name}") return embed + def add_predefined_fields(embed, event, explorer): contract_link = _blockchain_explorer_link( explorer, f"address/{event.contract_address}", event.contract_address @@ -121,7 +122,7 @@ def add_predefined_fields(embed, event, explorer): def create_event_embed(event: "Event"): - network, explorer = NETWORKS[event.chain_id] + explorer = NETWORKS[event.chain_id]["explorer"] embed = Embed( title=f"New {event.contract_name} {event.event_type} Event", From 495e578a93d49c21875d0224a590a8004879545c Mon Sep 17 00:00:00 2001 From: derekpierre Date: Thu, 8 Aug 2024 09:44:34 -0400 Subject: [PATCH 5/7] Update polygon amoy explorer to use polygonscan instead of oklink now that Polygon Amoy is supported. --- pique/constants/networks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pique/constants/networks.py b/pique/constants/networks.py index 4fce6c7..e48ef9c 100644 --- a/pique/constants/networks.py +++ b/pique/constants/networks.py @@ -4,5 +4,5 @@ 11155111: {"name": "sepolia", "explorer": "sepolia.etherscan.io"}, 137: {"name": "polygon-mainnet", "explorer": "polygonscan.com"}, 80001: {"name": "polygon-mumbai", "explorer": "mumbai.polygonscan.com"}, - 80002: {"name": "polygon-amoy", "explorer": "oklink.com/amoy"}, + 80002: {"name": "polygon-amoy", "explorer": "amoy.polygonscan.com"}, } From 8ada409096d18d75e025caa88a3bc1c20b8302df Mon Sep 17 00:00:00 2001 From: derekpierre Date: Thu, 8 Aug 2024 10:52:50 -0400 Subject: [PATCH 6/7] Truncate embeds for event arguments since fields allow a maximum of 1024 characters. --- pique/discord/embeds.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/pique/discord/embeds.py b/pique/discord/embeds.py index 91be48a..c06bcfa 100644 --- a/pique/discord/embeds.py +++ b/pique/discord/embeds.py @@ -7,6 +7,24 @@ from pique.constants.networks import NETWORKS from pique.log import LOGGER +MAX_EMBED_CHARS = 1024 + + +def truncate_middle(value: str, max_size: int): + if len(value) <= max_size: + return value + + if max_size < 5: + # don't expect to get here but for safety + # 5 because letter on either end with ellipsis in the middle i.e. "_..._" + return f"{value[:1]}..." + + first_half_end_index = max_size // 2 - 1 # one less than center + first_half_text = value[:first_half_end_index] + + second_half_length = max_size - len(first_half_text) - 3 # remove 3 for the ellipsis + return f"{first_half_text}...{value[-second_half_length:]}" + def _inline_code(text): return f"`{text}`" @@ -35,7 +53,8 @@ def pretty_format_blocks(latest_scanned_blocks): def add_event_args_fields(embed, event): for key, val in event.args.items(): - embed.add_field(name=key, value=_inline_code(str(val)), inline=False) + text = truncate_middle(str(val), MAX_EMBED_CHARS-2) # -2 because of ticks (``) used below + embed.add_field(name=key, value=f"`{text}`", inline=False) def format_uptime(raw_uptime): From 0e7ace5db051b16a688941c6189cec25db7993cf Mon Sep 17 00:00:00 2001 From: derekpierre Date: Thu, 8 Aug 2024 10:54:16 -0400 Subject: [PATCH 7/7] Update CoordinatorLynx.json abi file based on latest deployment. --- examples/taco/abis/CoordinatorLynx.json | 361 ++++++++++-------------- 1 file changed, 148 insertions(+), 213 deletions(-) diff --git a/examples/taco/abis/CoordinatorLynx.json b/examples/taco/abis/CoordinatorLynx.json index cf37d23..eef5cc0 100644 --- a/examples/taco/abis/CoordinatorLynx.json +++ b/examples/taco/abis/CoordinatorLynx.json @@ -7,16 +7,6 @@ "name":"_application", "type":"address", "internalType":"contract ITACoChildApplication" - }, - { - "name":"_currency", - "type":"address", - "internalType":"contract IERC20" - }, - { - "name":"_feeRatePerSecond", - "type":"uint256", - "internalType":"uint256" } ] }, @@ -72,35 +62,6 @@ } ] }, - { - "type":"error", - "name":"AddressEmptyCode", - "inputs":[ - { - "name":"target", - "type":"address", - "internalType":"address" - } - ] - }, - { - "type":"error", - "name":"AddressInsufficientBalance", - "inputs":[ - { - "name":"account", - "type":"address", - "internalType":"address" - } - ] - }, - { - "type":"error", - "name":"FailedInnerCall", - "inputs":[ - - ] - }, { "type":"error", "name":"InvalidInitialization", @@ -131,17 +92,6 @@ } ] }, - { - "type":"error", - "name":"SafeERC20FailedOperation", - "inputs":[ - { - "name":"token", - "type":"address", - "internalType":"address" - } - ] - }, { "type":"event", "name":"AggregationPosted", @@ -240,6 +190,19 @@ ], "anonymous":false }, + { + "type":"event", + "name":"FeeModelApproved", + "inputs":[ + { + "name":"feeModel", + "type":"address", + "internalType":"contract IFeeModel", + "indexed":false + } + ], + "anonymous":false + }, { "type":"event", "name":"Initialized", @@ -352,6 +315,25 @@ ], "anonymous":false }, + { + "type":"event", + "name":"RitualExtended", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32", + "indexed":true + }, + { + "name":"endTimestamp", + "type":"uint32", + "internalType":"uint32", + "indexed":false + } + ], + "anonymous":false + }, { "type":"event", "name":"RoleAdminChanged", @@ -524,21 +506,6 @@ } ] }, - { - "type":"function", - "name":"INITIATOR_ROLE", - "stateMutability":"view", - "inputs":[ - - ], - "outputs":[ - { - "name":"", - "type":"bytes32", - "internalType":"bytes32" - } - ] - }, { "type":"function", "name":"TREASURY_ROLE", @@ -580,6 +547,21 @@ } ] }, + { + "type":"function", + "name":"approveFeeModel", + "stateMutability":"nonpayable", + "inputs":[ + { + "name":"feeModel", + "type":"address", + "internalType":"contract IFeeModel" + } + ], + "outputs":[ + + ] + }, { "type":"function", "name":"beginDefaultAdminTransfer", @@ -642,7 +624,7 @@ }, { "type":"function", - "name":"currency", + "name":"defaultAdmin", "stateMutability":"view", "inputs":[ @@ -651,13 +633,13 @@ { "name":"", "type":"address", - "internalType":"contract IERC20" + "internalType":"address" } ] }, { "type":"function", - "name":"defaultAdmin", + "name":"defaultAdminDelay", "stateMutability":"view", "inputs":[ @@ -665,14 +647,14 @@ "outputs":[ { "name":"", - "type":"address", - "internalType":"address" + "type":"uint48", + "internalType":"uint48" } ] }, { "type":"function", - "name":"defaultAdminDelay", + "name":"defaultAdminDelayIncreaseWait", "stateMutability":"view", "inputs":[ @@ -687,61 +669,103 @@ }, { "type":"function", - "name":"defaultAdminDelayIncreaseWait", - "stateMutability":"view", + "name":"extendRitual", + "stateMutability":"nonpayable", "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + }, + { + "name":"duration", + "type":"uint32", + "internalType":"uint32" + } + ], + "outputs":[ + ] + }, + { + "type":"function", + "name":"feeModelsRegistry", + "stateMutability":"view", + "inputs":[ + { + "name":"", + "type":"address", + "internalType":"contract IFeeModel" + } ], "outputs":[ { "name":"", - "type":"uint48", - "internalType":"uint48" + "type":"bool", + "internalType":"bool" } ] }, { "type":"function", - "name":"feeDeduction", - "stateMutability":"pure", + "name":"getAccessController", + "stateMutability":"view", "inputs":[ { - "name":"", - "type":"uint256", - "internalType":"uint256" - }, + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + } + ], + "outputs":[ { "name":"", - "type":"uint256", - "internalType":"uint256" + "type":"address", + "internalType":"contract IEncryptionAuthorizer" + } + ] + }, + { + "type":"function", + "name":"getAuthority", + "stateMutability":"view", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" } ], "outputs":[ { "name":"", - "type":"uint256", - "internalType":"uint256" + "type":"address", + "internalType":"address" } ] }, { "type":"function", - "name":"feeRatePerSecond", + "name":"getFeeModel", "stateMutability":"view", "inputs":[ - + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + } ], "outputs":[ { "name":"", - "type":"uint256", - "internalType":"uint256" + "type":"address", + "internalType":"contract IFeeModel" } ] }, { "type":"function", - "name":"getAuthority", + "name":"getInitiator", "stateMutability":"view", "inputs":[ { @@ -1074,30 +1098,6 @@ } ] }, - { - "type":"function", - "name":"getRitualInitiationCost", - "stateMutability":"view", - "inputs":[ - { - "name":"providers", - "type":"address[]", - "internalType":"address[]" - }, - { - "name":"duration", - "type":"uint32", - "internalType":"uint32" - } - ], - "outputs":[ - { - "name":"", - "type":"uint256", - "internalType":"uint256" - } - ] - }, { "type":"function", "name":"getRitualState", @@ -1155,6 +1155,30 @@ } ] }, + { + "type":"function", + "name":"getTimestamps", + "stateMutability":"view", + "inputs":[ + { + "name":"ritualId", + "type":"uint32", + "internalType":"uint32" + } + ], + "outputs":[ + { + "name":"initTimestamp", + "type":"uint32", + "internalType":"uint32" + }, + { + "name":"endTimestamp", + "type":"uint32", + "internalType":"uint32" + } + ] + }, { "type":"function", "name":"grantRole", @@ -1229,6 +1253,11 @@ "name":"initiateRitual", "stateMutability":"nonpayable", "inputs":[ + { + "name":"feeModel", + "type":"address", + "internalType":"contract IFeeModel" + }, { "name":"providers", "type":"address[]", @@ -1287,21 +1316,6 @@ } ] }, - { - "type":"function", - "name":"isInitiationPublic", - "stateMutability":"view", - "inputs":[ - - ], - "outputs":[ - { - "name":"", - "type":"bool", - "internalType":"bool" - } - ] - }, { "type":"function", "name":"isParticipant", @@ -1364,17 +1378,6 @@ } ] }, - { - "type":"function", - "name":"makeInitiationPublic", - "stateMutability":"nonpayable", - "inputs":[ - - ], - "outputs":[ - - ] - }, { "type":"function", "name":"maxDkgSize", @@ -1460,25 +1463,6 @@ } ] }, - { - "type":"function", - "name":"pendingFees", - "stateMutability":"view", - "inputs":[ - { - "name":"", - "type":"uint256", - "internalType":"uint256" - } - ], - "outputs":[ - { - "name":"", - "type":"uint256", - "internalType":"uint256" - } - ] - }, { "type":"function", "name":"postAggregation", @@ -1541,25 +1525,6 @@ ] }, - { - "type":"function", - "name":"processPendingFee", - "stateMutability":"nonpayable", - "inputs":[ - { - "name":"ritualId", - "type":"uint32", - "internalType":"uint32" - } - ], - "outputs":[ - { - "name":"refundableFee", - "type":"uint256", - "internalType":"uint256" - } - ] - }, { "type":"function", "name":"renounceRole", @@ -1683,6 +1648,11 @@ "name":"aggregatedTranscript", "type":"bytes", "internalType":"bytes" + }, + { + "name":"feeModel", + "type":"address", + "internalType":"contract IFeeModel" } ] }, @@ -1808,21 +1778,6 @@ } ] }, - { - "type":"function", - "name":"totalPendingFees", - "stateMutability":"view", - "inputs":[ - - ], - "outputs":[ - { - "name":"", - "type":"uint256", - "internalType":"uint256" - } - ] - }, { "type":"function", "name":"transferRitualAuthority", @@ -1841,26 +1796,6 @@ ], "outputs":[ - ] - }, - { - "type":"function", - "name":"withdrawTokens", - "stateMutability":"nonpayable", - "inputs":[ - { - "name":"token", - "type":"address", - "internalType":"contract IERC20" - }, - { - "name":"amount", - "type":"uint256", - "internalType":"uint256" - } - ], - "outputs":[ - ] } ]