diff --git a/canopy_data/node1/config.json b/canopy_data/node1/config.json index eb87207..ab40749 100644 --- a/canopy_data/node1/config.json +++ b/canopy_data/node1/config.json @@ -1,53 +1,48 @@ { - "logLevel": "debug", - "chainId": 1, - "sleepUntil": 0, - "rootChain": [ - { - "chainId": 1, - "url": "http://node1:50002/" - } - ], - "runVDF": true, - "headless": false, - "autoUpdate": true, - "runningAutoUpdate": false, - "walletPort": "50000", - "explorerPort": "50001", - "rpcPort": "50002", "adminPort": "50003", - "rpcURL": "http://localhost:50002", - "adminRPCUrl": "http://localhost:50003", - "timeoutS": 3, + "adminRPCUrl": "http://node1:50003", + "bannedIPs": null, + "bannedPeerIDs": null, + "chainId": 1, + "commitTimeoutMS": 2000, "dataDirPath": "/root/.canopy", "dbName": "canopy", + "dialPeers": [], + "dropPercentage": 35, + "electionTimeoutMS": 1500, + "electionVoteTimeoutMS": 1500, + "explorerPort": "50001", + "externalAddress": "node1", + "headless": false, "inMemory": false, - "networkID": 1, - "listenAddress": "0.0.0.0:9001", - "externalAddress": "tcp://node1.localhost", + "individualMaxTxSize": 4000, + "listenAddress": "127.0.0.101:9001", + "logLevel": "debug", "maxInbound": 21, "maxOutbound": 7, - "trutedPeersIDs": null, - "dialPeers": [ - "90703d453dfa70af3c85f3605e6cc8222d01d68d439ee5a9ade10be631572b330e1793206c8d417d9693be1d5af417fe@tcp://cnpy.network", - "b338f09135994130bee5da939513241b5d01ba5e73c409ed5ecea597b86a8b9c05fd27fb5e47a7296350fbae6262a484@tcp://cnpynetwork.com" - ], - "bannedPeerIDs": null, - "bannedIPs": null, + "maxTotalBytes": 1000000, + "maxTransactionCount": 5000, + "metricsEnabled": true, "minimumPeersToStart": 0, + "networkID": 1, "newHeightTimeoutMS": 4500, - "electionTimeoutMS": 1500, - "electionVoteTimeoutMS": 1500, - "proposeTimeoutMS": 2500, - "proposeVoteTimeoutMS": 4000, "precommitTimeoutMS": 2000, "precommitVoteTimeoutMS": 2000, - "commitTimeoutMS": 2000, + "prometheusAddress": "0.0.0.0:9090", + "proposeTimeoutMS": 2500, + "proposeVoteTimeoutMS": 4000, + "rootChain": [ + { + "chainId": 1, + "url": "http://node1:50002" + } + ], "roundInterruptTimeoutMS": 2000, - "maxTotalBytes": 1000000, - "maxTransactionCount": 5000, - "individualMaxTxSize": 4000, - "dropPercentage": 35, - "metricsEnabled": true, - "prometheusAddress": "0.0.0.0:9090" + "rpcPort": "50002", + "rpcURL": "http://node1:50002", + "runVDF": true, + "sleepUntil": 0, + "timeoutS": 3, + "trustedPeerIDs": null, + "walletPort": "50000" } diff --git a/canopy_data/node1/genesis.json b/canopy_data/node1/genesis.json index 1014bfb..8353777 100644 --- a/canopy_data/node1/genesis.json +++ b/canopy_data/node1/genesis.json @@ -1,143 +1,123 @@ { - "validators": [ + "time": "2025-07-23 01:47:59", + "accounts": [ + { + "address": "26ee9f7c00343389a61e3a7d7bb46be1dc025968", + "amount": 1000000000 + }, { - "address": "9c51a2b9b9234865a61cd43aae7f899441ae6271", - "publicKey": "8ad02e9b05e418f198e89179685a48b227f1c2bc266d4db002f24f8155c5119cbb9387146319b5dc4a260184f20d5d4f", - "committees": [1, 2], - "netAddress": "tcp://cnpy.xyz", - "stakedAmount": 1, - "output": "cf228862bd36016c0154e789d5fabe584da31c7e" + "address": "45281f3e49287fb12a6721bffab01fb60ee02df9", + "amount": 1000000000 }, { - "address": "5bc4bd9a3468889febdc6a73df0090b12a263eb4", - "publicKey": "90703d453dfa70af3c85f3605e6cc8222d01d68d439ee5a9ade10be631572b330e1793206c8d417d9693be1d5af417fe", - "committees": [1, 2], - "netAddress": "tcp://cnpy.network", - "stakedAmount": 1, - "output": "faef35fb62796dfd6dfb9b19ea3d4be130a97257" + "address": "652d4ac1d5340ae9d55e464ae36f12824d6ec4fd", + "amount": 1000000000 }, { - "address": "997634c57ad60414116dc59417db6829c209f1df", - "publicKey": "89c592a8a27bc2ba3783048ebad2ee77b67ce8db1d3706d19135fac44e71d459870791d8face14dde4df6262a6445a27", - "committees": [1, 2], - "netAddress": "tcp://minerstellar.com", - "stakedAmount": 1, - "output": "12ee25b30f3016e3427983c1fb75eabab025a2d5" + "address": "2664360a95b274e37f3704a07d050df2c283de01", + "amount": 1000000000 }, { - "address": "ac2c2eb9aa04b99ec9a523b09ca844a77826c291", - "publicKey": "b1891c2a38b553279b46452a4ecc49fa42ecb7c71a27f39efa5b3f817481b443cb44da9be251fa571d1ac43dd5ef7fd9", - "committees": [1, 2], - "netAddress": "tcp://agentofthecrown.com", - "stakedAmount": 1, - "output": "330d139fd014ec84c15b9786f9934a5a95a02d25" + "address": "4487360b0f75713180d3e7fc8a0abf7c49b4eb78", + "amount": 1000000000 }, { - "address": "a843153e432b2b3052e50cfb37bbd021e9cbd34c", - "publicKey": "b338f09135994130bee5da939513241b5d01ba5e73c409ed5ecea597b86a8b9c05fd27fb5e47a7296350fbae6262a484", - "committees": [1, 2], - "netAddress": "tcp://cnpynetwork.com", - "stakedAmount": 1, - "output": "1202c3f3ac5e4876f9b35774858ca16e129ceba1" + "address": "ea80225e40d40bce7cc08953f2618615af8d998d", + "amount": 1000000000 }, { - "address": "5946f3adf4965295b816a40b719ff79e9fd1dba2", - "publicKey": "8794c211342dc0da348b16e4e5903ffd7f913c390bd29dbfad0c44b891b08a99d74bc90546d89b54098ac7c0c5331550", - "committees": [1, 2], - "netAddress": "tcp://dun3waves.xyz", - "stakedAmount": 1, - "output": "3b7d461b533ff5b7ec28d172656b8049f29e5b11" + "address": "ed02514375777fe172874a34890b9ef407e8ff63", + "amount": 1000000000 }, { - "address": "51f334c0e137b99aa8fc9eae3a71064c2ccf8208", - "publicKey": "99e38bdc8b7c7f9f8a67151da78994a2616ac127518d4dd8f5a08ad760921758269fcb5172713b9585ec7007f60cb6fe", - "committees": [1, 2], - "netAddress": "tcp://canopynode.cam", - "stakedAmount": 1, - "output": "3dad3f4dcb6e0411a6acfc66c3d8850aff9789e4" + "address": "b5ca2d2b88cb91d21c235958d50d33d8fa176ad9", + "amount": 1000000000 }, { - "address": "8b243551a78f5380d6ba5b1e84fee34b23f6e757", - "publicKey": "a329a705dab85db2fd950cef9ffd87e27ff4b91b929d5ab26e6efb40b1b3b45e74f7d8162822c49b9909893e6461cc8d", - "committees": [1, 2], - "netAddress": "tcp://uem44.com", - "stakedAmount": 1, - "output": "b70bd2f4a87a43597c9c78d65dc3192090fdaa6f" + "address": "f68e28dca6f7aa0a8fc2e2eb9e16a428e6e421c8", + "amount": 1000000000 }, { - "address": "fc5cdb5c0b6a6df41b92976bbdf2b6832855446f", - "publicKey": "b17d4eb3938957e710bacc9f09d2a9aa79a568fcdf1f8fc565bdb5de3f334295e929e4b086b9c8e9610654155fb0452b", - "committees": [1, 2], - "netAddress": "tcp://canopycoin.xyz", - "stakedAmount": 1, - "output": "a59917b6d045327d4a39736fea81b72e1891692e" + "address": "2b5265ee258fb73ba8d186e9585190e1daa93c05", + "amount": 1000000000 }, { - "address": "4e2ce94661e2e3fd3af02e21898803c4d74e84ba", - "publicKey": "ab4fe218bb09a27908c6181fc799b8371d895f13173fed5b924af60235a548cd882ba97f911c08d9bda34c46a7dab359", - "committees": [1, 2], - "netAddress": "tcp://cryptoicp.com", - "stakedAmount": 1, - "output": "bc01362a7bd2613a3786ce32007452fd51f2bf1b" + "address": "5132ff6e85b30bd11dc80c9d74f4375c43440bed", + "amount": 1000000000 }, { - "address": "33e14ef6b87fb688b829c5e29618bb549dc7b4cd", - "publicKey": "b346ad1f1809adc64d4a06e5be4d9960a018faada129d659623fd97846d5127de550218929ec9de4af9d9cbd1ec52d46", - "committees": [1, 2], - "netAddress": "tcp://lava-9.com", - "stakedAmount": 1, - "output": "b587ddd8b58134c61ec52e5b1e88a27a5e07be82" + "address": "ef525b1faa2e9b670b38c1b6f2d011275f6be6a1", + "amount": 1000000000 + } + ], + "nonSigners": null, + "validators": [ + { + "address": "26ee9f7c00343389a61e3a7d7bb46be1dc025968", + "publicKey": "97a7432a31f9a2de939cd9ec1f252650ccaec3a46be90570483ac6ed9d9697c0e72fcb4adbd6065c5234c32c19c0addd", + "committees": [ + 1, + 2 + ], + "netAddress": "tcp://node1", + "stakedAmount": 1000000000, + "output": "26ee9f7c00343389a61e3a7d7bb46be1dc025968", + "compound": true }, { - "address": "b9c6c2dfa9d049e480c8cec9c29463abf078a594", - "publicKey": "9174b24ba27fe8a0f8616bf1a382d81428ef8a94b7ff70916bb9b266c9070bd848e49a0c33a1c17553416c949ea3409a", - "committees": [1, 2], - "netAddress": "tcp://cleanmarro.com", - "stakedAmount": 1, - "output": "8f5633ac35fc17fe113b8ecaa2060289607c0352" + "address": "26ee9f7c00343389a61e3a7d7bb46be1dc025968", + "publicKey": "97a7432a31f9a2de939cd9ec1f252650ccaec3a46be90570483ac6ed9d9697c0e72fcb4adbd6065c5234c32c19c0addd", + "committees": [ + 2 + ], + "netAddress": "tcp://node2", + "stakedAmount": 1000000000, + "output": "26ee9f7c00343389a61e3a7d7bb46be1dc025968", + "compound": true } ], "params": { "consensus": { "blockSize": 1000000, "protocolVersion": "1/0", + "retired": 0, "rootChainID": 1 }, - "validator": { - "unstakingBlocks": 30240, - "maxPauseBlocks": 30240, - "doubleSignSlashPercentage": 10, - "nonSignSlashPercentage": 1, - "maxNonSign": 60, - "nonSignWindow": 100, - "maxCommittees": 16, - "maxCommitteeSize": 100, - "earlyWithdrawalPenalty": 0, - "delegateUnstakingBlocks": 12960, - "minimumOrderSize": 1000000000, - "stakePercentForSubsidizedCommittee": 33, - "maxSlashPerCommittee": 15, - "delegateRewardPercentage": 0, - "buyDeadlineBlocks": 60, - "lockOrderFeeMultiplier": 2 - }, "fee": { - "sendFee": 10000, - "stakeFee": 10000, - "editStakeFee": 10000, - "unstakeFee": 10000, - "pauseFee": 10000, - "unpauseFee": 10000, - "changeParameterFee": 10000, - "daoTransferFee": 10000, "certificateResultsFee": 0, - "subsidyFee": 10000, + "changeParameterFee": 10000, "createOrderFee": 10000, + "daoTransferFee": 10000, + "deleteOrderFee": 10000, "editOrderFee": 10000, - "deleteOrderFee": 10000 + "editStakeFee": 10000, + "pauseFee": 10000, + "sendFee": 10000, + "stakeFee": 10000, + "subsidyFee": 10000, + "unpauseFee": 10000, + "unstakeFee": 10000 }, "governance": { "daoRewardPercentage": 5 + }, + "validator": { + "buyDeadlineBlocks": 60, + "delegateRewardPercentage": 10, + "delegateUnstakingBlocks": 12960, + "doubleSignSlashPercentage": 10, + "earlyWithdrawalPenalty": 0, + "lockOrderFeeMultiplier": 2, + "maxCommitteeSize": 100, + "maxCommittees": 16, + "maxNonSign": 60, + "maxPauseBlocks": 4380, + "maxSlashPerCommittee": 15, + "minimumOrderSize": 1000, + "nonSignSlashPercentage": 1, + "nonSignWindow": 100, + "stakePercentForSubsidizedCommittee": 33, + "unstakingBlocks": 2 } } } diff --git a/canopy_data/node2/config.json b/canopy_data/node2/config.json index 4368429..f76467a 100644 --- a/canopy_data/node2/config.json +++ b/canopy_data/node2/config.json @@ -1,52 +1,60 @@ { - "logLevel": "debug", - "chainId": 2, - "sleepUntil": 0, - "rootChain": [ - { - "chainId": 1, - "url": "http://node1:50002/" - } - ], - "runVDF": false, - "headless": false, - "autoUpdate": true, - "runningAutoUpdate": false, - "walletPort": "40000", - "explorerPort": "40001", - "rpcPort": "40002", "adminPort": "40003", - "rpcURL": "http://localhost:40002", - "adminRPCUrl": "http://localhost:40003", - "timeoutS": 3, + "adminRPCUrl": "http://node2:40003", + "bannedIPs": null, + "bannedPeerIDs": null, + "chainId": 2, + "commitTimeoutMS": 2000, "dataDirPath": "/root/.canopy", "dbName": "canopy", + "dialPeers": [], + "dropPercentage": 35, + "electionTimeoutMS": 1500, + "electionVoteTimeoutMS": 1500, + "ethBlockProviderConfig": { + "ethChainId": 1, + "ethNodeUrl": "http://anvil:8545", + "ethNodeWsUrl": "ws://anvil:8545", + "retryDelay": 5, + "safeBlockConfirmations": 5 + }, + "explorerPort": "40001", + "externalAddress": "node2", + "headless": false, "inMemory": false, - "networkID": 1, - "listenAddress": "0.0.0.0:9001", - "externalAddress": "tcp://node2.localhost", + "individualMaxTxSize": 4000, + "listenAddress": "127.0.0.102:9002", + "logLevel": "debug", "maxInbound": 21, "maxOutbound": 7, - "trutedPeersIDs": null, - "dialPeers": [ - "8ad02e9b05e418f198e89179685a48b227f1c2bc266d4db002f24f8155c5119cbb9387146319b5dc4a260184f20d5d4f@tcp://cnpy.xyz" - ], - "bannedPeerIDs": null, - "bannedIPs": null, + "maxTotalBytes": 1000000, + "maxTransactionCount": 5000, + "metricsEnabled": true, "minimumPeersToStart": 0, + "networkID": 1, "newHeightTimeoutMS": 4500, - "electionTimeoutMS": 1500, - "electionVoteTimeoutMS": 1500, - "proposeTimeoutMS": 2500, - "proposeVoteTimeoutMS": 3000, + "oracleConfig": { + "committee": 2, + "orderResubmitDelay": 1, + "stateSaveFile": "last_block_height.txt" + }, "precommitTimeoutMS": 2000, "precommitVoteTimeoutMS": 2000, - "commitTimeoutMS": 2000, + "prometheusAddress": "0.0.0.0:9090", + "proposeTimeoutMS": 2500, + "proposeVoteTimeoutMS": 4000, + "rootChain": [ + { + "chainId": 1, + "url": "http://node1:50002" + } + ], "roundInterruptTimeoutMS": 2000, - "maxTotalBytes": 1000000, - "maxTransactionCount": 5000, - "individualMaxTxSize": 4000, - "dropPercentage": 35, - "metricsEnabled": true, - "prometheusAddress": "0.0.0.0:9090" + "rpcPort": "40002", + "rpcURL": "http://node2:40002", + "runVDF": true, + "sleepUntil": 0, + "timeoutS": 3, + "trustedPeerIDs": null, + "walletPort": "40000" } diff --git a/canopy_data/node2/genesis.json b/canopy_data/node2/genesis.json index 53083f2..8353777 100644 --- a/canopy_data/node2/genesis.json +++ b/canopy_data/node2/genesis.json @@ -1,143 +1,123 @@ { - "validators": [ + "time": "2025-07-23 01:47:59", + "accounts": [ + { + "address": "26ee9f7c00343389a61e3a7d7bb46be1dc025968", + "amount": 1000000000 + }, { - "address": "9c51a2b9b9234865a61cd43aae7f899441ae6271", - "publicKey": "8ad02e9b05e418f198e89179685a48b227f1c2bc266d4db002f24f8155c5119cbb9387146319b5dc4a260184f20d5d4f", - "committees": [2], - "netAddress": "tcp://cnpy.xyz", - "stakedAmount": 1, - "output": "cf228862bd36016c0154e789d5fabe584da31c7e" + "address": "45281f3e49287fb12a6721bffab01fb60ee02df9", + "amount": 1000000000 }, { - "address": "5bc4bd9a3468889febdc6a73df0090b12a263eb4", - "publicKey": "90703d453dfa70af3c85f3605e6cc8222d01d68d439ee5a9ade10be631572b330e1793206c8d417d9693be1d5af417fe", - "committees": [2], - "netAddress": "tcp://cnpy.network", - "stakedAmount": 1, - "output": "faef35fb62796dfd6dfb9b19ea3d4be130a97257" + "address": "652d4ac1d5340ae9d55e464ae36f12824d6ec4fd", + "amount": 1000000000 }, { - "address": "997634c57ad60414116dc59417db6829c209f1df", - "publicKey": "89c592a8a27bc2ba3783048ebad2ee77b67ce8db1d3706d19135fac44e71d459870791d8face14dde4df6262a6445a27", - "committees": [2], - "netAddress": "tcp://minerstellar.com", - "stakedAmount": 1, - "output": "12ee25b30f3016e3427983c1fb75eabab025a2d5" + "address": "2664360a95b274e37f3704a07d050df2c283de01", + "amount": 1000000000 }, { - "address": "ac2c2eb9aa04b99ec9a523b09ca844a77826c291", - "publicKey": "b1891c2a38b553279b46452a4ecc49fa42ecb7c71a27f39efa5b3f817481b443cb44da9be251fa571d1ac43dd5ef7fd9", - "committees": [2], - "netAddress": "tcp://agentofthecrown.com", - "stakedAmount": 1, - "output": "330d139fd014ec84c15b9786f9934a5a95a02d25" + "address": "4487360b0f75713180d3e7fc8a0abf7c49b4eb78", + "amount": 1000000000 }, { - "address": "a843153e432b2b3052e50cfb37bbd021e9cbd34c", - "publicKey": "b338f09135994130bee5da939513241b5d01ba5e73c409ed5ecea597b86a8b9c05fd27fb5e47a7296350fbae6262a484", - "committees": [2], - "netAddress": "tcp://cnpynetwork.com", - "stakedAmount": 1, - "output": "1202c3f3ac5e4876f9b35774858ca16e129ceba1" + "address": "ea80225e40d40bce7cc08953f2618615af8d998d", + "amount": 1000000000 }, { - "address": "5946f3adf4965295b816a40b719ff79e9fd1dba2", - "publicKey": "8794c211342dc0da348b16e4e5903ffd7f913c390bd29dbfad0c44b891b08a99d74bc90546d89b54098ac7c0c5331550", - "committees": [2], - "netAddress": "tcp://dun3waves.xyz", - "stakedAmount": 1, - "output": "3b7d461b533ff5b7ec28d172656b8049f29e5b11" + "address": "ed02514375777fe172874a34890b9ef407e8ff63", + "amount": 1000000000 }, { - "address": "51f334c0e137b99aa8fc9eae3a71064c2ccf8208", - "publicKey": "99e38bdc8b7c7f9f8a67151da78994a2616ac127518d4dd8f5a08ad760921758269fcb5172713b9585ec7007f60cb6fe", - "committees": [2], - "netAddress": "tcp://canopynode.cam", - "stakedAmount": 1, - "output": "3dad3f4dcb6e0411a6acfc66c3d8850aff9789e4" + "address": "b5ca2d2b88cb91d21c235958d50d33d8fa176ad9", + "amount": 1000000000 }, { - "address": "8b243551a78f5380d6ba5b1e84fee34b23f6e757", - "publicKey": "a329a705dab85db2fd950cef9ffd87e27ff4b91b929d5ab26e6efb40b1b3b45e74f7d8162822c49b9909893e6461cc8d", - "committees": [2], - "netAddress": "tcp://uem44.com", - "stakedAmount": 1, - "output": "b70bd2f4a87a43597c9c78d65dc3192090fdaa6f" + "address": "f68e28dca6f7aa0a8fc2e2eb9e16a428e6e421c8", + "amount": 1000000000 }, { - "address": "fc5cdb5c0b6a6df41b92976bbdf2b6832855446f", - "publicKey": "b17d4eb3938957e710bacc9f09d2a9aa79a568fcdf1f8fc565bdb5de3f334295e929e4b086b9c8e9610654155fb0452b", - "committees": [2], - "netAddress": "tcp://canopycoin.xyz", - "stakedAmount": 1, - "output": "a59917b6d045327d4a39736fea81b72e1891692e" + "address": "2b5265ee258fb73ba8d186e9585190e1daa93c05", + "amount": 1000000000 }, { - "address": "4e2ce94661e2e3fd3af02e21898803c4d74e84ba", - "publicKey": "ab4fe218bb09a27908c6181fc799b8371d895f13173fed5b924af60235a548cd882ba97f911c08d9bda34c46a7dab359", - "committees": [2], - "netAddress": "tcp://cryptoicp.com", - "stakedAmount": 1, - "output": "bc01362a7bd2613a3786ce32007452fd51f2bf1b" + "address": "5132ff6e85b30bd11dc80c9d74f4375c43440bed", + "amount": 1000000000 }, { - "address": "33e14ef6b87fb688b829c5e29618bb549dc7b4cd", - "publicKey": "b346ad1f1809adc64d4a06e5be4d9960a018faada129d659623fd97846d5127de550218929ec9de4af9d9cbd1ec52d46", - "committees": [2], - "netAddress": "tcp://lava-9.com", - "stakedAmount": 1, - "output": "b587ddd8b58134c61ec52e5b1e88a27a5e07be82" + "address": "ef525b1faa2e9b670b38c1b6f2d011275f6be6a1", + "amount": 1000000000 + } + ], + "nonSigners": null, + "validators": [ + { + "address": "26ee9f7c00343389a61e3a7d7bb46be1dc025968", + "publicKey": "97a7432a31f9a2de939cd9ec1f252650ccaec3a46be90570483ac6ed9d9697c0e72fcb4adbd6065c5234c32c19c0addd", + "committees": [ + 1, + 2 + ], + "netAddress": "tcp://node1", + "stakedAmount": 1000000000, + "output": "26ee9f7c00343389a61e3a7d7bb46be1dc025968", + "compound": true }, { - "address": "b9c6c2dfa9d049e480c8cec9c29463abf078a594", - "publicKey": "9174b24ba27fe8a0f8616bf1a382d81428ef8a94b7ff70916bb9b266c9070bd848e49a0c33a1c17553416c949ea3409a", - "committees": [2], - "netAddress": "tcp://cleanmarro.com", - "stakedAmount": 1, - "output": "8f5633ac35fc17fe113b8ecaa2060289607c0352" + "address": "26ee9f7c00343389a61e3a7d7bb46be1dc025968", + "publicKey": "97a7432a31f9a2de939cd9ec1f252650ccaec3a46be90570483ac6ed9d9697c0e72fcb4adbd6065c5234c32c19c0addd", + "committees": [ + 2 + ], + "netAddress": "tcp://node2", + "stakedAmount": 1000000000, + "output": "26ee9f7c00343389a61e3a7d7bb46be1dc025968", + "compound": true } ], "params": { "consensus": { "blockSize": 1000000, "protocolVersion": "1/0", + "retired": 0, "rootChainID": 1 }, - "validator": { - "unstakingBlocks": 30240, - "maxPauseBlocks": 30240, - "doubleSignSlashPercentage": 10, - "nonSignSlashPercentage": 1, - "maxNonSign": 60, - "nonSignWindow": 100, - "maxCommittees": 16, - "maxCommitteeSize": 100, - "earlyWithdrawalPenalty": 0, - "delegateUnstakingBlocks": 12960, - "minimumOrderSize": 1000000000, - "stakePercentForSubsidizedCommittee": 33, - "maxSlashPerCommittee": 15, - "delegateRewardPercentage": 10, - "buyDeadlineBlocks": 60, - "lockOrderFeeMultiplier": 2 - }, "fee": { - "sendFee": 10000, - "stakeFee": 10000, - "editStakeFee": 10000, - "unstakeFee": 10000, - "pauseFee": 10000, - "unpauseFee": 10000, - "changeParameterFee": 10000, - "daoTransferFee": 10000, "certificateResultsFee": 0, - "subsidyFee": 10000, + "changeParameterFee": 10000, "createOrderFee": 10000, + "daoTransferFee": 10000, + "deleteOrderFee": 10000, "editOrderFee": 10000, - "deleteOrderFee": 10000 + "editStakeFee": 10000, + "pauseFee": 10000, + "sendFee": 10000, + "stakeFee": 10000, + "subsidyFee": 10000, + "unpauseFee": 10000, + "unstakeFee": 10000 }, "governance": { "daoRewardPercentage": 5 + }, + "validator": { + "buyDeadlineBlocks": 60, + "delegateRewardPercentage": 10, + "delegateUnstakingBlocks": 12960, + "doubleSignSlashPercentage": 10, + "earlyWithdrawalPenalty": 0, + "lockOrderFeeMultiplier": 2, + "maxCommitteeSize": 100, + "maxCommittees": 16, + "maxNonSign": 60, + "maxPauseBlocks": 4380, + "maxSlashPerCommittee": 15, + "minimumOrderSize": 1000, + "nonSignSlashPercentage": 1, + "nonSignWindow": 100, + "stakePercentForSubsidizedCommittee": 33, + "unstakingBlocks": 2 } } } diff --git a/docker_image/Dockerfile b/docker_image/Dockerfile index c9fa89d..a772027 100644 --- a/docker_image/Dockerfile +++ b/docker_image/Dockerfile @@ -1,60 +1,23 @@ -FROM node:18-alpine AS builder +FROM golang:1.23.9-alpine AS builder -ARG WALLET_DIR -ARG EXPLORER_DIR -ARG BRANCH='latest' -ARG CLI_DIR -ARG BUILD_PATH=cmd/cli -ARG GO_BIN_DIR -ARG BUILD_LOCAL=False -ARG BIN_PATH=/bin/cli +RUN apk update && apk add --no-cache make bash nodejs npm git + +ARG explorer_base_path +ARG wallet_base_path -# downloads git and clones selected version -RUN apk add --no-cache git ca-certificates alpine-sdk WORKDIR /go/src/github.com/canopy-network/canopy -RUN echo "Building from BRANCH=${BRANCH}" && \ - if [ "$BRANCH" = "latest" ]; then \ - echo "Fetching latest tag..."; \ - git clone https://github.com/canopy-network/canopy.git . && \ - LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`) && \ - echo "Checking out tag $LATEST_TAG" && \ - git checkout $LATEST_TAG; \ - else \ - echo "Cloning branch $BRANCH" && \ - git clone -b "$BRANCH" https://github.com/canopy-network/canopy.git .; \ - fi -# copy golang -COPY --from=golang:1.23.9-alpine /usr/local/go/ /usr/local/go/ -ENV PATH="/usr/local/go/bin:${PATH}" -RUN go version -# Builds -RUN apk update && apk add --no-cache make bash nodejs npm -RUN make build/wallet -RUN make build/explorer -# Builds auto-update CLI -RUN CGO_ENABLED=0 GOOS=linux go build -a -o bin ./auto-update/. +# Clone the eth-oracle branch +RUN git clone -b eth-oracle https://github.com/canopy-network/canopy.git . -# Only build if the file at ${BIN_PATH} doesn't already exist -RUN if [ ! -f "${BIN_PATH}" ]; then \ - echo "File ${BIN_PATH} not found. Building it..."; \ - CGO_ENABLED=0 GOOS=linux go build -a -o "${BIN_PATH}" ./cmd/main/...; \ - else \ - echo "File ${BIN_PATH} already exists. Skipping build."; \ - fi +ENV EXPLORER_BASE_PATH=${EXPLORER_BASE_PATH} +ENV WALLET_BASE_PATH=${WALLET_BASE_PATH} + +RUN make build/wallet +RUN make build/explorer +RUN go build -a -o bin ./cmd/main/... FROM alpine:3.19 WORKDIR /app - -# Coying for command -COPY --from=builder /go/src/github.com/canopy-network/canopy/bin ./canopy -# Copying cli for auto update -COPY --from=builder /bin/cli /bin/cli -# Copying entrypoint for persisting update cli -COPY entrypoint.sh /app/entrypoint.sh - -RUN chmod +x /bin/cli -RUN chmod +x /app/canopy -RUN chmod +x /app/entrypoint.sh - -ENTRYPOINT ["/app/entrypoint.sh"] +COPY --from=builder /go/src/github.com/canopy-network/canopy/bin ./ +ENTRYPOINT ["/app/bin"] diff --git a/docker_image/e2e.Dockerfile b/docker_image/e2e.Dockerfile new file mode 100644 index 0000000..2fed739 --- /dev/null +++ b/docker_image/e2e.Dockerfile @@ -0,0 +1,24 @@ +FROM golang:1.23.9-alpine as builder + +RUN apk update && apk add --no-cache make bash nodejs npm git + +ARG explorer_base_path +ARG wallet_base_path + +env explorer_base_path=${explorer_base_path} +env wallet_base_path=${wallet_base_path} + +# Clone directly to the desired location +RUN git clone -b eth-oracle https://github.com/canopy-network/canopy.git /go/src/github.com/canopy-network/canopy + +workdir /go/src/github.com/canopy-network/canopy +run make build/wallet +run make build/explorer + +WORKDIR /go/src/github.com/canopy-network/canopy/cmd/rpc/oracle/testing +RUN go build . + +FROM alpine:3.19 +WORKDIR /app +COPY --from=builder /go/src/github.com/canopy-network/canopy/cmd/rpc/oracle/testing/testing ./bin +ENTRYPOINT ["/app/bin"] diff --git a/docker_image/entrypoint.sh b/docker_image/entrypoint.sh index 710de72..db951f9 100755 --- a/docker_image/entrypoint.sh +++ b/docker_image/entrypoint.sh @@ -2,11 +2,11 @@ # if BIN_PATH its defined we make a link to it from its volume to our system if [[ -z "${BIN_PATH}" ]]; then - echo "using existing BIN_PATH $BIN_PATH" -# if BIN_PATH it's no provided we sue '/bin/cli' + echo "BIN_PATH not provided using /bin/cli as default" + export BIN_PATH="/bin/cli" else - echo "BIN_PATH not provided using /bin/cli as default" - export BIN_PATH="/bin/cli" + echo "using existing BIN_PATH $BIN_PATH" + # if BIN_PATH it's no provided we sue '/bin/cli' fi # Persisting current version @@ -16,7 +16,7 @@ if [ -f "/root/.canopy/cli" ]; then else echo "Persisting build version for current cli" mv $BIN_PATH /root/.canopy/cli + ln -s /root/.canopy/cli $BIN_PATH fi -ln -s /root/.canopy/cli $BIN_PATH exec /app/canopy "$@" diff --git a/monitoring-stack/anvil/anvil.sh b/monitoring-stack/anvil/anvil.sh new file mode 100755 index 0000000..5f65ded --- /dev/null +++ b/monitoring-stack/anvil/anvil.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +ANVIL_URL="http://anvil:8545" + +./init_usdc.sh + +./mint_usdc.sh diff --git a/monitoring-stack/anvil/balances.sh b/monitoring-stack/anvil/balances.sh new file mode 100755 index 0000000..5ea5b83 --- /dev/null +++ b/monitoring-stack/anvil/balances.sh @@ -0,0 +1,73 @@ +#!/usr/bin/env bash + +source env/anvil.env +source env/usdc_contract.env +source env/testing.env + +# Function to get USDC balance for an account +get_usdc_balance() { + account=$1 + balance=$(cast call $USDC_CONTRACT "balanceOf(address)(uint256)" $account --rpc-url http://localhost:8545 2>&1) + if [ $? -eq 0 ]; then + echo "$account: $balance" + else + echo "Error getting USDC balance for $account" + fi +} + +# Function to get ETH balance for an account +get_eth_balance() { + account=$1 + balance=$(cast balance $account --rpc-url http://localhost:8545 2>&1) + if [ $? -eq 0 ]; then + echo "$account: $balance" + else + echo "Error getting ETH balance for $account" + fi +} + +# Function to get all CNPY balances +get_cnpy_balances() { + canopy_output=$(canopy query accounts 2>&1) + canopy_exit_code=$? + if [ $canopy_exit_code -eq 0 ]; then + local jq_output=$(echo "$canopy_output" | jq -r '.results[] | "\(.address): \(.amount)"' 2>&1) + local jq_exit_code=$? + if [ $jq_exit_code -eq 0 ]; then + echo "$jq_output" + else + echo "Error parsing CNPY balance data: $jq_output" + fi + else + echo "Error getting CNPY balances" + fi +} + +# Display balances +echo "Ethereum USDC Balances:" +for i in {0..2}; do + account_var="ACCOUNT_$i" + account=${!account_var} + if [ -n "$account" ]; then + get_usdc_balance "$account" + else + echo "Warning: Account $i not found in environment" + fi +done +echo + +echo "Ethereum ETH Balances:" +for i in {0..2}; do + account_var="ACCOUNT_$i" + account=${!account_var} + if [ -n "$account" ]; then + get_eth_balance "$account" + else + echo "Warning: Account $i not found in environment" + fi +done +echo + +echo "CNPY Balances:" +get_cnpy_balances +echo diff --git a/monitoring-stack/anvil/cache/solidity-files-cache.json b/monitoring-stack/anvil/cache/solidity-files-cache.json new file mode 100644 index 0000000..1a56b1a --- /dev/null +++ b/monitoring-stack/anvil/cache/solidity-files-cache.json @@ -0,0 +1 @@ +{"_format":"","paths":{"artifacts":"out","build_infos":"out/build-info","sources":"contracts","tests":"test","scripts":"script","libraries":["lib"]},"files":{"contracts/USDC.sol":{"lastModificationDate":1752574865334,"contentHash":"0f2edb4910dd4c4ad4ded281c9dbad4e","interfaceReprHash":null,"sourceName":"contracts/USDC.sol","imports":[],"versionRequirement":"^0.8.0","artifacts":{"USDC":{"0.8.29":{"default":{"path":"USDC.sol/USDC.json","build_id":"c67a86e543c3556edd8042baf8f6dee3"}}}},"seenByCompiler":true}},"builds":["c67a86e543c3556edd8042baf8f6dee3"],"profiles":{"default":{"solc":{"optimizer":{"enabled":false,"runs":200},"metadata":{"useLiteralContent":false,"bytecodeHash":"ipfs","appendCBOR":true},"outputSelection":{"*":{"*":["abi","evm.bytecode.object","evm.bytecode.sourceMap","evm.bytecode.linkReferences","evm.deployedBytecode.object","evm.deployedBytecode.sourceMap","evm.deployedBytecode.linkReferences","evm.deployedBytecode.immutableReferences","evm.methodIdentifiers","metadata"]}},"evmVersion":"cancun","viaIR":false,"libraries":{}},"vyper":{"evmVersion":"cancun","outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode"]}}}}},"preprocessed":false,"mocks":[]} \ No newline at end of file diff --git a/monitoring-stack/anvil/contracts/USDC.sol b/monitoring-stack/anvil/contracts/USDC.sol new file mode 100644 index 0000000..4313e75 --- /dev/null +++ b/monitoring-stack/anvil/contracts/USDC.sol @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +contract USDC { + string public name = "USDC Coin"; + string public symbol = "USDC"; + uint8 public decimals = 6; + uint256 public totalSupply; + mapping(address => uint256) public balanceOf; + mapping(address => mapping(address => uint256)) public allowance; + + event Transfer(address indexed from, address indexed to, uint256 value); + event Approval(address indexed owner, address indexed spender, uint256 value); + + function transfer(address to, uint256 value) public returns (bool success) { + require(balanceOf[msg.sender] >= value, "Insufficient balance"); + balanceOf[msg.sender] -= value; + balanceOf[to] += value; + emit Transfer(msg.sender, to, value); + return true; + } + + function approve(address spender, uint256 value) public returns (bool success) { + allowance[msg.sender][spender] = value; + emit Approval(msg.sender, spender, value); + return true; + } + + function transferFrom(address from, address to, uint256 value) public returns (bool success) { + require(balanceOf[from] >= value, "Insufficient balance"); + require(allowance[from][msg.sender] >= value, "Insufficient allowance"); + balanceOf[from] -= value; + balanceOf[to] += value; + allowance[from][msg.sender] -= value; + emit Transfer(from, to, value); + return true; + } + + function mint(address to, uint256 value) public returns (bool success) { + balanceOf[to] += value; + totalSupply += value; + emit Transfer(address(0), to, value); + return true; + } +} diff --git a/monitoring-stack/anvil/env/anvil.env b/monitoring-stack/anvil/env/anvil.env new file mode 100644 index 0000000..cd6c9c3 --- /dev/null +++ b/monitoring-stack/anvil/env/anvil.env @@ -0,0 +1,23 @@ +# Accounts +export ACCOUNT_0="0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" +export ACCOUNT_1="0x70997970C51812dc3A010C7d01b50e0d17dc79C8" +export ACCOUNT_2="0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC" +export ACCOUNT_3="0x90F79bf6EB2c4f870365E785982E1f101E93b906" +export ACCOUNT_4="0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65" +export ACCOUNT_5="0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc" +export ACCOUNT_6="0x976EA74026E726554dB657fA54763abd0C3a0aa9" +export ACCOUNT_7="0x14dC79964da2C08b23698B3D3cc7Ca32193d9955" +export ACCOUNT_8="0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f" +export ACCOUNT_9="0xa0Ee7A142d267C1f36714E4a8F75612F20a79720" + +# Private Keys +export PRIVATE_KEY_0="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" +export PRIVATE_KEY_1="0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d" +export PRIVATE_KEY_2="0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a" +export PRIVATE_KEY_3="0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6" +export PRIVATE_KEY_4="0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a" +export PRIVATE_KEY_5="0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba" +export PRIVATE_KEY_6="0x92db14e403b83dfe3df233f83dfa3a0d7096f21ca9b0d6d6b8d88b2b4ec1564e" +export PRIVATE_KEY_7="0x4bbbf85ce3377467afe5d46f804f221813b2bb87f24d81f60f1fcdbf7cbf4356" +export PRIVATE_KEY_8="0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97" +export PRIVATE_KEY_9="0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6" diff --git a/monitoring-stack/anvil/env/testing.env b/monitoring-stack/anvil/env/testing.env new file mode 100644 index 0000000..3f61864 --- /dev/null +++ b/monitoring-stack/anvil/env/testing.env @@ -0,0 +1,3 @@ +export ETH_RPC_URL="http://localhost:8545" +source env/anvil.env +source env/usdc_contract.env diff --git a/monitoring-stack/anvil/env/usdc_contract.env b/monitoring-stack/anvil/env/usdc_contract.env new file mode 100644 index 0000000..c7f6a77 --- /dev/null +++ b/monitoring-stack/anvil/env/usdc_contract.env @@ -0,0 +1 @@ +export USDC_CONTRACT=0x5FbDB2315678afecb367f032d93F642f64180aa3 diff --git a/monitoring-stack/anvil/init.sh b/monitoring-stack/anvil/init.sh new file mode 100755 index 0000000..d8bcc42 --- /dev/null +++ b/monitoring-stack/anvil/init.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +ANVIL_URL="http://anvil:8545" + +# Run the initialization scripts +echo "Deploying USDC ERC20 contract..." +./init_usdc.sh + +echo "Minting USDC for test accounts..." +./mint_usdc.sh diff --git a/monitoring-stack/anvil/init_usdc.sh b/monitoring-stack/anvil/init_usdc.sh new file mode 100755 index 0000000..4b2754a --- /dev/null +++ b/monitoring-stack/anvil/init_usdc.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +# Variables +ANVIL_URL="http://anvil:8545" +PRIVATE_KEY="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" +CONTRACT_PATH="contracts/USDC.sol" +CONTRACT_NAME="USDC" +GAS_LIMIT="3000000" +ENV_FILE="env/usdc_contract.env" + +# Deploy USDC contract +echo "Deploying USDC contract..." +DEPLOYMENT_OUTPUT=$(forge create $CONTRACT_PATH:$CONTRACT_NAME \ + --private-key $PRIVATE_KEY \ + --rpc-url $ANVIL_URL \ + --gas-limit $GAS_LIMIT \ + --broadcast) + +if [ $? -ne 0 ]; then + echo "Error: Contract deployment failed" + exit 1 +fi + +# Extract contract address from deployment output +USDC_CONTRACT=$(echo "$DEPLOYMENT_OUTPUT" | grep "Deployed to:" | awk '{print $3}') + +if [ -z "$USDC_CONTRACT" ]; then + echo "Error: Could not extract contract address from deployment output" + exit 1 +fi + +echo "USDC contract deployed at: $USDC_CONTRACT" + +pwd +# Save contract address to environment file +echo "export USDC_CONTRACT=$USDC_CONTRACT" > $ENV_FILE + +echo "Contract address saved to $ENV_FILE" +echo "Deployment completed successfully" diff --git a/monitoring-stack/anvil/mint_usdc.sh b/monitoring-stack/anvil/mint_usdc.sh new file mode 100755 index 0000000..dd86c6d --- /dev/null +++ b/monitoring-stack/anvil/mint_usdc.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash +source env/usdc_contract.env +source env/anvil.env + +echo "Using USDC_CONTRACT: $USDC_CONTRACT" + +mint() { + local contract="$1" + local account="$2" + local amount="$3" + local private_key="$4" + local rpc_url="${5:-http://anvil:8545}" + + # Execute the cast send command and capture both output and exit code + output=$(cast send "$contract" "mint(address,uint256)" "$account" "$amount" --private-key "$private_key" --rpc-url "$rpc_url" --json 2>&1) + exit_code=$? + + # Check if the command was successful + if [ $exit_code -eq 0 ]; then + echo "Minted $amount to $account" + + # Parse transaction hash from JSON output if needed + tx_hash=$(echo "$output" | jq -r '.transactionHash // empty' 2>/dev/null) + if [ -n "$tx_hash" ]; then + echo "Transaction hash: $tx_hash" + fi + else + echo "Transaction failed with exit code: $exit_code" + echo "Error output: $output" + return $exit_code + fi +} + +# Define the mint amount (1 trillion units with 6 decimals = 1 million USDC) +MINT_AMOUNT="1000000000000" + +echo "Minting USDC for all Anvil accounts..." + +# Mint for accounts +for i in {0..9}; do + account_var="ACCOUNT_$i" + private_key_var="PRIVATE_KEY_$i" + + # Get the account and private key values + account=${!account_var} + private_key=${!private_key_var} + + if [ -n "$account" ] && [ -n "$private_key" ]; then + echo "Minting $MINT_AMOUNT USDC for account $i: $account" + mint "$USDC_CONTRACT" "$account" "$MINT_AMOUNT" "$private_key" + echo "---" + else + echo "Warning: Account $i or its private key not found in environment" + fi +done + +echo "Completed minting USDC for all accounts." diff --git a/monitoring-stack/anvil/monitor.sh b/monitoring-stack/anvil/monitor.sh new file mode 100755 index 0000000..021f57b --- /dev/null +++ b/monitoring-stack/anvil/monitor.sh @@ -0,0 +1,86 @@ +#!/usr/bin/env bash +# Array to store which scripts to run +scripts_to_run=() + +# Function to run balances script +run_balances() { + if [ -f "scripts/balances.sh" ]; then + bash scripts/balances.sh + fi +} + +# Function to run canopy orders script +run_orders() { + if [ -f "scripts/orders.sh" ]; then + bash scripts/orders.sh + fi +} + +# Function to run store script +run_store() { + if [ -f "scripts/store.sh" ]; then + bash scripts/store.sh /home/enielson/.canopy/oracle/orders + fi +} + +# If no parameters provided, run all scripts +if [ $# -eq 0 ]; then + scripts_to_run=("balances" "orders" "store") +else + # Loop through command line parameters + for param in "$@"; do + case $param in + "balances"|"1") + scripts_to_run+=("balances") + ;; + "orders"|"2") + scripts_to_run+=("orders") + ;; + "store"|"3") + scripts_to_run+=("store") + ;; + esac + done +fi + +# Main loop to run scripts at regular intervals +while true; do + printf '\033[2J\033[H' + balances_output="" + orders_output="" + store_output="" + for script in "${scripts_to_run[@]}"; do + case $script in + "balances") + balances_output=$(run_balances) + ;; + "orders") + orders_output=$(run_orders) + ;; + "store") + store_output=$(run_store) + ;; + esac + done + + # Print all outputs at once + for script in "${scripts_to_run[@]}"; do + case $script in + "balances") + echo "$balances_output" + echo + ;; + "orders") + echo "$orders_output" + echo + ;; + "store") + echo "$store_output" + echo + ;; + esac + done + + # Sleep for 60 seconds before next iteration + sleep 5 +done diff --git a/monitoring-stack/anvil/orders.sh b/monitoring-stack/anvil/orders.sh new file mode 100755 index 0000000..25e4fda --- /dev/null +++ b/monitoring-stack/anvil/orders.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +echo "Canopy Order Book:" + +canopy query orders | jq -r ' + def green: "\u001b[32m"; + def reset: "\u001b[0m"; + .[] | + .orders[] | + "ID: " + green + "\(.id) " + reset + + "CNPY: \(.amountForSale) " + + "\tUSDC: \(.requestedAmount)\n" + + "\tBuyer USDC: \(.buyerSendAddress) CNPY: \(.buyerReceiveAddress)\n" + + "\tSeller USDC: \(.sellerReceiveAddress) CNPY: \(.sellersSendAddress)\n" + + "\tData: \(.data)\n" +' +echo diff --git a/monitoring-stack/anvil/out/USDC.sol/USDC.json b/monitoring-stack/anvil/out/USDC.sol/USDC.json new file mode 100644 index 0000000..a0ed239 --- /dev/null +++ b/monitoring-stack/anvil/out/USDC.sol/USDC.json @@ -0,0 +1 @@ +{"abi":[{"type":"function","name":"allowance","inputs":[{"name":"","type":"address","internalType":"address"},{"name":"","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"approve","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"balanceOf","inputs":[{"name":"","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"decimals","inputs":[],"outputs":[{"name":"","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"type":"function","name":"mint","inputs":[{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"name","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"symbol","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"type":"function","name":"transfer","inputs":[{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"function","name":"transferFrom","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"success","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"type":"event","name":"Approval","inputs":[{"name":"owner","type":"address","indexed":true,"internalType":"address"},{"name":"spender","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false}],"bytecode":{"object":"0x60806040526040518060400160405280600981526020017f5553444320436f696e00000000000000000000000000000000000000000000008152505f908161004791906102f6565b506040518060400160405280600481526020017f55534443000000000000000000000000000000000000000000000000000000008152506001908161008c91906102f6565b50600660025f6101000a81548160ff021916908360ff1602179055503480156100b3575f5ffd5b506103c5565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061013457607f821691505b602082108103610147576101466100f0565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026101a97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261016e565b6101b3868361016e565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f6101f76101f26101ed846101cb565b6101d4565b6101cb565b9050919050565b5f819050919050565b610210836101dd565b61022461021c826101fe565b84845461017a565b825550505050565b5f5f905090565b61023b61022c565b610246818484610207565b505050565b5b818110156102695761025e5f82610233565b60018101905061024c565b5050565b601f8211156102ae5761027f8161014d565b6102888461015f565b81016020851015610297578190505b6102ab6102a38561015f565b83018261024b565b50505b505050565b5f82821c905092915050565b5f6102ce5f19846008026102b3565b1980831691505092915050565b5f6102e683836102bf565b9150826002028217905092915050565b6102ff826100b9565b67ffffffffffffffff811115610318576103176100c3565b5b610322825461011d565b61032d82828561026d565b5f60209050601f83116001811461035e575f841561034c578287015190505b61035685826102db565b8655506103bd565b601f19841661036c8661014d565b5f5b828110156103935784890151825560018201915060208501945060208101905061036e565b868310156103b057848901516103ac601f8916826102bf565b8355505b6001600288020188555050505b505050505050565b610e77806103d25f395ff3fe608060405234801561000f575f5ffd5b506004361061009c575f3560e01c806340c10f191161006457806340c10f191461015a57806370a082311461018a57806395d89b41146101ba578063a9059cbb146101d8578063dd62ed3e146102085761009c565b806306fdde03146100a0578063095ea7b3146100be57806318160ddd146100ee57806323b872dd1461010c578063313ce5671461013c575b5f5ffd5b6100a8610238565b6040516100b59190610a4a565b60405180910390f35b6100d860048036038101906100d39190610afb565b6102c3565b6040516100e59190610b53565b60405180910390f35b6100f66103b0565b6040516101039190610b7b565b60405180910390f35b61012660048036038101906101219190610b94565b6103b6565b6040516101339190610b53565b60405180910390f35b610144610696565b6040516101519190610bff565b60405180910390f35b610174600480360381019061016f9190610afb565b6106a8565b6040516101819190610b53565b60405180910390f35b6101a4600480360381019061019f9190610c18565b610783565b6040516101b19190610b7b565b60405180910390f35b6101c2610798565b6040516101cf9190610a4a565b60405180910390f35b6101f260048036038101906101ed9190610afb565b610824565b6040516101ff9190610b53565b60405180910390f35b610222600480360381019061021d9190610c43565b6109ba565b60405161022f9190610b7b565b60405180910390f35b5f805461024490610cae565b80601f016020809104026020016040519081016040528092919081815260200182805461027090610cae565b80156102bb5780601f10610292576101008083540402835291602001916102bb565b820191905f5260205f20905b81548152906001019060200180831161029e57829003601f168201915b505050505081565b5f8160055f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161039e9190610b7b565b60405180910390a36001905092915050565b60035481565b5f8160045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20541015610437576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161042e90610d28565b60405180910390fd5b8160055f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205410156104f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104e990610d90565b60405180910390fd5b8160045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461053e9190610ddb565b925050819055508160045f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546105919190610e0e565b925050819055508160055f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461061f9190610ddb565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106839190610b7b565b60405180910390a3600190509392505050565b60025f9054906101000a900460ff1681565b5f8160045f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546106f59190610e0e565b925050819055508160035f82825461070d9190610e0e565b925050819055508273ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516107719190610b7b565b60405180910390a36001905092915050565b6004602052805f5260405f205f915090505481565b600180546107a590610cae565b80601f01602080910402602001604051908101604052809291908181526020018280546107d190610cae565b801561081c5780601f106107f35761010080835404028352916020019161081c565b820191905f5260205f20905b8154815290600101906020018083116107ff57829003601f168201915b505050505081565b5f8160045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205410156108a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089c90610d28565b60405180910390fd5b8160045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546108f19190610ddb565b925050819055508160045f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546109449190610e0e565b925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516109a89190610b7b565b60405180910390a36001905092915050565b6005602052815f5260405f20602052805f5260405f205f91509150505481565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f610a1c826109da565b610a2681856109e4565b9350610a368185602086016109f4565b610a3f81610a02565b840191505092915050565b5f6020820190508181035f830152610a628184610a12565b905092915050565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610a9782610a6e565b9050919050565b610aa781610a8d565b8114610ab1575f5ffd5b50565b5f81359050610ac281610a9e565b92915050565b5f819050919050565b610ada81610ac8565b8114610ae4575f5ffd5b50565b5f81359050610af581610ad1565b92915050565b5f5f60408385031215610b1157610b10610a6a565b5b5f610b1e85828601610ab4565b9250506020610b2f85828601610ae7565b9150509250929050565b5f8115159050919050565b610b4d81610b39565b82525050565b5f602082019050610b665f830184610b44565b92915050565b610b7581610ac8565b82525050565b5f602082019050610b8e5f830184610b6c565b92915050565b5f5f5f60608486031215610bab57610baa610a6a565b5b5f610bb886828701610ab4565b9350506020610bc986828701610ab4565b9250506040610bda86828701610ae7565b9150509250925092565b5f60ff82169050919050565b610bf981610be4565b82525050565b5f602082019050610c125f830184610bf0565b92915050565b5f60208284031215610c2d57610c2c610a6a565b5b5f610c3a84828501610ab4565b91505092915050565b5f5f60408385031215610c5957610c58610a6a565b5b5f610c6685828601610ab4565b9250506020610c7785828601610ab4565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680610cc557607f821691505b602082108103610cd857610cd7610c81565b5b50919050565b7f496e73756666696369656e742062616c616e63650000000000000000000000005f82015250565b5f610d126014836109e4565b9150610d1d82610cde565b602082019050919050565b5f6020820190508181035f830152610d3f81610d06565b9050919050565b7f496e73756666696369656e7420616c6c6f77616e6365000000000000000000005f82015250565b5f610d7a6016836109e4565b9150610d8582610d46565b602082019050919050565b5f6020820190508181035f830152610da781610d6e565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f610de582610ac8565b9150610df083610ac8565b9250828203905081811115610e0857610e07610dae565b5b92915050565b5f610e1882610ac8565b9150610e2383610ac8565b9250828201905080821115610e3b57610e3a610dae565b5b9291505056fea2646970667358221220ae6779f77ce94ba54b37e13903c2a715440a3ad23d250228941a1c42d3446c1164736f6c634300081d0033","sourceMap":"57:1586:0:-:0;;;77:32;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;115:29;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;174:1;150:25;;;;;;;;;;;;;;;;;;;;57:1586;;;;;;;;;;;;7:99:1;59:6;93:5;87:12;77:22;;7:99;;;:::o;112:180::-;160:77;157:1;150:88;257:4;254:1;247:15;281:4;278:1;271:15;298:180;346:77;343:1;336:88;443:4;440:1;433:15;467:4;464:1;457:15;484:320;528:6;565:1;559:4;555:12;545:22;;612:1;606:4;602:12;633:18;623:81;;689:4;681:6;677:17;667:27;;623:81;751:2;743:6;740:14;720:18;717:38;714:84;;770:18;;:::i;:::-;714:84;535:269;484:320;;;:::o;810:141::-;859:4;882:3;874:11;;905:3;902:1;895:14;939:4;936:1;926:18;918:26;;810:141;;;:::o;957:93::-;994:6;1041:2;1036;1029:5;1025:14;1021:23;1011:33;;957:93;;;:::o;1056:107::-;1100:8;1150:5;1144:4;1140:16;1119:37;;1056:107;;;;:::o;1169:393::-;1238:6;1288:1;1276:10;1272:18;1311:97;1341:66;1330:9;1311:97;:::i;:::-;1429:39;1459:8;1448:9;1429:39;:::i;:::-;1417:51;;1501:4;1497:9;1490:5;1486:21;1477:30;;1550:4;1540:8;1536:19;1529:5;1526:30;1516:40;;1245:317;;1169:393;;;;;:::o;1568:77::-;1605:7;1634:5;1623:16;;1568:77;;;:::o;1651:60::-;1679:3;1700:5;1693:12;;1651:60;;;:::o;1717:142::-;1767:9;1800:53;1818:34;1827:24;1845:5;1827:24;:::i;:::-;1818:34;:::i;:::-;1800:53;:::i;:::-;1787:66;;1717:142;;;:::o;1865:75::-;1908:3;1929:5;1922:12;;1865:75;;;:::o;1946:269::-;2056:39;2087:7;2056:39;:::i;:::-;2117:91;2166:41;2190:16;2166:41;:::i;:::-;2158:6;2151:4;2145:11;2117:91;:::i;:::-;2111:4;2104:105;2022:193;1946:269;;;:::o;2221:73::-;2266:3;2287:1;2280:8;;2221:73;:::o;2300:189::-;2377:32;;:::i;:::-;2418:65;2476:6;2468;2462:4;2418:65;:::i;:::-;2353:136;2300:189;;:::o;2495:186::-;2555:120;2572:3;2565:5;2562:14;2555:120;;;2626:39;2663:1;2656:5;2626:39;:::i;:::-;2599:1;2592:5;2588:13;2579:22;;2555:120;;;2495:186;;:::o;2687:543::-;2788:2;2783:3;2780:11;2777:446;;;2822:38;2854:5;2822:38;:::i;:::-;2906:29;2924:10;2906:29;:::i;:::-;2896:8;2892:44;3089:2;3077:10;3074:18;3071:49;;;3110:8;3095:23;;3071:49;3133:80;3189:22;3207:3;3189:22;:::i;:::-;3179:8;3175:37;3162:11;3133:80;:::i;:::-;2792:431;;2777:446;2687:543;;;:::o;3236:117::-;3290:8;3340:5;3334:4;3330:16;3309:37;;3236:117;;;;:::o;3359:169::-;3403:6;3436:51;3484:1;3480:6;3472:5;3469:1;3465:13;3436:51;:::i;:::-;3432:56;3517:4;3511;3507:15;3497:25;;3410:118;3359:169;;;;:::o;3533:295::-;3609:4;3755:29;3780:3;3774:4;3755:29;:::i;:::-;3747:37;;3817:3;3814:1;3810:11;3804:4;3801:21;3793:29;;3533:295;;;;:::o;3833:1395::-;3950:37;3983:3;3950:37;:::i;:::-;4052:18;4044:6;4041:30;4038:56;;;4074:18;;:::i;:::-;4038:56;4118:38;4150:4;4144:11;4118:38;:::i;:::-;4203:67;4263:6;4255;4249:4;4203:67;:::i;:::-;4297:1;4321:4;4308:17;;4353:2;4345:6;4342:14;4370:1;4365:618;;;;5027:1;5044:6;5041:77;;;5093:9;5088:3;5084:19;5078:26;5069:35;;5041:77;5144:67;5204:6;5197:5;5144:67;:::i;:::-;5138:4;5131:81;5000:222;4335:887;;4365:618;4417:4;4413:9;4405:6;4401:22;4451:37;4483:4;4451:37;:::i;:::-;4510:1;4524:208;4538:7;4535:1;4532:14;4524:208;;;4617:9;4612:3;4608:19;4602:26;4594:6;4587:42;4668:1;4660:6;4656:14;4646:24;;4715:2;4704:9;4700:18;4687:31;;4561:4;4558:1;4554:12;4549:17;;4524:208;;;4760:6;4751:7;4748:19;4745:179;;;4818:9;4813:3;4809:19;4803:26;4861:48;4903:4;4895:6;4891:17;4880:9;4861:48;:::i;:::-;4853:6;4846:64;4768:156;4745:179;4970:1;4966;4958:6;4954:14;4950:22;4944:4;4937:36;4372:611;;;4335:887;;3925:1303;;;3833:1395;;:::o;57:1586:0:-;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"0x608060405234801561000f575f5ffd5b506004361061009c575f3560e01c806340c10f191161006457806340c10f191461015a57806370a082311461018a57806395d89b41146101ba578063a9059cbb146101d8578063dd62ed3e146102085761009c565b806306fdde03146100a0578063095ea7b3146100be57806318160ddd146100ee57806323b872dd1461010c578063313ce5671461013c575b5f5ffd5b6100a8610238565b6040516100b59190610a4a565b60405180910390f35b6100d860048036038101906100d39190610afb565b6102c3565b6040516100e59190610b53565b60405180910390f35b6100f66103b0565b6040516101039190610b7b565b60405180910390f35b61012660048036038101906101219190610b94565b6103b6565b6040516101339190610b53565b60405180910390f35b610144610696565b6040516101519190610bff565b60405180910390f35b610174600480360381019061016f9190610afb565b6106a8565b6040516101819190610b53565b60405180910390f35b6101a4600480360381019061019f9190610c18565b610783565b6040516101b19190610b7b565b60405180910390f35b6101c2610798565b6040516101cf9190610a4a565b60405180910390f35b6101f260048036038101906101ed9190610afb565b610824565b6040516101ff9190610b53565b60405180910390f35b610222600480360381019061021d9190610c43565b6109ba565b60405161022f9190610b7b565b60405180910390f35b5f805461024490610cae565b80601f016020809104026020016040519081016040528092919081815260200182805461027090610cae565b80156102bb5780601f10610292576101008083540402835291602001916102bb565b820191905f5260205f20905b81548152906001019060200180831161029e57829003601f168201915b505050505081565b5f8160055f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161039e9190610b7b565b60405180910390a36001905092915050565b60035481565b5f8160045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20541015610437576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161042e90610d28565b60405180910390fd5b8160055f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205410156104f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104e990610d90565b60405180910390fd5b8160045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461053e9190610ddb565b925050819055508160045f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546105919190610e0e565b925050819055508160055f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461061f9190610ddb565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516106839190610b7b565b60405180910390a3600190509392505050565b60025f9054906101000a900460ff1681565b5f8160045f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546106f59190610e0e565b925050819055508160035f82825461070d9190610e0e565b925050819055508273ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516107719190610b7b565b60405180910390a36001905092915050565b6004602052805f5260405f205f915090505481565b600180546107a590610cae565b80601f01602080910402602001604051908101604052809291908181526020018280546107d190610cae565b801561081c5780601f106107f35761010080835404028352916020019161081c565b820191905f5260205f20905b8154815290600101906020018083116107ff57829003601f168201915b505050505081565b5f8160045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205410156108a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089c90610d28565b60405180910390fd5b8160045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546108f19190610ddb565b925050819055508160045f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546109449190610e0e565b925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516109a89190610b7b565b60405180910390a36001905092915050565b6005602052815f5260405f20602052805f5260405f205f91509150505481565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f610a1c826109da565b610a2681856109e4565b9350610a368185602086016109f4565b610a3f81610a02565b840191505092915050565b5f6020820190508181035f830152610a628184610a12565b905092915050565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610a9782610a6e565b9050919050565b610aa781610a8d565b8114610ab1575f5ffd5b50565b5f81359050610ac281610a9e565b92915050565b5f819050919050565b610ada81610ac8565b8114610ae4575f5ffd5b50565b5f81359050610af581610ad1565b92915050565b5f5f60408385031215610b1157610b10610a6a565b5b5f610b1e85828601610ab4565b9250506020610b2f85828601610ae7565b9150509250929050565b5f8115159050919050565b610b4d81610b39565b82525050565b5f602082019050610b665f830184610b44565b92915050565b610b7581610ac8565b82525050565b5f602082019050610b8e5f830184610b6c565b92915050565b5f5f5f60608486031215610bab57610baa610a6a565b5b5f610bb886828701610ab4565b9350506020610bc986828701610ab4565b9250506040610bda86828701610ae7565b9150509250925092565b5f60ff82169050919050565b610bf981610be4565b82525050565b5f602082019050610c125f830184610bf0565b92915050565b5f60208284031215610c2d57610c2c610a6a565b5b5f610c3a84828501610ab4565b91505092915050565b5f5f60408385031215610c5957610c58610a6a565b5b5f610c6685828601610ab4565b9250506020610c7785828601610ab4565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680610cc557607f821691505b602082108103610cd857610cd7610c81565b5b50919050565b7f496e73756666696369656e742062616c616e63650000000000000000000000005f82015250565b5f610d126014836109e4565b9150610d1d82610cde565b602082019050919050565b5f6020820190508181035f830152610d3f81610d06565b9050919050565b7f496e73756666696369656e7420616c6c6f77616e6365000000000000000000005f82015250565b5f610d7a6016836109e4565b9150610d8582610d46565b602082019050919050565b5f6020820190508181035f830152610da781610d6e565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f610de582610ac8565b9150610df083610ac8565b9250828203905081811115610e0857610e07610dae565b5b92915050565b5f610e1882610ac8565b9150610e2383610ac8565b9250828201905080821115610e3b57610e3a610dae565b5b9291505056fea2646970667358221220ae6779f77ce94ba54b37e13903c2a715440a3ad23d250228941a1c42d3446c1164736f6c634300081d0033","sourceMap":"57:1586:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;77:32;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;795:206;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;181:26;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1007:421;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;150:25;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1434:207;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;213:44;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;115:29;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;495:294;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;263:64;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;77:32;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;795:206::-;860:12;917:5;884:9;:21;894:10;884:21;;;;;;;;;;;;;;;:30;906:7;884:30;;;;;;;;;;;;;;;:38;;;;958:7;937:36;;946:10;937:36;;;967:5;937:36;;;;;;:::i;:::-;;;;;;;;990:4;983:11;;795:206;;;;:::o;181:26::-;;;;:::o;1007:421::-;1086:12;1137:5;1118:9;:15;1128:4;1118:15;;;;;;;;;;;;;;;;:24;;1110:57;;;;;;;;;;;;:::i;:::-;;;;;;;;;1216:5;1185:9;:15;1195:4;1185:15;;;;;;;;;;;;;;;:27;1201:10;1185:27;;;;;;;;;;;;;;;;:36;;1177:71;;;;;;;;;;;;:::i;:::-;;;;;;;;;1277:5;1258:9;:15;1268:4;1258:15;;;;;;;;;;;;;;;;:24;;;;;;;:::i;:::-;;;;;;;;1309:5;1292:9;:13;1302:2;1292:13;;;;;;;;;;;;;;;;:22;;;;;;;:::i;:::-;;;;;;;;1355:5;1324:9;:15;1334:4;1324:15;;;;;;;;;;;;;;;:27;1340:10;1324:27;;;;;;;;;;;;;;;;:36;;;;;;;:::i;:::-;;;;;;;;1390:2;1375:25;;1384:4;1375:25;;;1394:5;1375:25;;;;;;:::i;:::-;;;;;;;;1417:4;1410:11;;1007:421;;;;;:::o;150:25::-;;;;;;;;;;;;;:::o;1434:207::-;1491:12;1532:5;1515:9;:13;1525:2;1515:13;;;;;;;;;;;;;;;;:22;;;;;;;:::i;:::-;;;;;;;;1562:5;1547:11;;:20;;;;;;;:::i;:::-;;;;;;;;1603:2;1582:31;;1599:1;1582:31;;;1607:5;1582:31;;;;;;:::i;:::-;;;;;;;;1630:4;1623:11;;1434:207;;;;:::o;213:44::-;;;;;;;;;;;;;;;;;:::o;115:29::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;495:294::-;556:12;613:5;588:9;:21;598:10;588:21;;;;;;;;;;;;;;;;:30;;580:63;;;;;;;;;;;;:::i;:::-;;;;;;;;;678:5;653:9;:21;663:10;653:21;;;;;;;;;;;;;;;;:30;;;;;;;:::i;:::-;;;;;;;;710:5;693:9;:13;703:2;693:13;;;;;;;;;;;;;;;;:22;;;;;;;:::i;:::-;;;;;;;;751:2;730:31;;739:10;730:31;;;755:5;730:31;;;;;;:::i;:::-;;;;;;;;778:4;771:11;;495:294;;;;:::o;263:64::-;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;7:99:1:-;59:6;93:5;87:12;77:22;;7:99;;;:::o;112:169::-;196:11;230:6;225:3;218:19;270:4;265:3;261:14;246:29;;112:169;;;;:::o;287:139::-;376:6;371:3;366;360:23;417:1;408:6;403:3;399:16;392:27;287:139;;;:::o;432:102::-;473:6;524:2;520:7;515:2;508:5;504:14;500:28;490:38;;432:102;;;:::o;540:377::-;628:3;656:39;689:5;656:39;:::i;:::-;711:71;775:6;770:3;711:71;:::i;:::-;704:78;;791:65;849:6;844:3;837:4;830:5;826:16;791:65;:::i;:::-;881:29;903:6;881:29;:::i;:::-;876:3;872:39;865:46;;632:285;540:377;;;;:::o;923:313::-;1036:4;1074:2;1063:9;1059:18;1051:26;;1123:9;1117:4;1113:20;1109:1;1098:9;1094:17;1087:47;1151:78;1224:4;1215:6;1151:78;:::i;:::-;1143:86;;923:313;;;;:::o;1323:117::-;1432:1;1429;1422:12;1569:126;1606:7;1646:42;1639:5;1635:54;1624:65;;1569:126;;;:::o;1701:96::-;1738:7;1767:24;1785:5;1767:24;:::i;:::-;1756:35;;1701:96;;;:::o;1803:122::-;1876:24;1894:5;1876:24;:::i;:::-;1869:5;1866:35;1856:63;;1915:1;1912;1905:12;1856:63;1803:122;:::o;1931:139::-;1977:5;2015:6;2002:20;1993:29;;2031:33;2058:5;2031:33;:::i;:::-;1931:139;;;;:::o;2076:77::-;2113:7;2142:5;2131:16;;2076:77;;;:::o;2159:122::-;2232:24;2250:5;2232:24;:::i;:::-;2225:5;2222:35;2212:63;;2271:1;2268;2261:12;2212:63;2159:122;:::o;2287:139::-;2333:5;2371:6;2358:20;2349:29;;2387:33;2414:5;2387:33;:::i;:::-;2287:139;;;;:::o;2432:474::-;2500:6;2508;2557:2;2545:9;2536:7;2532:23;2528:32;2525:119;;;2563:79;;:::i;:::-;2525:119;2683:1;2708:53;2753:7;2744:6;2733:9;2729:22;2708:53;:::i;:::-;2698:63;;2654:117;2810:2;2836:53;2881:7;2872:6;2861:9;2857:22;2836:53;:::i;:::-;2826:63;;2781:118;2432:474;;;;;:::o;2912:90::-;2946:7;2989:5;2982:13;2975:21;2964:32;;2912:90;;;:::o;3008:109::-;3089:21;3104:5;3089:21;:::i;:::-;3084:3;3077:34;3008:109;;:::o;3123:210::-;3210:4;3248:2;3237:9;3233:18;3225:26;;3261:65;3323:1;3312:9;3308:17;3299:6;3261:65;:::i;:::-;3123:210;;;;:::o;3339:118::-;3426:24;3444:5;3426:24;:::i;:::-;3421:3;3414:37;3339:118;;:::o;3463:222::-;3556:4;3594:2;3583:9;3579:18;3571:26;;3607:71;3675:1;3664:9;3660:17;3651:6;3607:71;:::i;:::-;3463:222;;;;:::o;3691:619::-;3768:6;3776;3784;3833:2;3821:9;3812:7;3808:23;3804:32;3801:119;;;3839:79;;:::i;:::-;3801:119;3959:1;3984:53;4029:7;4020:6;4009:9;4005:22;3984:53;:::i;:::-;3974:63;;3930:117;4086:2;4112:53;4157:7;4148:6;4137:9;4133:22;4112:53;:::i;:::-;4102:63;;4057:118;4214:2;4240:53;4285:7;4276:6;4265:9;4261:22;4240:53;:::i;:::-;4230:63;;4185:118;3691:619;;;;;:::o;4316:86::-;4351:7;4391:4;4384:5;4380:16;4369:27;;4316:86;;;:::o;4408:112::-;4491:22;4507:5;4491:22;:::i;:::-;4486:3;4479:35;4408:112;;:::o;4526:214::-;4615:4;4653:2;4642:9;4638:18;4630:26;;4666:67;4730:1;4719:9;4715:17;4706:6;4666:67;:::i;:::-;4526:214;;;;:::o;4746:329::-;4805:6;4854:2;4842:9;4833:7;4829:23;4825:32;4822:119;;;4860:79;;:::i;:::-;4822:119;4980:1;5005:53;5050:7;5041:6;5030:9;5026:22;5005:53;:::i;:::-;4995:63;;4951:117;4746:329;;;;:::o;5081:474::-;5149:6;5157;5206:2;5194:9;5185:7;5181:23;5177:32;5174:119;;;5212:79;;:::i;:::-;5174:119;5332:1;5357:53;5402:7;5393:6;5382:9;5378:22;5357:53;:::i;:::-;5347:63;;5303:117;5459:2;5485:53;5530:7;5521:6;5510:9;5506:22;5485:53;:::i;:::-;5475:63;;5430:118;5081:474;;;;;:::o;5561:180::-;5609:77;5606:1;5599:88;5706:4;5703:1;5696:15;5730:4;5727:1;5720:15;5747:320;5791:6;5828:1;5822:4;5818:12;5808:22;;5875:1;5869:4;5865:12;5896:18;5886:81;;5952:4;5944:6;5940:17;5930:27;;5886:81;6014:2;6006:6;6003:14;5983:18;5980:38;5977:84;;6033:18;;:::i;:::-;5977:84;5798:269;5747:320;;;:::o;6073:170::-;6213:22;6209:1;6201:6;6197:14;6190:46;6073:170;:::o;6249:366::-;6391:3;6412:67;6476:2;6471:3;6412:67;:::i;:::-;6405:74;;6488:93;6577:3;6488:93;:::i;:::-;6606:2;6601:3;6597:12;6590:19;;6249:366;;;:::o;6621:419::-;6787:4;6825:2;6814:9;6810:18;6802:26;;6874:9;6868:4;6864:20;6860:1;6849:9;6845:17;6838:47;6902:131;7028:4;6902:131;:::i;:::-;6894:139;;6621:419;;;:::o;7046:172::-;7186:24;7182:1;7174:6;7170:14;7163:48;7046:172;:::o;7224:366::-;7366:3;7387:67;7451:2;7446:3;7387:67;:::i;:::-;7380:74;;7463:93;7552:3;7463:93;:::i;:::-;7581:2;7576:3;7572:12;7565:19;;7224:366;;;:::o;7596:419::-;7762:4;7800:2;7789:9;7785:18;7777:26;;7849:9;7843:4;7839:20;7835:1;7824:9;7820:17;7813:47;7877:131;8003:4;7877:131;:::i;:::-;7869:139;;7596:419;;;:::o;8021:180::-;8069:77;8066:1;8059:88;8166:4;8163:1;8156:15;8190:4;8187:1;8180:15;8207:194;8247:4;8267:20;8285:1;8267:20;:::i;:::-;8262:25;;8301:20;8319:1;8301:20;:::i;:::-;8296:25;;8345:1;8342;8338:9;8330:17;;8369:1;8363:4;8360:11;8357:37;;;8374:18;;:::i;:::-;8357:37;8207:194;;;;:::o;8407:191::-;8447:3;8466:20;8484:1;8466:20;:::i;:::-;8461:25;;8500:20;8518:1;8500:20;:::i;:::-;8495:25;;8543:1;8540;8536:9;8529:16;;8564:3;8561:1;8558:10;8555:36;;;8571:18;;:::i;:::-;8555:36;8407:191;;;;:::o","linkReferences":{}},"methodIdentifiers":{"allowance(address,address)":"dd62ed3e","approve(address,uint256)":"095ea7b3","balanceOf(address)":"70a08231","decimals()":"313ce567","mint(address,uint256)":"40c10f19","name()":"06fdde03","symbol()":"95d89b41","totalSupply()":"18160ddd","transfer(address,uint256)":"a9059cbb","transferFrom(address,address,uint256)":"23b872dd"},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.29+commit.ab55807c\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/USDC.sol\":\"USDC\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/USDC.sol\":{\"keccak256\":\"0x324ef782b516ceab3ec9944091351c0749451ac0e74f55e5de58003950f560a7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e089b7fb2915c710fec171edf259daf540e2b0c8fc2e053f4ff4156d42182ac7\",\"dweb:/ipfs/QmcCgLxkL1JBh5vRQjHRSEYBbiv1xSZjNgHmLFRoqnjZeS\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.29+commit.ab55807c"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"owner","type":"address","indexed":true},{"internalType":"address","name":"spender","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Approval","anonymous":false},{"inputs":[{"internalType":"address","name":"from","type":"address","indexed":true},{"internalType":"address","name":"to","type":"address","indexed":true},{"internalType":"uint256","name":"value","type":"uint256","indexed":false}],"type":"event","name":"Transfer","anonymous":false},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function","name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"approve","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function","name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}]},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"mint","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"name","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}]},{"inputs":[],"stateMutability":"view","type":"function","name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}]},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transfer","outputs":[{"internalType":"bool","name":"success","type":"bool"}]},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"nonpayable","type":"function","name":"transferFrom","outputs":[{"internalType":"bool","name":"success","type":"bool"}]}],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":[],"optimizer":{"enabled":false,"runs":200},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"contracts/USDC.sol":"USDC"},"evmVersion":"cancun","libraries":{}},"sources":{"contracts/USDC.sol":{"keccak256":"0x324ef782b516ceab3ec9944091351c0749451ac0e74f55e5de58003950f560a7","urls":["bzz-raw://e089b7fb2915c710fec171edf259daf540e2b0c8fc2e053f4ff4156d42182ac7","dweb:/ipfs/QmcCgLxkL1JBh5vRQjHRSEYBbiv1xSZjNgHmLFRoqnjZeS"],"license":"MIT"}},"version":1},"id":0} \ No newline at end of file diff --git a/monitoring-stack/anvil/out/build-info/c67a86e543c3556edd8042baf8f6dee3.json b/monitoring-stack/anvil/out/build-info/c67a86e543c3556edd8042baf8f6dee3.json new file mode 100644 index 0000000..062c47a --- /dev/null +++ b/monitoring-stack/anvil/out/build-info/c67a86e543c3556edd8042baf8f6dee3.json @@ -0,0 +1 @@ +{"id":"c67a86e543c3556edd8042baf8f6dee3","source_id_to_path":{"0":"contracts/USDC.sol"},"language":"Solidity"} \ No newline at end of file diff --git a/monitoring-stack/anvil/send_usdc.sh b/monitoring-stack/anvil/send_usdc.sh new file mode 100755 index 0000000..5f65697 --- /dev/null +++ b/monitoring-stack/anvil/send_usdc.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +source ./contracts.sh + +# Create the ABI-encoded call data +CALL_DATA=$(cast calldata "transfer(address,uint256)" $ACCOUNT_0 1000000) + +# Append extra data (replace "0xabcdef" with your data) +FULL_DATA="${CALL_DATA}abcdef" + +# Send the transaction with the combined data +cast send $USDC_CONTRACT "$FULL_DATA" --private-key $PRIVATE_KEY_1 --rpc-url http://localhost:8545 diff --git a/monitoring-stack/anvil/store.sh b/monitoring-stack/anvil/store.sh new file mode 100755 index 0000000..35f017d --- /dev/null +++ b/monitoring-stack/anvil/store.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +GREEN='\033[32m' +RESET='\033[0m' + +if [ $# -eq 0 ]; then + echo "Usage: $0 " + exit 1 +fi + +directory="$1" + +if [ ! -d "$directory" ]; then + echo "Error: '$directory' is not a valid directory" + exit 1 +fi + +echo "Disk Store:" +for file in "$directory"/*; do + if [ -f "$file" ]; then + filename=$(basename "$file") + first_line=$(head -n 1 "$file" 2>/dev/null | jq -c -C . 2>/dev/null || head -n 1 "$file" 2>/dev/null) + # Split filename on underscore and colorize first part + + id=$(echo "$filename" | cut -d'.' -f1) + ext=$(echo "$filename" | cut -d'.' -f2-) + + echo -en "${GREEN}$id${RESET}" + echo -n "." + echo -e "${RESET}$ext" + echo " $first_line" + echo + fi +done diff --git a/monitoring-stack/anvil/usdc_env.sh b/monitoring-stack/anvil/usdc_env.sh new file mode 100644 index 0000000..c7f6a77 --- /dev/null +++ b/monitoring-stack/anvil/usdc_env.sh @@ -0,0 +1 @@ +export USDC_CONTRACT=0x5FbDB2315678afecb367f032d93F642f64180aa3 diff --git a/monitoring-stack/docker-compose.yaml b/monitoring-stack/docker-compose.yaml index 8588895..b082e2c 100644 --- a/monitoring-stack/docker-compose.yaml +++ b/monitoring-stack/docker-compose.yaml @@ -12,10 +12,33 @@ x-loki: keep-file: 'false' services: + anvil: + image: ghcr.io/foundry-rs/foundry:latest + container_name: anvil + ports: + - 8545:8545 + entrypoint: ["anvil", "-vvv", "--chain-id", "1", "--host", "0.0.0.0", "--block-time", "2", "--port", "8545"] + volumes: + - ./anvil:/anvil + healthcheck: + test: ["CMD", "cast", "block-number", "--rpc-url", "http://localhost:8545"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 40s + anvil-init: + image: ghcr.io/foundry-rs/foundry:latest + container_name: anvil-init + user: "0" + depends_on: + - anvil + entrypoint: ["./anvil.sh"] + volumes: + - ./anvil:/anvil + working_dir: /anvil node1: container_name: node1 hostname: node1 - image: canopynetwork/canopy build: context: ../docker_image dockerfile: ./Dockerfile @@ -25,7 +48,7 @@ services: WALLET_BASE_PATH: '/' BUILD_PATH: cmd/cli BIN_PATH: $BIN_PATH - BRANCH: latest + BRANCH: eth-oracle env_file: - .env ports: @@ -38,18 +61,31 @@ services: command: [ "start" ] volumes: - ../canopy_data/node1:/root/.canopy - - ../docker_image/entrypoint.sh:/app/entrypoint.sh + # - ../docker_image/entrypoint.sh:/app/entrypoint.sh logging: *loki-logging deploy: resources: limits: - memory: 4G - cpus: "2.0" - + memory: 1G + cpus: "1.0" node2: container_name: node2 hostname: node2 - image: canopynetwork/canopy + build: + context: ../docker_image + dockerfile: ./Dockerfile + network: host + args: + EXPLORER_BASE_PATH: '/' + WALLET_BASE_PATH: '/' + BUILD_PATH: cmd/cli + BIN_PATH: $BIN_PATH + BRANCH: eth-oracle + environment: + - ETH_RPC_URL=http://anvil:8545 + - E2E_FROM_NICK=nick-0 + - E2E_FROM_PASS=test + - USDC_CONTRACT=0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9 env_file: - .env ports: @@ -62,13 +98,37 @@ services: command: [ "start" ] volumes: - ../canopy_data/node2:/root/.canopy - - ../docker_image/entrypoint.sh:/app/entrypoint.sh logging: *loki-logging deploy: resources: limits: - memory: 4G - cpus: "2.0" + memory: 1G + cpus: "1.0" + oracle-e2e: + container_name: oracle-e2e + hostname: oracle-e2e + build: + context: ../docker_image + dockerfile: ./e2e.Dockerfile + network: host + args: + BRANCH: eth-oracle + environment: + - ETH_RPC_URL=http://anvil:8545 + - E2E_FROM_NICK=nick-0 + - E2E_FROM_PASS=test + - USDC_CONTRACT=0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9 + env_file: + - .env + command: [ "start" ] + volumes: + - ../canopy_data/node1:/root/.canopy + logging: *loki-logging + deploy: + resources: + limits: + memory: 400m + cpus: "0.5" traefik: cpus: 2 diff --git a/monitoring-stack/loadbalancer/services/middleware.yaml b/monitoring-stack/loadbalancer/services/middleware.yaml index f3bef45..22f2257 100644 --- a/monitoring-stack/loadbalancer/services/middleware.yaml +++ b/monitoring-stack/loadbalancer/services/middleware.yaml @@ -23,7 +23,7 @@ http: basic-auth: basicAuth: users: - - "canopy:$apr1$GnHnOP0b$zWcOv5kosOuUAuvrlu72C0" + - "admin:$2y$05$0B35MowhyBgxCOuG1gFVWuOcu90xSZQvxq9Gmp.7Lv59V5MgzgkRS" websocket-headers: headers: diff --git a/monitoring-stack/loadbalancer/traefik.yml b/monitoring-stack/loadbalancer/traefik.yml index 9b20a34..2fee599 100644 --- a/monitoring-stack/loadbalancer/traefik.yml +++ b/monitoring-stack/loadbalancer/traefik.yml @@ -37,13 +37,13 @@ entryPoints: certificatesresolvers: https-resolver: acme: - email: ${ACME_EMAIL} + email: info@neochiba.net storage: /letsencrypt/acme.json httpChallenge: entryPoint: web namecheap: acme: - email: ${ACME_EMAIL} + email: info@neochiba.net caServer: https://acme-v02.api.letsencrypt.org/directory storage: /letsencrypt/acme.json dnschallenge: @@ -54,7 +54,7 @@ certificatesresolvers: cloudflare: acme: - email: ${ACME_EMAIL} + email: info@neochiba.net storage: /letsencrypt/acme.json dnschallenge: resolvers: diff --git a/setup.sh b/setup.sh index dd5827e..543cafc 100755 --- a/setup.sh +++ b/setup.sh @@ -1,29 +1,93 @@ #!/bin/bash -echo "setting up the validator key" -docker pull canopynetwork/canopy && \ -docker run --user root -it -p 50000:50000 -p 50001:50001 -p 50002:50002 -p 50003:50003 -p 9001:9001 --name canopy-config --volume ${PWD}/canopy_data/node1/:/root/.canopy/ canopynetwork/canopy && \ -docker stop canopy-config && docker rm canopy-config && \ -cp canopy_data/node1/validator_key.json canopy_data/node2/ && \ -cp canopy_data/node1/keystore.json canopy_data/node2/ - -# ask user for setup type -echo "Please select setup type:" -echo "1) simple (only contains the node containers)" -echo "2) full (contains the node containers and the monitoring stack)" -read -p "Enter your choice (1 or 2): " SETUP_CHOICE - -# validate and set SETUP_TYPE -while [[ "$SETUP_CHOICE" != "1" && "$SETUP_CHOICE" != "2" ]]; do - echo "Invalid choice. Please enter 1 for simple or 2 for full." +# This script builds a Canopy node. +echo " ____ _ _ _ ___ ______ __" +echo " / ___| / \ | \ | |/ _ \| _ \ \ / /" +echo "| | / _ \ | \| | | | | |_) \ V / " +echo "| |___ / ___ \| |\ | |_| | __/ | | " +echo " \____/_/ \_\_| \_|\___/|_| |_| " +echo +echo "Welcome to Canopy Setup!" +echo + +CONFIG_FILE=setup.conf + +# Default canopy branch to build, can be overridden in config file +BRANCH=latest + +# Read configuration file, if available +if [[ -f "$CONFIG_FILE" ]]; then + source "$CONFIG_FILE" + + echo "Loaded setup configuration:" + echo + echo "SETUP_TYPE: $SETUP_TYPE" + echo "DOMAIN: $DOMAIN" + echo "ACME_EMAIL: $ACME_EMAIL" + echo "BRANCH: $BRANCH" + echo "HTPASSWD: $HTPASSWD" + echo +fi + +# SETUP_TYPE is not present, request from user +if [[ -z "$SETUP_TYPE" ]]; then + echo "Please select setup type:" + echo "1) simple (only contains the node containers)" + echo "2) full (contains the node containers and the monitoring stack)" read -p "Enter your choice (1 or 2): " SETUP_CHOICE -done + # Validate and set SETUP + while [[ "$SETUP_CHOICE" != "1" && "$SETUP_CHOICE" != "2" ]]; do + echo "Invalid choice. Please enter 1 for simple or 2 for full." + read -p "Enter your choice (1 or 2): " SETUP_CHOICE + done + if [[ "$SETUP_CHOICE" == "1" ]]; then + SETUP_TYPE="simple" + else + SETUP_TYPE="full" + fi +fi -if [[ "$SETUP_CHOICE" == "1" ]]; then - SETUP_TYPE="simple" -else - SETUP_TYPE="full" +# DOMAIN not present, request from user +if [[ -z "$DOMAIN" ]]; then + # Ask for domain input + read -p "Please enter the domain [default: localhost]: " DOMAIN + if [[ -z "$DOMAIN" ]]; then + DOMAIN="localhost" + fi +fi + +# ACME_EMAIL not present, request from user +if [[ -z "$ACME_EMAIL" ]]; then + # Ask for email input + read -p "Please enter email to validate the domain against [default: test@example.com]: " ACME_EMAIL + if [[ -z "$ACME_EMAIL" ]]; then + ACME_EMAIL="test@example.com" + fi +fi + +# BRANCH not present, request from user +if [[ -z "$BRANCH" ]]; then + read -p "Enter canopy git branch [default: latest]: " BRANCH + if [[ -z "$BRANCH" ]]; then + BRANCH=latest + fi fi +# Remove any previous canopy-config container still around +docker stop canopy-config > /dev/null 2>&1 +docker rm canopy-config > /dev/null 2>&1 + +echo "Setting up the validator key" +echo + +docker pull canopynetwork/canopy && \ + docker run --user root -it -p 50000:50000 -p 50001:50001 -p 50002:50002 -p 50003:50003 -p 9001:9001 --name canopy-config --volume ${PWD}/canopy_data/node1/:/root/.canopy/ canopynetwork/canopy && \ + cp canopy_data/node1/validator_key.json canopy_data/node2/ && \ + cp canopy_data/node1/keystore.json canopy_data/node2/ + +# Remove any previous canopy-config container still around +docker stop canopy-config > /dev/null 2>&1 +docker rm canopy-config > /dev/null 2>&1 + if [[ "$SETUP_TYPE" == "simple" ]]; then echo "setup complete ✅" exit 0 @@ -31,12 +95,6 @@ fi STACK_PATH="$(realpath "$(dirname "$0")/monitoring-stack/")" -# ask user for domain input -read -p "Please enter the domain [default: localhost]: " DOMAIN - -# ask user for acme email input -read -p "Please enter email to validate the domain against [default: test@example.com]: " ACME_EMAIL - # define the path to the template and new .env file ENV_TEMPLATE_FILE="$STACK_PATH/.env.template" ENV_FILE="$STACK_PATH/.env" @@ -100,30 +158,32 @@ fi set -e +# HTPASSWD not present, ask user for credentials and construct it +if [[ -z "$HTPASSWD" ]]; then + echo "Enter username for htpasswd:" + read USERNAME -YAML_PATH="monitoring-stack/loadbalancer/services/middleware.yaml" - -echo "Enter username:" -read USERNAME + echo "Enter password for htpasswd:" + read -s PASSWORD + echo -echo "Enter password:" -read -s PASSWORD -echo + if ! command -v htpasswd &> /dev/null; then + echo "Error: htpasswd not found. Please install apache2-utils." + exit 1 + fi -if ! command -v htpasswd &> /dev/null; then - echo "Error: htpasswd not found. Please install apache2-utils." - exit 1 + HTPASSWD=$(htpasswd -nbB "$USERNAME" "$PASSWORD") fi -HTPASSWD_LINE=$(htpasswd -nbB "$USERNAME" "$PASSWORD") - # Escape $ for sed and wrap in quotes -ESCAPED_LINE=$(printf '%s' "$HTPASSWD_LINE" | sed 's/\$/\\\$/g') +ESCAPED_LINE=$(printf '%s' "$HTPASSWD" | sed 's/\$/\\\$/g') # Use sed to replace the entire users list in the yaml # This assumes your users list is indented exactly 8 spaces under users: # and users: line is at indentation level 6 spaces. # Adjust indentation accordingly if different. +YAML_PATH="monitoring-stack/loadbalancer/services/middleware.yaml" + # Wrap in quotes and indent with 8 spaces (adjust as needed) FINAL_LINE=" - \"$ESCAPED_LINE\""