diff --git a/deployments/reyacronos/.chainId b/deployments/reyacronos/.chainId new file mode 100644 index 0000000..72078b7 --- /dev/null +++ b/deployments/reyacronos/.chainId @@ -0,0 +1 @@ +1729 \ No newline at end of file diff --git a/deployments/reyacronos/AdvertisingBoard.json b/deployments/reyacronos/AdvertisingBoard.json new file mode 100644 index 0000000..ef80cf4 --- /dev/null +++ b/deployments/reyacronos/AdvertisingBoard.json @@ -0,0 +1,145 @@ +{ + "address": "0x0FE88cA117b03A7D399198d6C53502501A6EF63E", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IOpsProxyFactory", + "name": "_opsProxyFactory", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "messages", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "opsProxyFactory", + "outputs": [ + { + "internalType": "contract IOpsProxyFactory", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_message", + "type": "string" + } + ], + "name": "postMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_eoa", + "type": "address" + } + ], + "name": "viewMessage", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x2b7d13142a3dc596aad5502ac2b8342fede43433e77684966f625c03f725c074", + "receipt": { + "to": null, + "from": "0xC2A98bb4E3E1DA5Fb05cF43b826DA67BA94B74da", + "contractAddress": "0x0FE88cA117b03A7D399198d6C53502501A6EF63E", + "transactionIndex": 0, + "gasUsed": "367152", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x4aec373e50d9a6083f62bb60376aa15d39c2c0ef38a0ef4b7734413d1cfffb4c", + "transactionHash": "0x2b7d13142a3dc596aad5502ac2b8342fede43433e77684966f625c03f725c074", + "logs": [], + "blockNumber": 395277, + "cumulativeGasUsed": "367152", + "status": 1, + "byzantium": true + }, + "args": [ + "0x44bde1bccdD06119262f1fE441FBe7341EaaC185" + ], + "numDeployments": 1, + "solcInputHash": "c6b93f911b46d6eb9f2a199b1c33ee7c", + "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IOpsProxyFactory\",\"name\":\"_opsProxyFactory\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"messages\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"opsProxyFactory\",\"outputs\":[{\"internalType\":\"contract IOpsProxyFactory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_message\",\"type\":\"string\"}],\"name\":\"postMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_eoa\",\"type\":\"address\"}],\"name\":\"viewMessage\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/examples/AdvertisingBoard.sol\":\"AdvertisingBoard\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/examples/AdvertisingBoard.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.0;\\n\\ncontract AdvertisingBoard {\\n IOpsProxyFactory public immutable opsProxyFactory;\\n mapping(address => string) public messages;\\n\\n constructor(IOpsProxyFactory _opsProxyFactory) {\\n opsProxyFactory = _opsProxyFactory;\\n }\\n\\n function postMessage(string calldata _message) external {\\n messages[msg.sender] = _message;\\n }\\n\\n function viewMessage(address _eoa) external view returns (string memory) {\\n (address dedicatedMsgSender, ) = opsProxyFactory.getProxyOf(_eoa);\\n\\n return messages[dedicatedMsgSender];\\n }\\n}\\n\\ninterface IOpsProxyFactory {\\n /**\\n * @return address Proxy address owned by account.\\n * @return bool Whether if proxy is deployed\\n */\\n function getProxyOf(address account) external view returns (address, bool);\\n}\\n\",\"keccak256\":\"0xa8275c932c8a7f396d5f0b835a490ea958a1fa08f4a0803ba89342d503079b76\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x60a060405234801561001057600080fd5b5060405161063838038061063883398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b6080516105a761009160003960008181609401526101bf01526105a76000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80635fdd59f8146100515780636630f88f1461007a578063ba1d0ff41461008f578063c424cb55146100ce575b600080fd5b61006461005f3660046102ef565b6100e1565b6040516100719190610313565b60405180910390f35b61008d610088366004610361565b61017b565b005b6100b67f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610071565b6100646100dc3660046102ef565b61019a565b600060208190529081526040902080546100fa906103d3565b80601f0160208091040260200160405190810160405280929190818152602001828054610126906103d3565b80156101735780601f1061014857610100808354040283529160200191610173565b820191906000526020600020905b81548152906001019060200180831161015657829003601f168201915b505050505081565b336000908152602081905260409020610195828483610471565b505050565b6040516337b6269f60e21b81526001600160a01b0382811660048301526060916000917f0000000000000000000000000000000000000000000000000000000000000000169063ded89a7c906024016040805180830381865afa158015610205573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102299190610532565b506001600160a01b0381166000908152602081905260409020805491925090610251906103d3565b80601f016020809104026020016040519081016040528092919081815260200182805461027d906103d3565b80156102ca5780601f1061029f576101008083540402835291602001916102ca565b820191906000526020600020905b8154815290600101906020018083116102ad57829003601f168201915b5050505050915050919050565b6001600160a01b03811681146102ec57600080fd5b50565b60006020828403121561030157600080fd5b813561030c816102d7565b9392505050565b600060208083528351808285015260005b8181101561034057858101830151858201604001528201610324565b506000604082860101526040601f19601f8301168501019250505092915050565b6000806020838503121561037457600080fd5b823567ffffffffffffffff8082111561038c57600080fd5b818501915085601f8301126103a057600080fd5b8135818111156103af57600080fd5b8660208285010111156103c157600080fd5b60209290920196919550909350505050565b600181811c908216806103e757607f821691505b60208210810361040757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b601f82111561019557600081815260208120601f850160051c8101602086101561044a5750805b601f850160051c820191505b8181101561046957828155600101610456565b505050505050565b67ffffffffffffffff8311156104895761048961040d565b61049d8361049783546103d3565b83610423565b6000601f8411600181146104d157600085156104b95750838201355b600019600387901b1c1916600186901b17835561052b565b600083815260209020601f19861690835b8281101561050257868501358255602094850194600190920191016104e2565b508682101561051f5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b6000806040838503121561054557600080fd5b8251610550816102d7565b6020840151909250801515811461056657600080fd5b80915050925092905056fea26469706673582212204517566bac07e08da30c344ebbf2972064ede3a7629b0d14e3c1b6a4183e068064736f6c63430008110033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80635fdd59f8146100515780636630f88f1461007a578063ba1d0ff41461008f578063c424cb55146100ce575b600080fd5b61006461005f3660046102ef565b6100e1565b6040516100719190610313565b60405180910390f35b61008d610088366004610361565b61017b565b005b6100b67f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610071565b6100646100dc3660046102ef565b61019a565b600060208190529081526040902080546100fa906103d3565b80601f0160208091040260200160405190810160405280929190818152602001828054610126906103d3565b80156101735780601f1061014857610100808354040283529160200191610173565b820191906000526020600020905b81548152906001019060200180831161015657829003601f168201915b505050505081565b336000908152602081905260409020610195828483610471565b505050565b6040516337b6269f60e21b81526001600160a01b0382811660048301526060916000917f0000000000000000000000000000000000000000000000000000000000000000169063ded89a7c906024016040805180830381865afa158015610205573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102299190610532565b506001600160a01b0381166000908152602081905260409020805491925090610251906103d3565b80601f016020809104026020016040519081016040528092919081815260200182805461027d906103d3565b80156102ca5780601f1061029f576101008083540402835291602001916102ca565b820191906000526020600020905b8154815290600101906020018083116102ad57829003601f168201915b5050505050915050919050565b6001600160a01b03811681146102ec57600080fd5b50565b60006020828403121561030157600080fd5b813561030c816102d7565b9392505050565b600060208083528351808285015260005b8181101561034057858101830151858201604001528201610324565b506000604082860101526040601f19601f8301168501019250505092915050565b6000806020838503121561037457600080fd5b823567ffffffffffffffff8082111561038c57600080fd5b818501915085601f8301126103a057600080fd5b8135818111156103af57600080fd5b8660208285010111156103c157600080fd5b60209290920196919550909350505050565b600181811c908216806103e757607f821691505b60208210810361040757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b601f82111561019557600081815260208120601f850160051c8101602086101561044a5750805b601f850160051c820191505b8181101561046957828155600101610456565b505050505050565b67ffffffffffffffff8311156104895761048961040d565b61049d8361049783546103d3565b83610423565b6000601f8411600181146104d157600085156104b95750838201355b600019600387901b1c1916600186901b17835561052b565b600083815260209020601f19861690835b8281101561050257868501358255602094850194600190920191016104e2565b508682101561051f5760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b6000806040838503121561054557600080fd5b8251610550816102d7565b6020840151909250801515811461056657600080fd5b80915050925092905056fea26469706673582212204517566bac07e08da30c344ebbf2972064ede3a7629b0d14e3c1b6a4183e068064736f6c63430008110033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 8, + "contract": "contracts/examples/AdvertisingBoard.sol:AdvertisingBoard", + "label": "messages", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_string_storage)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_string_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => string)", + "numberOfBytes": "32", + "value": "t_string_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/reyacronos/CoingeckoOracle.json b/deployments/reyacronos/CoingeckoOracle.json new file mode 100644 index 0000000..c3856ce --- /dev/null +++ b/deployments/reyacronos/CoingeckoOracle.json @@ -0,0 +1,122 @@ +{ + "address": "0x9229D6593Ad50FF8D5Dcb1Ded04a1Ef0dd329612", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "timeStamp", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "price", + "type": "uint256" + } + ], + "name": "PriceUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "lastUpdated", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "price", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_price", + "type": "uint256" + } + ], + "name": "updatePrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xe1f73d1eebf234d681411a945b220b4c2475c8fd55b3c335c8b280b6f15f3716", + "receipt": { + "to": null, + "from": "0xC2A98bb4E3E1DA5Fb05cF43b826DA67BA94B74da", + "contractAddress": "0x9229D6593Ad50FF8D5Dcb1Ded04a1Ef0dd329612", + "transactionIndex": 0, + "gasUsed": "109381", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xb8cb9d82e2ccc496a54510ee39ee85c12bfe3dbb1516562fc5208012b441d56b", + "transactionHash": "0xe1f73d1eebf234d681411a945b220b4c2475c8fd55b3c335c8b280b6f15f3716", + "logs": [], + "blockNumber": 395282, + "cumulativeGasUsed": "109381", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "c6b93f911b46d6eb9f2a199b1c33ee7c", + "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"timeStamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"}],\"name\":\"PriceUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"lastUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"price\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_price\",\"type\":\"uint256\"}],\"name\":\"updatePrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/examples/CoingeckoOracle.sol\":\"CoingeckoOracle\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/examples/CoingeckoOracle.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.0;\\n\\ncontract CoingeckoOracle {\\n uint256 public price;\\n uint256 public lastUpdated;\\n\\n event PriceUpdated(uint256 indexed timeStamp, uint256 price);\\n\\n function updatePrice(uint256 _price) external {\\n price = _price;\\n lastUpdated = block.timestamp;\\n\\n emit PriceUpdated(block.timestamp, _price);\\n }\\n}\\n\",\"keccak256\":\"0xc36530f2315497890bcd52cf9a228da87bf59ec33bcae15d4105bd9925ff8ba5\",\"license\":\"UNLICENSED\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610103806100206000396000f3fe6080604052348015600f57600080fd5b5060043610603c5760003560e01c80638d6cc56d146041578063a035b1fe146052578063d0b06f5d14606c575b600080fd5b6050604c36600460b5565b6074565b005b605a60005481565b60405190815260200160405180910390f35b605a60015481565b60008190554260018190556040518281527f945c1c4e99aa89f648fbfe3df471b916f719e16d960fcec0737d4d56bd6968389060200160405180910390a250565b60006020828403121560c657600080fd5b503591905056fea2646970667358221220f686d3f563148b17c55f0a0cfc769bada2765f9b792fc396697568568c7a1d5c64736f6c63430008110033", + "deployedBytecode": "0x6080604052348015600f57600080fd5b5060043610603c5760003560e01c80638d6cc56d146041578063a035b1fe146052578063d0b06f5d14606c575b600080fd5b6050604c36600460b5565b6074565b005b605a60005481565b60405190815260200160405180910390f35b605a60015481565b60008190554260018190556040518281527f945c1c4e99aa89f648fbfe3df471b916f719e16d960fcec0737d4d56bd6968389060200160405180910390a250565b60006020828403121560c657600080fd5b503591905056fea2646970667358221220f686d3f563148b17c55f0a0cfc769bada2765f9b792fc396697568568c7a1d5c64736f6c63430008110033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 67, + "contract": "contracts/examples/CoingeckoOracle.sol:CoingeckoOracle", + "label": "price", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 69, + "contract": "contracts/examples/CoingeckoOracle.sol:CoingeckoOracle", + "label": "lastUpdated", + "offset": 0, + "slot": "1", + "type": "t_uint256" + } + ], + "types": { + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/reyacronos/solcInputs/c6b93f911b46d6eb9f2a199b1c33ee7c.json b/deployments/reyacronos/solcInputs/c6b93f911b46d6eb9f2a199b1c33ee7c.json new file mode 100644 index 0000000..f093f03 --- /dev/null +++ b/deployments/reyacronos/solcInputs/c6b93f911b46d6eb9f2a199b1c33ee7c.json @@ -0,0 +1,38 @@ +{ + "language": "Solidity", + "sources": { + "contracts/examples/AdvertisingBoard.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\ncontract AdvertisingBoard {\n IOpsProxyFactory public immutable opsProxyFactory;\n mapping(address => string) public messages;\n\n constructor(IOpsProxyFactory _opsProxyFactory) {\n opsProxyFactory = _opsProxyFactory;\n }\n\n function postMessage(string calldata _message) external {\n messages[msg.sender] = _message;\n }\n\n function viewMessage(address _eoa) external view returns (string memory) {\n (address dedicatedMsgSender, ) = opsProxyFactory.getProxyOf(_eoa);\n\n return messages[dedicatedMsgSender];\n }\n}\n\ninterface IOpsProxyFactory {\n /**\n * @return address Proxy address owned by account.\n * @return bool Whether if proxy is deployed\n */\n function getProxyOf(address account) external view returns (address, bool);\n}\n" + }, + "contracts/examples/CoingeckoOracle.sol": { + "content": "// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.0;\n\ncontract CoingeckoOracle {\n uint256 public price;\n uint256 public lastUpdated;\n\n event PriceUpdated(uint256 indexed timeStamp, uint256 price);\n\n function updatePrice(uint256 _price) external {\n price = _price;\n lastUpdated = block.timestamp;\n\n emit PriceUpdated(block.timestamp, _price);\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/hardhat.config.ts b/hardhat.config.ts index 5cceef3..046eeeb 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -190,6 +190,11 @@ const config: HardhatUserConfig = { url: "https://rpc.zkatana.gelato.digital", accounts: PRIVATE_KEY ? [PRIVATE_KEY] : [], }, + reyacronos: { + chainId: 1729, + url: "https://rpc.reya-cronos.gelato.digital", + accounts: PRIVATE_KEY ? [PRIVATE_KEY] : [], + }, }, verify: {