Skip to content

Commit

Permalink
feat: deploy on gnosis chain (#52)
Browse files Browse the repository at this point in the history
* feat: deploy on gnosis chain

* chore: deploy Counter on gnosis chain
  • Loading branch information
brandonchuah authored Apr 7, 2022
1 parent 687a34f commit ede0c04
Show file tree
Hide file tree
Showing 12 changed files with 2,963 additions and 0 deletions.
1 change: 1 addition & 0 deletions deployments/gnosis/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
100
152 changes: 152 additions & 0 deletions deployments/gnosis/Counter.json

Large diffs are not rendered by default.

82 changes: 82 additions & 0 deletions deployments/gnosis/CounterResolver.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"address": "0x340759c8346A1E6Ed92035FB8B6ec57cE1D82c2c",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_counter",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "COUNTER",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "checker",
"outputs": [
{
"internalType": "bool",
"name": "canExec",
"type": "bool"
},
{
"internalType": "bytes",
"name": "execPayload",
"type": "bytes"
}
],
"stateMutability": "view",
"type": "function"
}
],
"transactionHash": "0x3f117fb1bdd7f5f0543621bd52c1d83638f87a10d624362e3065213221758e82",
"receipt": {
"to": null,
"from": "0xCDf41a135C65d0013393B3793F92b4FAF31032d0",
"contractAddress": "0x340759c8346A1E6Ed92035FB8B6ec57cE1D82c2c",
"transactionIndex": 7,
"gasUsed": "288809",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x2b01bd71f980b93d9c62b1699fb32067b1eeaa8a73f5b63335dd795c6d0eda80",
"transactionHash": "0x3f117fb1bdd7f5f0543621bd52c1d83638f87a10d624362e3065213221758e82",
"logs": [],
"blockNumber": 21370737,
"cumulativeGasUsed": "1996351",
"status": 1,
"byzantium": true
},
"args": ["0xa5f9b728ecEB9A1F6FCC89dcc2eFd810bA4Dec41"],
"solcInputHash": "474728aa48b023738c40cc1508656900",
"metadata": "{\"compiler\":{\"version\":\"0.8.0+commit.c7dfd78e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_counter\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"COUNTER\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"checker\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"canExec\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"execPayload\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/examples/withTreasury/CounterResolver.sol\":\"CounterResolver\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/examples/withTreasury/CounterResolver.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity 0.8.0;\\n\\nimport {IResolver} from \\\"../../interfaces/IResolver.sol\\\";\\n\\ninterface ICounter {\\n function increaseCount(uint256 amount) external;\\n\\n function lastExecuted() external view returns (uint256);\\n}\\n\\ncontract CounterResolver is IResolver {\\n // solhint-disable var-name-mixedcase\\n address public immutable COUNTER;\\n\\n constructor(address _counter) {\\n COUNTER = _counter;\\n }\\n\\n function checker()\\n external\\n view\\n override\\n returns (bool canExec, bytes memory execPayload)\\n {\\n uint256 lastExecuted = ICounter(COUNTER).lastExecuted();\\n\\n // solhint-disable not-rely-on-time\\n canExec = (block.timestamp - lastExecuted) > 180;\\n\\n execPayload = abi.encodeWithSelector(\\n ICounter.increaseCount.selector,\\n uint256(100)\\n );\\n }\\n}\\n\",\"keccak256\":\"0xa546379f5fb21a157c073f459259032410155490d768b53e18e37910d9592e34\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/IResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.0;\\n\\ninterface IResolver {\\n function checker()\\n external\\n view\\n returns (bool canExec, bytes memory execPayload);\\n}\\n\",\"keccak256\":\"0xe007b0534f33a83da44824321a02e1eb86b5003d49bba1795d2d578d7f6a5424\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x60a060405234801561001057600080fd5b5060405161054c38038061054c83398181016040528101906100329190610084565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b81525050506100f6565b60008151905061007e816100df565b92915050565b60006020828403121561009657600080fd5b60006100a48482850161006f565b91505092915050565b60006100b8826100bf565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6100e8816100ad565b81146100f357600080fd5b50565b60805160601c61043361011960003960008181607a015260a401526104336000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806399b705791461003b578063cf5303cf14610059575b600080fd5b610043610078565b6040516100509190610275565b60405180910390f35b61006161009c565b60405161006f929190610290565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b6000606060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631c15ff776040518163ffffffff1660e01b815260040160206040518083038186803b15801561010857600080fd5b505afa15801561011c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061014091906101e6565b905060b4814261015091906102f7565b1192506346d4adf260e01b606460405160240161016d91906102c0565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509150509091565b6000815190506101e0816103e6565b92915050565b6000602082840312156101f857600080fd5b6000610206848285016101d1565b91505092915050565b6102188161032b565b82525050565b6102278161033d565b82525050565b6000610238826102db565b61024281856102e6565b9350610252818560208601610373565b61025b816103d5565b840191505092915050565b61026f81610369565b82525050565b600060208201905061028a600083018461020f565b92915050565b60006040820190506102a5600083018561021e565b81810360208301526102b7818461022d565b90509392505050565b60006020820190506102d56000830184610266565b92915050565b600081519050919050565b600082825260208201905092915050565b600061030282610369565b915061030d83610369565b9250828210156103205761031f6103a6565b5b828203905092915050565b600061033682610349565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b83811015610391578082015181840152602081019050610376565b838111156103a0576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000601f19601f8301169050919050565b6103ef81610369565b81146103fa57600080fd5b5056fea26469706673582212207c8346ce74ef79f2a62576d16343ec5694841cc7167ab5cdedd8365106e9137d64736f6c63430008000033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c806399b705791461003b578063cf5303cf14610059575b600080fd5b610043610078565b6040516100509190610275565b60405180910390f35b61006161009c565b60405161006f929190610290565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b6000606060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16631c15ff776040518163ffffffff1660e01b815260040160206040518083038186803b15801561010857600080fd5b505afa15801561011c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061014091906101e6565b905060b4814261015091906102f7565b1192506346d4adf260e01b606460405160240161016d91906102c0565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509150509091565b6000815190506101e0816103e6565b92915050565b6000602082840312156101f857600080fd5b6000610206848285016101d1565b91505092915050565b6102188161032b565b82525050565b6102278161033d565b82525050565b6000610238826102db565b61024281856102e6565b9350610252818560208601610373565b61025b816103d5565b840191505092915050565b61026f81610369565b82525050565b600060208201905061028a600083018461020f565b92915050565b60006040820190506102a5600083018561021e565b81810360208301526102b7818461022d565b90509392505050565b60006020820190506102d56000830184610266565b92915050565b600081519050919050565b600082825260208201905092915050565b600061030282610369565b915061030d83610369565b9250828210156103205761031f6103a6565b5b828203905092915050565b600061033682610349565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b83811015610391578082015181840152602081019050610376565b838111156103a0576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000601f19601f8301169050919050565b6103ef81610369565b81146103fa57600080fd5b5056fea26469706673582212207c8346ce74ef79f2a62576d16343ec5694841cc7167ab5cdedd8365106e9137d64736f6c63430008000033",
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
},
"storageLayout": {
"storage": [],
"types": null
}
}
64 changes: 64 additions & 0 deletions deployments/gnosis/Forwarder.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"address": "0xB3f5503f93d5Ef84b06993a1975B9D21B962892F",
"abi": [
{
"inputs": [
{
"internalType": "bytes",
"name": "execData",
"type": "bytes"
}
],
"name": "checker",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
},
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"stateMutability": "pure",
"type": "function"
}
],
"transactionHash": "0x88673502c86a584d4523754ad00515bb81957653efa7b22b6a59569741fb5394",
"receipt": {
"to": null,
"from": "0xCDf41a135C65d0013393B3793F92b4FAF31032d0",
"contractAddress": "0xB3f5503f93d5Ef84b06993a1975B9D21B962892F",
"transactionIndex": 3,
"gasUsed": "208922",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0xd5bdc4e1818bcc1520e740a7f8ce26b8f4c4cdf8d1ea883817bc758c866bf748",
"transactionHash": "0x88673502c86a584d4523754ad00515bb81957653efa7b22b6a59569741fb5394",
"logs": [],
"blockNumber": 21336973,
"cumulativeGasUsed": "671199",
"status": 1,
"byzantium": true
},
"args": [],
"solcInputHash": "474728aa48b023738c40cc1508656900",
"metadata": "{\"compiler\":{\"version\":\"0.8.0+commit.c7dfd78e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"execData\",\"type\":\"bytes\"}],\"name\":\"checker\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Forwarder.sol\":\"Forwarder\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/Forwarder.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity 0.8.0;\\n\\ncontract Forwarder {\\n function checker(bytes memory execData)\\n external\\n pure\\n returns (bool, bytes memory)\\n {\\n return (true, execData);\\n }\\n}\\n\",\"keccak256\":\"0x6d0dc5133f01c34bb47b7c58fad1684e4699d977fbb9eeaa2a8606d3295d5922\",\"license\":\"UNLICENSED\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b506102d3806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063e931fd5b14610030575b600080fd5b61004a600480360381019061004591906100d9565b610061565b604051610058929190610162565b60405180910390f35b6000606060018391509150915091565b600061008461007f846101c3565b610192565b90508281526020810184848401111561009c57600080fd5b6100a784828561021b565b509392505050565b600082601f8301126100c057600080fd5b81356100d0848260208601610071565b91505092915050565b6000602082840312156100eb57600080fd5b600082013567ffffffffffffffff81111561010557600080fd5b610111848285016100af565b91505092915050565b6101238161020f565b82525050565b6000610134826101f3565b61013e81856101fe565b935061014e81856020860161022a565b6101578161028c565b840191505092915050565b6000604082019050610177600083018561011a565b81810360208301526101898184610129565b90509392505050565b6000604051905081810181811067ffffffffffffffff821117156101b9576101b861025d565b5b8060405250919050565b600067ffffffffffffffff8211156101de576101dd61025d565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b60008115159050919050565b82818337600083830152505050565b60005b8381101561024857808201518184015260208101905061022d565b83811115610257576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f830116905091905056fea2646970667358221220b967a09dbe4f02c50a9cedaebcedfdb35b7f5b48df6074bc61fd9074cc0fc5ca64736f6c63430008000033",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063e931fd5b14610030575b600080fd5b61004a600480360381019061004591906100d9565b610061565b604051610058929190610162565b60405180910390f35b6000606060018391509150915091565b600061008461007f846101c3565b610192565b90508281526020810184848401111561009c57600080fd5b6100a784828561021b565b509392505050565b600082601f8301126100c057600080fd5b81356100d0848260208601610071565b91505092915050565b6000602082840312156100eb57600080fd5b600082013567ffffffffffffffff81111561010557600080fd5b610111848285016100af565b91505092915050565b6101238161020f565b82525050565b6000610134826101f3565b61013e81856101fe565b935061014e81856020860161022a565b6101578161028c565b840191505092915050565b6000604082019050610177600083018561011a565b81810360208301526101898184610129565b90509392505050565b6000604051905081810181811067ffffffffffffffff821117156101b9576101b861025d565b5b8060405250919050565b600067ffffffffffffffff8211156101de576101dd61025d565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b60008115159050919050565b82818337600083830152505050565b60005b8381101561024857808201518184015260208101905061022d565b83811115610257576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f830116905091905056fea2646970667358221220b967a09dbe4f02c50a9cedaebcedfdb35b7f5b48df6074bc61fd9074cc0fc5ca64736f6c63430008000033",
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
},
"storageLayout": {
"storage": [],
"types": null
}
}
Loading

0 comments on commit ede0c04

Please sign in to comment.