11---
22id : application-factory
3- title : CartesiDAppFactory
3+ title : ApplicationFactory
44resources :
5- - url : https://github.com/cartesi/rollups-contracts/blob/v1.4 .0/onchain/rollups/ contracts/dapp/CartesiDAppFactory .sol
6- title : CartesiDAppFactory contract
5+ - url : https://github.com/cartesi/rollups-contracts/blob/prerelease/2.0 .0/contracts/dapp/ApplicationFactory .sol
6+ title : Application Factory contract
77---
88
9- The ** CartesiDAppFactory ** contract is a tool for reliably deploying new instances of the [ ` CartesiDApp ` ] ( ../json-rpc/application.md ) contract with or without a specified salt value for address derivation.
9+ The ** ApplicationFactory ** contract is a tool for reliably deploying new instances of the [ ` CartesiDApp ` ] ( ../json-rpc/application.md ) contract with or without a specified salt value for address derivation.
1010
1111Additionally, it provides a function to calculate the address of a potential new ` CartesiDApp ` contract based on input parameters.
1212
1313This contract ensures efficient and secure deployment of ` CartesiDApp ` contracts within the Cartesi Rollups framework.
1414
15-
16- ## ` newApplication() `
15+ ## ` newApplication() `
1716
1817``` solidity
19- function newApplication( IConsensus consensus, IInputBox inputBox, IPortal[] memory portals, address appOwner, bytes32 templateHash ) external returns (Application )
18+ function newApplication( IConsensus consensus, address appOwner, bytes32 templateHash) external override returns (IApplication )
2019```
2120
2221Deploys a new Application contract without specifying a salt value for address derivation.
@@ -28,15 +27,13 @@ Emits an `ApplicationCreated` event upon successful deployment.
2827| Name | Type | Description |
2928| ------------ | ---------- | ---------------------------------------- |
3029| consensus | IConsensus | Instance of the consensus interface |
31- | inputBox | IInputBox | Instance of the input box interface |
32- | portals | IPortal[ ] | Array of portal instances |
3330| appOwner | address | Address of the owner of the application |
3431| templateHash | bytes32 | Hash of the template for the application |
3532
3633## ` newApplication() ` (with salt)
3734
3835``` solidity
39- function newApplication(IConsensus consensus, IInputBox inputBox, IPortal[] memory portals, address appOwner, bytes32 templateHash, bytes32 salt) external returns (Application )
36+ function newApplication( IConsensus consensus, address appOwner, bytes32 templateHash, bytes32 salt ) external override returns (IApplication )
4037```
4138
4239Deploys a new ` Application ` contract with a specified salt value for address derivation.
@@ -48,16 +45,14 @@ Emits an `ApplicationCreated` event upon successful deployment.
4845| Name | Type | Description |
4946| ------------ | ---------- | ---------------------------------------- |
5047| consensus | IConsensus | Instance of the consensus interface |
51- | inputBox | IInputBox | Instance of the input box interface |
52- | portals | IPortal[ ] | Array of portal instances |
5348| appOwner | address | Address of the owner of the application |
5449| templateHash | bytes32 | Hash of the template for the application |
5550| salt | bytes32 | Salt value for address derivation |
5651
5752### ` calculateApplicationAddress() `
5853
5954``` solidity
60- function calculateApplicationAddress(IConsensus consensus,IInputBox inputBox,IPortal[] memory portals, address appOwner,bytes32 templateHash,bytes32 salt ) external view returns (address)
55+ function calculateApplicationAddress( IConsensus consensus, address appOwner, bytes32 templateHash, bytes32 salt ) external view override returns (address)
6156```
6257
6358Calculates the address of a potential new Application contract based on input parameters.
@@ -67,8 +62,6 @@ Calculates the address of a potential new Application contract based on input pa
6762| Name | Type | Description |
6863| ------------ | ---------- | ---------------------------------------- |
6964| consensus | IConsensus | Instance of the consensus interface |
70- | inputBox | IInputBox | Instance of the input box interface |
71- | portals | IPortal[ ] | Array of portal instances |
7265| appOwner | address | Address of the owner of the application |
7366| templateHash | bytes32 | Hash of the template for the application |
7467| salt | bytes32 | Salt value for address derivation |
0 commit comments