@cartesi/devnet 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/LICENSE +202 -0
  2. package/build/anvil_state.json +1 -0
  3. package/deployments/localhost/.chainId +1 -0
  4. package/deployments/localhost/AuthorityFactory.json +177 -0
  5. package/deployments/localhost/AuthorityHistoryPairFactory.json +276 -0
  6. package/deployments/localhost/Bitmask.json +44 -0
  7. package/deployments/localhost/CartesiDAppFactory.json +231 -0
  8. package/deployments/localhost/CartesiMathV2.json +213 -0
  9. package/deployments/localhost/DAppAddressRelay.json +102 -0
  10. package/deployments/localhost/ERC1155BatchPortal.json +133 -0
  11. package/deployments/localhost/ERC1155SinglePortal.json +132 -0
  12. package/deployments/localhost/ERC20Portal.json +120 -0
  13. package/deployments/localhost/ERC721Portal.json +126 -0
  14. package/deployments/localhost/EtherPortal.json +121 -0
  15. package/deployments/localhost/HistoryFactory.json +177 -0
  16. package/deployments/localhost/InputBox.json +207 -0
  17. package/deployments/localhost/MerkleV2.json +217 -0
  18. package/deployments/localhost/SelfHostedApplicationFactory.json +226 -0
  19. package/deployments/localhost/TestMultiToken.json +829 -0
  20. package/deployments/localhost/TestNFT.json +891 -0
  21. package/deployments/localhost/TestToken.json +1079 -0
  22. package/deployments/localhost/UnrolledCordic.json +54 -0
  23. package/dist/deploy/01_token.js +15 -0
  24. package/dist/deploy/02_nft.js +15 -0
  25. package/dist/deploy/03_multitoken.js +15 -0
  26. package/dist/src/tasks/deploy-anvil.d.ts +6 -0
  27. package/dist/src/tasks/deploy-anvil.d.ts.map +1 -0
  28. package/dist/src/tasks/deploy-anvil.js +38 -0
  29. package/export/abi/localhost.json +3205 -0
  30. package/export/artifacts/@openzeppelin/contracts/access/Ownable.sol/Ownable.json +128 -0
  31. package/export/artifacts/@openzeppelin/contracts/access/manager/AccessManaged.sol/AccessManaged.json +137 -0
  32. package/export/artifacts/@openzeppelin/contracts/access/manager/AuthorityUtils.sol/AuthorityUtils.json +32 -0
  33. package/export/artifacts/@openzeppelin/contracts/access/manager/IAccessManaged.sol/IAccessManaged.json +133 -0
  34. package/export/artifacts/@openzeppelin/contracts/access/manager/IAccessManager.sol/IAccessManager.json +1251 -0
  35. package/export/artifacts/@openzeppelin/contracts/access/manager/IAuthority.sol/IAuthority.json +60 -0
  36. package/export/artifacts/@openzeppelin/contracts/interfaces/IERC4906.sol/IERC4906.json +401 -0
  37. package/export/artifacts/@openzeppelin/contracts/interfaces/IERC5267.sol/IERC5267.json +84 -0
  38. package/export/artifacts/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors.json +190 -0
  39. package/export/artifacts/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors.json +165 -0
  40. package/export/artifacts/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors.json +197 -0
  41. package/export/artifacts/@openzeppelin/contracts/token/ERC1155/ERC1155.sol/ERC1155.json +553 -0
  42. package/export/artifacts/@openzeppelin/contracts/token/ERC1155/IERC1155.sol/IERC1155.json +362 -0
  43. package/export/artifacts/@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol/IERC1155Receiver.json +156 -0
  44. package/export/artifacts/@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol/IERC1155MetadataURI.json +385 -0
  45. package/export/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json +436 -0
  46. package/export/artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.json +242 -0
  47. package/export/artifacts/@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol/ERC20Burnable.json +472 -0
  48. package/export/artifacts/@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol/ERC20Pausable.json +502 -0
  49. package/export/artifacts/@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol/ERC20Permit.json +695 -0
  50. package/export/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.json +293 -0
  51. package/export/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol/IERC20Permit.json +114 -0
  52. package/export/artifacts/@openzeppelin/contracts/token/ERC721/ERC721.sol/ERC721.json +595 -0
  53. package/export/artifacts/@openzeppelin/contracts/token/ERC721/IERC721.sol/IERC721.json +363 -0
  54. package/export/artifacts/@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol/IERC721Receiver.json +66 -0
  55. package/export/artifacts/@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol/ERC721URIStorage.json +630 -0
  56. package/export/artifacts/@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol/IERC721Metadata.json +421 -0
  57. package/export/artifacts/@openzeppelin/contracts/utils/Arrays.sol/Arrays.json +38 -0
  58. package/export/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.json +24 -0
  59. package/export/artifacts/@openzeppelin/contracts/utils/Nonces.sol/Nonces.json +73 -0
  60. package/export/artifacts/@openzeppelin/contracts/utils/Pausable.sol/Pausable.json +103 -0
  61. package/export/artifacts/@openzeppelin/contracts/utils/ShortStrings.sol/ShortStrings.json +55 -0
  62. package/export/artifacts/@openzeppelin/contracts/utils/StorageSlot.sol/StorageSlot.json +40 -0
  63. package/export/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.json +62 -0
  64. package/export/artifacts/@openzeppelin/contracts/utils/cryptography/ECDSA.sol/ECDSA.json +84 -0
  65. package/export/artifacts/@openzeppelin/contracts/utils/cryptography/EIP712.sol/EIP712.json +105 -0
  66. package/export/artifacts/@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol/MessageHashUtils.json +36 -0
  67. package/export/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.json +50 -0
  68. package/export/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.json +50 -0
  69. package/export/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.json +65 -0
  70. package/export/artifacts/@openzeppelin/contracts/utils/math/SafeCast.sol/SafeCast.json +173 -0
  71. package/export/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.json +36 -0
  72. package/export/artifacts/@openzeppelin/contracts/utils/types/Time.sol/Time.json +41 -0
  73. package/export/artifacts/contracts/TestMultiToken.sol/TestMultiToken.json +750 -0
  74. package/export/artifacts/contracts/TestNFT.sol/TestNFT.json +779 -0
  75. package/export/artifacts/contracts/TestToken.sol/TestToken.json +963 -0
  76. package/package.json +41 -0
@@ -0,0 +1,217 @@
1
+ {
2
+ "address": "0x33436035441927Df1a73FE3AAC5906854632e53d",
3
+ "abi": [
4
+ {
5
+ "inputs": [
6
+ {
7
+ "internalType": "bytes32[]",
8
+ "name": "hashes",
9
+ "type": "bytes32[]"
10
+ }
11
+ ],
12
+ "name": "calculateRootFromPowerOfTwo",
13
+ "outputs": [
14
+ {
15
+ "internalType": "bytes32",
16
+ "name": "",
17
+ "type": "bytes32"
18
+ }
19
+ ],
20
+ "stateMutability": "pure",
21
+ "type": "function"
22
+ },
23
+ {
24
+ "inputs": [
25
+ {
26
+ "internalType": "uint256",
27
+ "name": "_index",
28
+ "type": "uint256"
29
+ }
30
+ ],
31
+ "name": "getEmptyTreeHashAtIndex",
32
+ "outputs": [
33
+ {
34
+ "internalType": "bytes32",
35
+ "name": "",
36
+ "type": "bytes32"
37
+ }
38
+ ],
39
+ "stateMutability": "pure",
40
+ "type": "function"
41
+ },
42
+ {
43
+ "inputs": [
44
+ {
45
+ "internalType": "bytes",
46
+ "name": "_data",
47
+ "type": "bytes"
48
+ },
49
+ {
50
+ "internalType": "uint256",
51
+ "name": "_wordIndex",
52
+ "type": "uint256"
53
+ }
54
+ ],
55
+ "name": "getHashOfWordAtIndex",
56
+ "outputs": [
57
+ {
58
+ "internalType": "bytes32",
59
+ "name": "",
60
+ "type": "bytes32"
61
+ }
62
+ ],
63
+ "stateMutability": "pure",
64
+ "type": "function"
65
+ },
66
+ {
67
+ "inputs": [
68
+ {
69
+ "internalType": "bytes",
70
+ "name": "_data",
71
+ "type": "bytes"
72
+ },
73
+ {
74
+ "internalType": "uint256",
75
+ "name": "_log2Size",
76
+ "type": "uint256"
77
+ }
78
+ ],
79
+ "name": "getMerkleRootFromBytes",
80
+ "outputs": [
81
+ {
82
+ "internalType": "bytes32",
83
+ "name": "",
84
+ "type": "bytes32"
85
+ }
86
+ ],
87
+ "stateMutability": "pure",
88
+ "type": "function"
89
+ },
90
+ {
91
+ "inputs": [
92
+ {
93
+ "internalType": "uint256",
94
+ "name": "_position",
95
+ "type": "uint256"
96
+ },
97
+ {
98
+ "internalType": "uint256",
99
+ "name": "_logSizeOfReplacement",
100
+ "type": "uint256"
101
+ },
102
+ {
103
+ "internalType": "uint256",
104
+ "name": "_logSizeOfFullDrive",
105
+ "type": "uint256"
106
+ },
107
+ {
108
+ "internalType": "bytes32",
109
+ "name": "_replacement",
110
+ "type": "bytes32"
111
+ },
112
+ {
113
+ "internalType": "bytes32[]",
114
+ "name": "siblings",
115
+ "type": "bytes32[]"
116
+ }
117
+ ],
118
+ "name": "getRootAfterReplacementInDrive",
119
+ "outputs": [
120
+ {
121
+ "internalType": "bytes32",
122
+ "name": "",
123
+ "type": "bytes32"
124
+ }
125
+ ],
126
+ "stateMutability": "pure",
127
+ "type": "function"
128
+ }
129
+ ],
130
+ "transactionHash": "0xcd2b6bf648b423b33a022f0119ef23b5afff1ce7f2fc35ab0680e5d942fe50fb",
131
+ "receipt": {
132
+ "to": "0x914d7Fec6aaC8cd542e72Bca78B30650d45643d7",
133
+ "from": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
134
+ "contractAddress": null,
135
+ "transactionIndex": 0,
136
+ "gasUsed": "1267230",
137
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
138
+ "blockHash": "0x2a0b87dad2f39ad2882aad970ac2ce1076e37d55ed4946e6dca9cd87ac829318",
139
+ "transactionHash": "0xcd2b6bf648b423b33a022f0119ef23b5afff1ce7f2fc35ab0680e5d942fe50fb",
140
+ "logs": [],
141
+ "blockNumber": 5,
142
+ "cumulativeGasUsed": "1267230",
143
+ "status": 1,
144
+ "byzantium": true
145
+ },
146
+ "args": [],
147
+ "numDeployments": 1,
148
+ "bytecode": "0x6115e861003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100615760003560e01c806334bd712d14610066578063451a10551461008b57806379de46011461009e57806382b0eab8146100b1578063c84583a1146100c4575b600080fd5b610079610074366004610ad9565b6100d7565b60405190815260200160405180910390f35b610079610099366004610b51565b610229565b6100796100ac366004610b6a565b6102ba565b6100796100bf366004610c1b565b6104d0565b6100796100d2366004610ad9565b6106cb565b6000600382901b816100ea600883610cef565b9050848211156101365760405162461bcd60e51b8152602060048201526012602482015271776f7264206f7574206f6620626f756e647360701b60448201526064015b60405180910390fd5b8481116101795761014981838789610d08565b60405160200161015a929190610d32565b6040516020818303038152906040528051906020012092505050610222565b60408051600880825281830190925260009160208201818036833701905050905060006101a68488610d42565b905060005b818110156102135788886101bf8388610cef565b8181106101ce576101ce610d55565b9050013560f81c60f81b8382815181106101ea576101ea610d55565b60200101906001600160f81b031916908160001a9053508061020b81610d6b565b9150506101ab565b50508051602090910120925050505b9392505050565b600080610237836020610d84565b9050610244816020610cef565b6107a0101561028b5760405162461bcd60e51b8152602060048201526013602482015272696e646578206f7574206f6620626f756e647360681b604482015260640161012d565b600080604051806107c001604052806107a08152602001610e136107a091399290920160200151949350505050565b60008585101580156102cd575060038610155b80156102da575060408511155b6103445760405162461bcd60e51b815260206004820152603560248201527f33203c3d206c6f6753697a654f665265706c6163656d656e74203c3d206c6f6760448201527414da5e9953d9919d5b1b111c9a5d99480f0f480d8d605a1b606482015260840161012d565b600180871b9088906103569083610d42565b16156103a45760405162461bcd60e51b815260206004820152601760248201527f506f736974696f6e206973206e6f7420616c69676e6564000000000000000000604482015260640161012d565b6103ae8787610d42565b83146103fc5760405162461bcd60e51b815260206004820152601b60248201527f50726f6f66206c656e67746820646f6573206e6f74206d617463680000000000604482015260640161012d565b60005b838110156104c35781811b8916600003610464578585858381811061042657610426610d55565b90506020020135604051602001610447929190918252602082015260400190565b6040516020818303038152906040528051906020012095506104b1565b84848281811061047657610476610d55565b9050602002013586604051602001610498929190918252602082015260400190565b6040516020818303038152906040528051906020012095505b806104bb81610d6b565b9150506103ff565b5093979650505050505050565b805160405163d82ae4b160e01b815260009173B634F716BEd5Dd5A2b9a91C92474C499e50Cb27D9163d82ae4b19161050e9160040190815260200190565b602060405180830381865af415801561052b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054f9190610d9b565b61059b5760405162461bcd60e51b815260206004820152601860248201527f6172726179206c656e206e6f7420706f776572206f6620320000000000000000604482015260640161012d565b81516001036105c657816000815181106105b7576105b7610d55565b60200260200101519050919050565b600060018351901c67ffffffffffffffff8111156105e6576105e6610c05565b60405190808252806020026020018201604052801561060f578160200160208202803683370190505b50905060005b83518110156106c15783818151811061063057610630610d55565b6020026020010151848260016106469190610cef565b8151811061065657610656610d55565b6020026020010151604051602001610678929190918252602082015260400190565b6040516020818303038152906040528051906020012082600183901c815181106106a4576106a4610d55565b60209081029190910101526106ba600282610cef565b9050610615565b50610222816104d0565b6000600382101580156106df575060408211155b61072b5760405162461bcd60e51b815260206004820152601960248201527f72616e6765206f66206c6f673253697a653a205b332c36345d00000000000000604482015260640161012d565b600083900361074957610742610099600384610d42565b9050610222565b6000610756600384610d42565b6001901b9050600381901b8411156107b05760405162461bcd60e51b815260206004820152601960248201527f6461746120697320626967676572207468616e20647269766500000000000000604482015260640161012d565b6040516306c8e54b60e01b8152600385901c600482015260009073B634F716BEd5Dd5A2b9a91C92474C499e50Cb27D906306c8e54b90602401602060405180830381865af4158015610806573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082a9190610dbd565b610835906002610de0565b60ff16905060008167ffffffffffffffff81111561085557610855610c05565b60405190808252806020026020018201604052801561087e578160200160208202803683370190505b5090506000806000805b86841015610a7057600384901b8a11156108d9576108a78b8b866100d7565b8584815181106108b9576108b9610d55565b6020908102919091010152836108ce81610d6b565b94505083915061098a565b60405163052dcf5f60e31b81526004810185905273B634F716BEd5Dd5A2b9a91C92474C499e50Cb27D9063296e7af890602401602060405180830381865af4158015610929573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094d9190610df9565b905061095881610229565b85848151811061096a5761096a610d55565b60209081029190910101526109826001821b85610cef565b935083811c91505b8261099481610d6b565b9350505b81600116600003610a6b576000856109b1600186610d42565b815181106109c1576109c1610d55565b602002602001015190506000866002866109db9190610d42565b815181106109eb576109eb610d55565b602002602001015190508082604051602001610a11929190918252602082015260400190565b6040516020818303038152906040528051906020012087600287610a359190610d42565b81518110610a4557610a45610d55565b6020908102919091010152610a5b600186610d42565b9450600184901c93505050610998565b610888565b82600114610aae5760405162461bcd60e51b815260206004820152600b60248201526a39ba30b1b59032b93937b960a91b604482015260640161012d565b84600081518110610ac157610ac1610d55565b60200260200101519750505050505050509392505050565b600080600060408486031215610aee57600080fd5b833567ffffffffffffffff80821115610b0657600080fd5b818601915086601f830112610b1a57600080fd5b813581811115610b2957600080fd5b876020828501011115610b3b57600080fd5b6020928301989097509590910135949350505050565b600060208284031215610b6357600080fd5b5035919050565b60008060008060008060a08789031215610b8357600080fd5b86359550602087013594506040870135935060608701359250608087013567ffffffffffffffff80821115610bb757600080fd5b818901915089601f830112610bcb57600080fd5b813581811115610bda57600080fd5b8a60208260051b8501011115610bef57600080fd5b6020830194508093505050509295509295509295565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215610c2e57600080fd5b823567ffffffffffffffff80821115610c4657600080fd5b818501915085601f830112610c5a57600080fd5b813581811115610c6c57610c6c610c05565b8060051b604051601f19603f83011681018181108582111715610c9157610c91610c05565b604052918252848201925083810185019188831115610caf57600080fd5b938501935b82851015610ccd57843584529385019392850192610cb4565b98975050505050505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610d0257610d02610cd9565b92915050565b60008085851115610d1857600080fd5b83861115610d2557600080fd5b5050820193919092039150565b8183823760009101908152919050565b81810381811115610d0257610d02610cd9565b634e487b7160e01b600052603260045260246000fd5b600060018201610d7d57610d7d610cd9565b5060010190565b8082028115828204841417610d0257610d02610cd9565b600060208284031215610dad57600080fd5b8151801515811461022257600080fd5b600060208284031215610dcf57600080fd5b815160ff8116811461022257600080fd5b60ff8181168382160190811115610d0257610d02610cd9565b600060208284031215610e0b57600080fd5b505191905056fe011b4d03dd8c01f1049143cf9c4c817e4b167f1d1b83e5c6f0f10d89ba1e7bce4d9470a821fbe90117ec357e30bad9305732fb19ddf54a07dd3e29f440619254ae39ce8537aca75e2eff3e38c98011dfe934e700a0967732fc07b430dd656a233fc9a15f5b4869c872f81087bb6104b7d63e6f9ab47f2c43f3535eae7172aa7f17d2dd614cddaa4d879276b11e0672c9560033d3e8453a1d045339d34ba601b9c37b8b13ca95166fb7af16988a70fcc90f38bf9126fd833da710a47fb37a55e68e7a427fa943d9966b389f4f257173676090c6e95f43e2cb6d65f8758111e30930b0b9deb73e155c59740bacf14a6ff04b64bb8e201a506409c3fe381ca4ea90cd5deac729d0fdaccc441d09d7325f41586ba13c801b7eccae0f95d8f3933efed8b96e5b7f6f459e9cb6a2f41bf276c7b85c10cd4662c04cbbb365434726c0a0c9695393027fb106a8153109ac516288a88b28a93817899460d6310b71cf1e6163e8806fa0d4b197a259e8c3ac28864268159d0ac85f8581ca28fa7d2c0c03eb91e3eee5ca7a3da2b3053c9770db73599fb149f620e3facef95e947c0ee860b72122e31e4bbd2b7c783d79cc30f60c6238651da7f0726f767d22747264fdb046f7549f26cc70ed5e18baeb6c81bb0625cb95bb4019aeecd40774ee87ae29ec517a71f6ee264c5d761379b3d7d617ca83677374b49d10aec50505ac087408ca892b573c267a712a52e1d06421fe276a03efb1889f337201110fdc32a81f8e152499af665835aabfdc6740c7e2c3791a31c3cdc9f5ab962f681b12fc092816a62f27d86025599a41233848702f0cfc0437b445682df51147a632a0a083d2d38b5e13e466a8935afff58bb533b3ef5d27fba63ee6b0fd9e67ff20af9d50deee3f8bf065ec220c1fd4ba57e341261d55997f85d66d32152526736872693d2b437a233e2337b715f6ac9a6a272622fdc2d67fcfe1da3459f8dab4ed7e40a657a54c36766c5e8ac9a88b35b05c34747e6507f6b044ab66180dc76ac1a696de03189593fedc0d0dbbd855c8ead673544899b0960e4a5a7ca43b4ef90afe607de7698caefdc242788f654b57a4fb32a71b335ef6ff9a4cc118b282b53bdd6d6192b7a82c3c5126b9c7e33c8e5a5ac9738b8bd31247fb7402054f97b573e8abb9faad219f4fd085aceaa7f542d787ee4196d365f3cc566e7bbcfbfd451230c48d804c017d21e2d8fa914e2559bb72bf0ab78c8ab92f00ef0d0d576eccdd486b64138a4172674857e543d1d5b639058dd908186597e366ad5f3d9c7ceaff44d04d1550b8d33abc751df07437834ba5acb32328a396994aebb3c40f759c2d6d7a3cb5377e55d5d218ef5a296dda8ddc355f3f50c3d0b660a51dfa4d98a6a5a33564556cf83c1373a814641d6a1dcef97b883fee61bb84fe60a3409340217e629cc7e4dcc93b85d8820921ff5826148b60e6939acd7838e1d7f20562bff8ee4b5ec4a05ad997a57b9796fdcb2eda87883c2640b072b140b946bfdf6575cacc066fdae04f6951e63624cbd316a677cad529bbe4e97b9144e4bc06c4afd1de55dd3e1175f90423847a230d34dfb71ed56f2965a7f6c72e6aa33c24c303fd67745d632656c5ef90bec80f4f5d1daa251988826cef375c81c36bf457e09687056f924677cb0bccf98dff81e014ce25f2d132497923e267363963cdf4302c5049d63131dc03fd95f65d8b6aa5934f817252c028c90f56d413b9d5d10d89790707dae2fabb249f649929927c21dd71e3f656826de5451c5da375aadecbd59d5ebf3a31fae65ac1b316a1611f1b276b26530f58d7247df459ce1f86db1d734f6f811932f042cee45d0e455306d01081bc3384f82c5fb2aacaa19d89cdfa46cc916eac61121475ba2e6191b4feecbe1789717021a158ace5d06744b40f551076b67cd63af60007f8c99876e1424883a45ec49d497ddaf808a5521ca74a999ab0b3c7aa9c80f85e93977ec61ce68b20307a1a81f71ca645b568fcd319ccbb5f651e87b707d37c39e15f945ea69e2f7c7d2ccc85b7e654c07e96f0636ae4044fe0e38590b431795ad0f8647bdd613713ada493cc17efd313206380e6a685b8198475bbd021c6e9d94daab2214947127506073e44d5408ba166c512a0b86805d07f5a44d3c41706be2bc15e712e55805248b92e8677d90f6d284d1d6ffaff2c430657042a0e82624fa3717b06cc0a6fd12230ea586dae83019fb9e06034ed2803c98d554b93c9a52348cafff75c40174a91f9ae6b8647854a156029f0b88b83316663ce574a4978277bb6bb27a31085634b6ec78864b6d8201c7e93903d75815067e378289a3d072ae172dafa6a452470f8d645bebfad9779594fc0784bb764a22e3a8181d93db7bf97893c414217a618ccb14caa9e92e8c61673afc9583662e812adba1f87a9c68202d60e909efab43c42c0cb00695fc7f1ffe67c75ca894c3c51e1e5e731360199e600f6ced9a87b2a6a87e70bf251bb5075ab222138288164b2eda727515ea7de12e2496d4fe42ea8d1a120c03cf9c50622c2afe4acb0dad98fd62d07ab4e828a94495f6d1ab973982c7ccbe6c1fae02788e4422ae22282fa49cbdb04ba54a7a238c6fc41187451383460762c06d1c8a72b9cd718866ad4b689e10c9a8c38fe5ef045bd785b01e980fc82c7e3532ce81876b778dd9f1ceeba4478e86411fb6fdd790683916ca832592485093644e8760cd7b4c01dba1ccc82b661bf13f0e3f34acd6b88a2646970667358221220e20bef2e13cb0ad801148f5283a9b3a3e612170ed2d3e7e9ba5d171610f3d5e264736f6c63430008140033",
149
+ "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100615760003560e01c806334bd712d14610066578063451a10551461008b57806379de46011461009e57806382b0eab8146100b1578063c84583a1146100c4575b600080fd5b610079610074366004610ad9565b6100d7565b60405190815260200160405180910390f35b610079610099366004610b51565b610229565b6100796100ac366004610b6a565b6102ba565b6100796100bf366004610c1b565b6104d0565b6100796100d2366004610ad9565b6106cb565b6000600382901b816100ea600883610cef565b9050848211156101365760405162461bcd60e51b8152602060048201526012602482015271776f7264206f7574206f6620626f756e647360701b60448201526064015b60405180910390fd5b8481116101795761014981838789610d08565b60405160200161015a929190610d32565b6040516020818303038152906040528051906020012092505050610222565b60408051600880825281830190925260009160208201818036833701905050905060006101a68488610d42565b905060005b818110156102135788886101bf8388610cef565b8181106101ce576101ce610d55565b9050013560f81c60f81b8382815181106101ea576101ea610d55565b60200101906001600160f81b031916908160001a9053508061020b81610d6b565b9150506101ab565b50508051602090910120925050505b9392505050565b600080610237836020610d84565b9050610244816020610cef565b6107a0101561028b5760405162461bcd60e51b8152602060048201526013602482015272696e646578206f7574206f6620626f756e647360681b604482015260640161012d565b600080604051806107c001604052806107a08152602001610e136107a091399290920160200151949350505050565b60008585101580156102cd575060038610155b80156102da575060408511155b6103445760405162461bcd60e51b815260206004820152603560248201527f33203c3d206c6f6753697a654f665265706c6163656d656e74203c3d206c6f6760448201527414da5e9953d9919d5b1b111c9a5d99480f0f480d8d605a1b606482015260840161012d565b600180871b9088906103569083610d42565b16156103a45760405162461bcd60e51b815260206004820152601760248201527f506f736974696f6e206973206e6f7420616c69676e6564000000000000000000604482015260640161012d565b6103ae8787610d42565b83146103fc5760405162461bcd60e51b815260206004820152601b60248201527f50726f6f66206c656e67746820646f6573206e6f74206d617463680000000000604482015260640161012d565b60005b838110156104c35781811b8916600003610464578585858381811061042657610426610d55565b90506020020135604051602001610447929190918252602082015260400190565b6040516020818303038152906040528051906020012095506104b1565b84848281811061047657610476610d55565b9050602002013586604051602001610498929190918252602082015260400190565b6040516020818303038152906040528051906020012095505b806104bb81610d6b565b9150506103ff565b5093979650505050505050565b805160405163d82ae4b160e01b815260009173__$e74161300f6257ab2934e4b08c2b2efd56$__9163d82ae4b19161050e9160040190815260200190565b602060405180830381865af415801561052b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054f9190610d9b565b61059b5760405162461bcd60e51b815260206004820152601860248201527f6172726179206c656e206e6f7420706f776572206f6620320000000000000000604482015260640161012d565b81516001036105c657816000815181106105b7576105b7610d55565b60200260200101519050919050565b600060018351901c67ffffffffffffffff8111156105e6576105e6610c05565b60405190808252806020026020018201604052801561060f578160200160208202803683370190505b50905060005b83518110156106c15783818151811061063057610630610d55565b6020026020010151848260016106469190610cef565b8151811061065657610656610d55565b6020026020010151604051602001610678929190918252602082015260400190565b6040516020818303038152906040528051906020012082600183901c815181106106a4576106a4610d55565b60209081029190910101526106ba600282610cef565b9050610615565b50610222816104d0565b6000600382101580156106df575060408211155b61072b5760405162461bcd60e51b815260206004820152601960248201527f72616e6765206f66206c6f673253697a653a205b332c36345d00000000000000604482015260640161012d565b600083900361074957610742610099600384610d42565b9050610222565b6000610756600384610d42565b6001901b9050600381901b8411156107b05760405162461bcd60e51b815260206004820152601960248201527f6461746120697320626967676572207468616e20647269766500000000000000604482015260640161012d565b6040516306c8e54b60e01b8152600385901c600482015260009073__$e74161300f6257ab2934e4b08c2b2efd56$__906306c8e54b90602401602060405180830381865af4158015610806573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082a9190610dbd565b610835906002610de0565b60ff16905060008167ffffffffffffffff81111561085557610855610c05565b60405190808252806020026020018201604052801561087e578160200160208202803683370190505b5090506000806000805b86841015610a7057600384901b8a11156108d9576108a78b8b866100d7565b8584815181106108b9576108b9610d55565b6020908102919091010152836108ce81610d6b565b94505083915061098a565b60405163052dcf5f60e31b81526004810185905273__$e74161300f6257ab2934e4b08c2b2efd56$__9063296e7af890602401602060405180830381865af4158015610929573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094d9190610df9565b905061095881610229565b85848151811061096a5761096a610d55565b60209081029190910101526109826001821b85610cef565b935083811c91505b8261099481610d6b565b9350505b81600116600003610a6b576000856109b1600186610d42565b815181106109c1576109c1610d55565b602002602001015190506000866002866109db9190610d42565b815181106109eb576109eb610d55565b602002602001015190508082604051602001610a11929190918252602082015260400190565b6040516020818303038152906040528051906020012087600287610a359190610d42565b81518110610a4557610a45610d55565b6020908102919091010152610a5b600186610d42565b9450600184901c93505050610998565b610888565b82600114610aae5760405162461bcd60e51b815260206004820152600b60248201526a39ba30b1b59032b93937b960a91b604482015260640161012d565b84600081518110610ac157610ac1610d55565b60200260200101519750505050505050509392505050565b600080600060408486031215610aee57600080fd5b833567ffffffffffffffff80821115610b0657600080fd5b818601915086601f830112610b1a57600080fd5b813581811115610b2957600080fd5b876020828501011115610b3b57600080fd5b6020928301989097509590910135949350505050565b600060208284031215610b6357600080fd5b5035919050565b60008060008060008060a08789031215610b8357600080fd5b86359550602087013594506040870135935060608701359250608087013567ffffffffffffffff80821115610bb757600080fd5b818901915089601f830112610bcb57600080fd5b813581811115610bda57600080fd5b8a60208260051b8501011115610bef57600080fd5b6020830194508093505050509295509295509295565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215610c2e57600080fd5b823567ffffffffffffffff80821115610c4657600080fd5b818501915085601f830112610c5a57600080fd5b813581811115610c6c57610c6c610c05565b8060051b604051601f19603f83011681018181108582111715610c9157610c91610c05565b604052918252848201925083810185019188831115610caf57600080fd5b938501935b82851015610ccd57843584529385019392850192610cb4565b98975050505050505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610d0257610d02610cd9565b92915050565b60008085851115610d1857600080fd5b83861115610d2557600080fd5b5050820193919092039150565b8183823760009101908152919050565b81810381811115610d0257610d02610cd9565b634e487b7160e01b600052603260045260246000fd5b600060018201610d7d57610d7d610cd9565b5060010190565b8082028115828204841417610d0257610d02610cd9565b600060208284031215610dad57600080fd5b8151801515811461022257600080fd5b600060208284031215610dcf57600080fd5b815160ff8116811461022257600080fd5b60ff8181168382160190811115610d0257610d02610cd9565b600060208284031215610e0b57600080fd5b505191905056fe011b4d03dd8c01f1049143cf9c4c817e4b167f1d1b83e5c6f0f10d89ba1e7bce4d9470a821fbe90117ec357e30bad9305732fb19ddf54a07dd3e29f440619254ae39ce8537aca75e2eff3e38c98011dfe934e700a0967732fc07b430dd656a233fc9a15f5b4869c872f81087bb6104b7d63e6f9ab47f2c43f3535eae7172aa7f17d2dd614cddaa4d879276b11e0672c9560033d3e8453a1d045339d34ba601b9c37b8b13ca95166fb7af16988a70fcc90f38bf9126fd833da710a47fb37a55e68e7a427fa943d9966b389f4f257173676090c6e95f43e2cb6d65f8758111e30930b0b9deb73e155c59740bacf14a6ff04b64bb8e201a506409c3fe381ca4ea90cd5deac729d0fdaccc441d09d7325f41586ba13c801b7eccae0f95d8f3933efed8b96e5b7f6f459e9cb6a2f41bf276c7b85c10cd4662c04cbbb365434726c0a0c9695393027fb106a8153109ac516288a88b28a93817899460d6310b71cf1e6163e8806fa0d4b197a259e8c3ac28864268159d0ac85f8581ca28fa7d2c0c03eb91e3eee5ca7a3da2b3053c9770db73599fb149f620e3facef95e947c0ee860b72122e31e4bbd2b7c783d79cc30f60c6238651da7f0726f767d22747264fdb046f7549f26cc70ed5e18baeb6c81bb0625cb95bb4019aeecd40774ee87ae29ec517a71f6ee264c5d761379b3d7d617ca83677374b49d10aec50505ac087408ca892b573c267a712a52e1d06421fe276a03efb1889f337201110fdc32a81f8e152499af665835aabfdc6740c7e2c3791a31c3cdc9f5ab962f681b12fc092816a62f27d86025599a41233848702f0cfc0437b445682df51147a632a0a083d2d38b5e13e466a8935afff58bb533b3ef5d27fba63ee6b0fd9e67ff20af9d50deee3f8bf065ec220c1fd4ba57e341261d55997f85d66d32152526736872693d2b437a233e2337b715f6ac9a6a272622fdc2d67fcfe1da3459f8dab4ed7e40a657a54c36766c5e8ac9a88b35b05c34747e6507f6b044ab66180dc76ac1a696de03189593fedc0d0dbbd855c8ead673544899b0960e4a5a7ca43b4ef90afe607de7698caefdc242788f654b57a4fb32a71b335ef6ff9a4cc118b282b53bdd6d6192b7a82c3c5126b9c7e33c8e5a5ac9738b8bd31247fb7402054f97b573e8abb9faad219f4fd085aceaa7f542d787ee4196d365f3cc566e7bbcfbfd451230c48d804c017d21e2d8fa914e2559bb72bf0ab78c8ab92f00ef0d0d576eccdd486b64138a4172674857e543d1d5b639058dd908186597e366ad5f3d9c7ceaff44d04d1550b8d33abc751df07437834ba5acb32328a396994aebb3c40f759c2d6d7a3cb5377e55d5d218ef5a296dda8ddc355f3f50c3d0b660a51dfa4d98a6a5a33564556cf83c1373a814641d6a1dcef97b883fee61bb84fe60a3409340217e629cc7e4dcc93b85d8820921ff5826148b60e6939acd7838e1d7f20562bff8ee4b5ec4a05ad997a57b9796fdcb2eda87883c2640b072b140b946bfdf6575cacc066fdae04f6951e63624cbd316a677cad529bbe4e97b9144e4bc06c4afd1de55dd3e1175f90423847a230d34dfb71ed56f2965a7f6c72e6aa33c24c303fd67745d632656c5ef90bec80f4f5d1daa251988826cef375c81c36bf457e09687056f924677cb0bccf98dff81e014ce25f2d132497923e267363963cdf4302c5049d63131dc03fd95f65d8b6aa5934f817252c028c90f56d413b9d5d10d89790707dae2fabb249f649929927c21dd71e3f656826de5451c5da375aadecbd59d5ebf3a31fae65ac1b316a1611f1b276b26530f58d7247df459ce1f86db1d734f6f811932f042cee45d0e455306d01081bc3384f82c5fb2aacaa19d89cdfa46cc916eac61121475ba2e6191b4feecbe1789717021a158ace5d06744b40f551076b67cd63af60007f8c99876e1424883a45ec49d497ddaf808a5521ca74a999ab0b3c7aa9c80f85e93977ec61ce68b20307a1a81f71ca645b568fcd319ccbb5f651e87b707d37c39e15f945ea69e2f7c7d2ccc85b7e654c07e96f0636ae4044fe0e38590b431795ad0f8647bdd613713ada493cc17efd313206380e6a685b8198475bbd021c6e9d94daab2214947127506073e44d5408ba166c512a0b86805d07f5a44d3c41706be2bc15e712e55805248b92e8677d90f6d284d1d6ffaff2c430657042a0e82624fa3717b06cc0a6fd12230ea586dae83019fb9e06034ed2803c98d554b93c9a52348cafff75c40174a91f9ae6b8647854a156029f0b88b83316663ce574a4978277bb6bb27a31085634b6ec78864b6d8201c7e93903d75815067e378289a3d072ae172dafa6a452470f8d645bebfad9779594fc0784bb764a22e3a8181d93db7bf97893c414217a618ccb14caa9e92e8c61673afc9583662e812adba1f87a9c68202d60e909efab43c42c0cb00695fc7f1ffe67c75ca894c3c51e1e5e731360199e600f6ced9a87b2a6a87e70bf251bb5075ab222138288164b2eda727515ea7de12e2496d4fe42ea8d1a120c03cf9c50622c2afe4acb0dad98fd62d07ab4e828a94495f6d1ab973982c7ccbe6c1fae02788e4422ae22282fa49cbdb04ba54a7a238c6fc41187451383460762c06d1c8a72b9cd718866ad4b689e10c9a8c38fe5ef045bd785b01e980fc82c7e3532ce81876b778dd9f1ceeba4478e86411fb6fdd790683916ca832592485093644e8760cd7b4c01dba1ccc82b661bf13f0e3f34acd6b88a2646970667358221220e20bef2e13cb0ad801148f5283a9b3a3e612170ed2d3e7e9ba5d171610f3d5e264736f6c63430008140033",
150
+ "libraries": {
151
+ "CartesiMathV2": "0xB634F716BEd5Dd5A2b9a91C92474C499e50Cb27D"
152
+ },
153
+ "devdoc": {
154
+ "kind": "dev",
155
+ "methods": {
156
+ "calculateRootFromPowerOfTwo(bytes32[])": {
157
+ "params": {
158
+ "hashes": "The array containing power of 2 elements"
159
+ },
160
+ "returns": {
161
+ "_0": "byte32 the root hash being calculated"
162
+ }
163
+ },
164
+ "getEmptyTreeHashAtIndex(uint256)": {
165
+ "details": "first index is keccak(0), second index is keccak(keccak(0), keccak(0))",
166
+ "params": {
167
+ "_index": "of hash wanted"
168
+ }
169
+ },
170
+ "getHashOfWordAtIndex(bytes,uint256)": {
171
+ "details": "if word is incomplete (< 8 bytes) it gets padded with zeroes",
172
+ "params": {
173
+ "_data": "array of bytes",
174
+ "_wordIndex": "index of word inside the bytes to get the hash of"
175
+ }
176
+ },
177
+ "getMerkleRootFromBytes(bytes,uint256)": {
178
+ "details": "_data is padded with zeroes until is multiple of 8root is completed with zero tree until log2size is completehashes are taken word by word (8 bytes by 8 bytes)",
179
+ "params": {
180
+ "_data": "array of bytes to be merklelized",
181
+ "_log2Size": "log2 of total size of the drive"
182
+ }
183
+ },
184
+ "getRootAfterReplacementInDrive(uint256,uint256,uint256,bytes32,bytes32[])": {
185
+ "params": {
186
+ "_logSizeOfFullDrive": "log2 of size the full drive, which can be the entire machine",
187
+ "_logSizeOfReplacement": "log2 of size the replacement",
188
+ "_position": "position of _drive",
189
+ "_replacement": "hash of the replacement",
190
+ "siblings": "of replacement that merkle root can be calculated"
191
+ }
192
+ }
193
+ },
194
+ "version": 1
195
+ },
196
+ "userdoc": {
197
+ "kind": "user",
198
+ "methods": {
199
+ "calculateRootFromPowerOfTwo(bytes32[])": {
200
+ "notice": "Calculate the root of Merkle tree from an array of power of 2 elements"
201
+ },
202
+ "getEmptyTreeHashAtIndex(uint256)": {
203
+ "notice": "Gets precomputed hash of zero in empty tree hashes"
204
+ },
205
+ "getHashOfWordAtIndex(bytes,uint256)": {
206
+ "notice": "Get the hash of a word in an array of bytes"
207
+ },
208
+ "getMerkleRootFromBytes(bytes,uint256)": {
209
+ "notice": "get merkle root of generic array of bytes"
210
+ },
211
+ "getRootAfterReplacementInDrive(uint256,uint256,uint256,bytes32,bytes32[])": {
212
+ "notice": "Gets merkle root hash of drive with a replacement"
213
+ }
214
+ },
215
+ "version": 1
216
+ }
217
+ }
@@ -0,0 +1,226 @@
1
+ {
2
+ "address": "0x9E32e06Fd23675b2DF8eA8e6b0A25c3DF6a60AbC",
3
+ "abi": [
4
+ {
5
+ "inputs": [
6
+ {
7
+ "internalType": "contract IAuthorityHistoryPairFactory",
8
+ "name": "_authorityHistoryPairFactory",
9
+ "type": "address"
10
+ },
11
+ {
12
+ "internalType": "contract ICartesiDAppFactory",
13
+ "name": "_applicationFactory",
14
+ "type": "address"
15
+ }
16
+ ],
17
+ "stateMutability": "nonpayable",
18
+ "type": "constructor"
19
+ },
20
+ {
21
+ "inputs": [
22
+ {
23
+ "internalType": "address",
24
+ "name": "_authorityOwner",
25
+ "type": "address"
26
+ },
27
+ {
28
+ "internalType": "address",
29
+ "name": "_dappOwner",
30
+ "type": "address"
31
+ },
32
+ {
33
+ "internalType": "bytes32",
34
+ "name": "_templateHash",
35
+ "type": "bytes32"
36
+ },
37
+ {
38
+ "internalType": "bytes32",
39
+ "name": "_salt",
40
+ "type": "bytes32"
41
+ }
42
+ ],
43
+ "name": "calculateAddresses",
44
+ "outputs": [
45
+ {
46
+ "internalType": "address",
47
+ "name": "application_",
48
+ "type": "address"
49
+ },
50
+ {
51
+ "internalType": "address",
52
+ "name": "authority_",
53
+ "type": "address"
54
+ },
55
+ {
56
+ "internalType": "address",
57
+ "name": "history_",
58
+ "type": "address"
59
+ }
60
+ ],
61
+ "stateMutability": "view",
62
+ "type": "function"
63
+ },
64
+ {
65
+ "inputs": [
66
+ {
67
+ "internalType": "address",
68
+ "name": "_authorityOwner",
69
+ "type": "address"
70
+ },
71
+ {
72
+ "internalType": "address",
73
+ "name": "_dappOwner",
74
+ "type": "address"
75
+ },
76
+ {
77
+ "internalType": "bytes32",
78
+ "name": "_templateHash",
79
+ "type": "bytes32"
80
+ },
81
+ {
82
+ "internalType": "bytes32",
83
+ "name": "_salt",
84
+ "type": "bytes32"
85
+ }
86
+ ],
87
+ "name": "deployContracts",
88
+ "outputs": [
89
+ {
90
+ "internalType": "contract CartesiDApp",
91
+ "name": "application_",
92
+ "type": "address"
93
+ },
94
+ {
95
+ "internalType": "contract Authority",
96
+ "name": "authority_",
97
+ "type": "address"
98
+ },
99
+ {
100
+ "internalType": "contract History",
101
+ "name": "history_",
102
+ "type": "address"
103
+ }
104
+ ],
105
+ "stateMutability": "nonpayable",
106
+ "type": "function"
107
+ },
108
+ {
109
+ "inputs": [],
110
+ "name": "getApplicationFactory",
111
+ "outputs": [
112
+ {
113
+ "internalType": "contract ICartesiDAppFactory",
114
+ "name": "",
115
+ "type": "address"
116
+ }
117
+ ],
118
+ "stateMutability": "view",
119
+ "type": "function"
120
+ },
121
+ {
122
+ "inputs": [],
123
+ "name": "getAuthorityHistoryPairFactory",
124
+ "outputs": [
125
+ {
126
+ "internalType": "contract IAuthorityHistoryPairFactory",
127
+ "name": "",
128
+ "type": "address"
129
+ }
130
+ ],
131
+ "stateMutability": "view",
132
+ "type": "function"
133
+ }
134
+ ],
135
+ "transactionHash": "0x269011fbee495863d6d6093cb43af8eabc7268526e6312d12dc164e7536ab046",
136
+ "receipt": {
137
+ "to": "0x914d7Fec6aaC8cd542e72Bca78B30650d45643d7",
138
+ "from": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
139
+ "contractAddress": null,
140
+ "transactionIndex": 0,
141
+ "gasUsed": "298964",
142
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
143
+ "blockHash": "0x7bd59a13d92ab5e0f4f9be80687f8bf9ea12c7a96e0c0aa3fec37072694e97bd",
144
+ "transactionHash": "0x269011fbee495863d6d6093cb43af8eabc7268526e6312d12dc164e7536ab046",
145
+ "logs": [],
146
+ "blockNumber": 18,
147
+ "cumulativeGasUsed": "298964",
148
+ "status": 1,
149
+ "byzantium": true
150
+ },
151
+ "args": [
152
+ "0x3890A047Cf9Af60731E80B2105362BbDCD70142D",
153
+ "0x7122cd1221C20892234186facfE8615e6743Ab02"
154
+ ],
155
+ "numDeployments": 1,
156
+ "bytecode": "0x60c060405234801561001057600080fd5b5060405161053d38038061053d83398101604081905261002f9161005e565b6001600160a01b039182166080521660a052610098565b6001600160a01b038116811461005b57600080fd5b50565b6000806040838503121561007157600080fd5b825161007c81610046565b602084015190925061008d81610046565b809150509250929050565b60805160a0516104666100d76000396000818160e2015281816101dc015261032b015260008181605301528181610133015261028401526104666000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80633ae7e45e14610051578063b02b5e4414610090578063dbeab8a0146100cd578063e63d50ff146100e0575b600080fd5b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b6100a361009e36600461038c565b610106565b604080516001600160a01b0394851681529284166020840152921691810191909152606001610087565b6100a36100db36600461038c565b610257565b7f0000000000000000000000000000000000000000000000000000000000000000610073565b604051636b9f9a3d60e11b81526001600160a01b03858116600483015260248201839052600091829182917f00000000000000000000000000000000000000000000000000000000000000009091169063d73f347a9060440160408051808303816000875af115801561017d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101a191906103d2565b604051630e1a07f560e01b81526001600160a01b038084166004830152898116602483015260448201899052606482018890529294509092507f000000000000000000000000000000000000000000000000000000000000000090911690630e1a07f5906084016020604051808303816000875af1158015610227573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061024b919061040c565b92509450945094915050565b6040516339dcd45760e01b81526001600160a01b03858116600483015260248201839052600091829182917f0000000000000000000000000000000000000000000000000000000000000000909116906339dcd457906044016040805180830381865afa1580156102cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102f091906103d2565b60405163bd4f121960e01b81526001600160a01b038084166004830152898116602483015260448201899052606482018890529294509092507f00000000000000000000000000000000000000000000000000000000000000009091169063bd4f121990608401602060405180830381865afa158015610227573d6000803e3d6000fd5b6001600160a01b038116811461038957600080fd5b50565b600080600080608085870312156103a257600080fd5b84356103ad81610374565b935060208501356103bd81610374565b93969395505050506040820135916060013590565b600080604083850312156103e557600080fd5b82516103f081610374565b602084015190925061040181610374565b809150509250929050565b60006020828403121561041e57600080fd5b815161042981610374565b939250505056fea264697066735822122031bfd9110a4e367d5f98b448035b6db0472cebe854305d509547385279a5432b64736f6c63430008130033",
157
+ "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80633ae7e45e14610051578063b02b5e4414610090578063dbeab8a0146100cd578063e63d50ff146100e0575b600080fd5b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b6100a361009e36600461038c565b610106565b604080516001600160a01b0394851681529284166020840152921691810191909152606001610087565b6100a36100db36600461038c565b610257565b7f0000000000000000000000000000000000000000000000000000000000000000610073565b604051636b9f9a3d60e11b81526001600160a01b03858116600483015260248201839052600091829182917f00000000000000000000000000000000000000000000000000000000000000009091169063d73f347a9060440160408051808303816000875af115801561017d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101a191906103d2565b604051630e1a07f560e01b81526001600160a01b038084166004830152898116602483015260448201899052606482018890529294509092507f000000000000000000000000000000000000000000000000000000000000000090911690630e1a07f5906084016020604051808303816000875af1158015610227573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061024b919061040c565b92509450945094915050565b6040516339dcd45760e01b81526001600160a01b03858116600483015260248201839052600091829182917f0000000000000000000000000000000000000000000000000000000000000000909116906339dcd457906044016040805180830381865afa1580156102cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102f091906103d2565b60405163bd4f121960e01b81526001600160a01b038084166004830152898116602483015260448201899052606482018890529294509092507f00000000000000000000000000000000000000000000000000000000000000009091169063bd4f121990608401602060405180830381865afa158015610227573d6000803e3d6000fd5b6001600160a01b038116811461038957600080fd5b50565b600080600080608085870312156103a257600080fd5b84356103ad81610374565b935060208501356103bd81610374565b93969395505050506040820135916060013590565b600080604083850312156103e557600080fd5b82516103f081610374565b602084015190925061040181610374565b809150509250929050565b60006020828403121561041e57600080fd5b815161042981610374565b939250505056fea264697066735822122031bfd9110a4e367d5f98b448035b6db0472cebe854305d509547385279a5432b64736f6c63430008130033",
158
+ "devdoc": {
159
+ "kind": "dev",
160
+ "methods": {
161
+ "calculateAddresses(address,address,bytes32,bytes32)": {
162
+ "params": {
163
+ "_authorityOwner": "The initial authority owner",
164
+ "_dappOwner": "The initial DApp owner",
165
+ "_salt": "The salt used to deterministically generate the addresses",
166
+ "_templateHash": "The initial machine state hash"
167
+ },
168
+ "returns": {
169
+ "application_": "The application address",
170
+ "authority_": "The authority address",
171
+ "history_": "The history address"
172
+ }
173
+ },
174
+ "constructor": {
175
+ "params": {
176
+ "_applicationFactory": "The application factory",
177
+ "_authorityHistoryPairFactory": "The authority-history pair factory"
178
+ }
179
+ },
180
+ "deployContracts(address,address,bytes32,bytes32)": {
181
+ "params": {
182
+ "_authorityOwner": "The initial authority owner",
183
+ "_dappOwner": "The initial DApp owner",
184
+ "_salt": "The salt used to deterministically generate the addresses",
185
+ "_templateHash": "The initial machine state hash"
186
+ },
187
+ "returns": {
188
+ "application_": "The application contract",
189
+ "authority_": "The authority contract",
190
+ "history_": "The history contract"
191
+ }
192
+ },
193
+ "getApplicationFactory()": {
194
+ "returns": {
195
+ "_0": "The application factory"
196
+ }
197
+ },
198
+ "getAuthorityHistoryPairFactory()": {
199
+ "returns": {
200
+ "_0": "The authority-history pair factory"
201
+ }
202
+ }
203
+ },
204
+ "title": "Self-hosted Application Factory",
205
+ "version": 1
206
+ },
207
+ "userdoc": {
208
+ "kind": "user",
209
+ "methods": {
210
+ "calculateAddresses(address,address,bytes32,bytes32)": {
211
+ "notice": "Calculate the addresses of the application, authority and history contracts to be deployed deterministically."
212
+ },
213
+ "deployContracts(address,address,bytes32,bytes32)": {
214
+ "notice": "Deploy new application, authority and history contracts deterministically."
215
+ },
216
+ "getApplicationFactory()": {
217
+ "notice": "Get the factory used to deploy `CartesiDApp` contracts"
218
+ },
219
+ "getAuthorityHistoryPairFactory()": {
220
+ "notice": "Get the factory used to deploy `Authority` and `History` contracts"
221
+ }
222
+ },
223
+ "notice": "Allows anyone to reliably deploy a new Authority-History pair, along with a CartesiDApp contract already linked to it.",
224
+ "version": 1
225
+ }
226
+ }