Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
2442892
docs(api): graphql reference update
henriquemarlon Mar 31, 2025
4245d74
queries update
henriquemarlon Apr 3, 2025
2f79b1e
docs: more clear description and some broken links
henriquemarlon Apr 7, 2025
7123813
docs: add delegate call voucher docs
henriquemarlon Apr 8, 2025
2e20e38
docs: fix references for filters
henriquemarlon Apr 8, 2025
40942f9
docs: update inspect request reference
henriquemarlon Apr 8, 2025
ef9a998
docs:add reference for delegate call vouchers on vouchers section
henriquemarlon Apr 8, 2025
513c2d6
docs(api-reference): add exception and finish to backend
henriquemarlon Apr 8, 2025
311272d
docs(api-reference): chnage query for enum
henriquemarlon Apr 8, 2025
2c7ce31
docs(api-reference): add outputs on intro for backend apis
henriquemarlon Apr 9, 2025
fdeb09a
docs(api-reference): update info for finish endpoint
henriquemarlon Apr 9, 2025
3a2b099
docs: improve delegate call voucher description
henriquemarlon May 2, 2025
70085a6
docs: json-rpc api section
henriquemarlon May 2, 2025
f6ad69f
docs: improve description and references
henriquemarlon May 3, 2025
a2ab641
docs: improve description and references
henriquemarlon May 3, 2025
e2e1f8d
docs: fix sidebar
henriquemarlon May 3, 2025
cb76006
docs: update json-rpc api reference
henriquemarlon Jun 2, 2025
faa5d89
update contracts and json-rpc, consensus WIP
henriquemarlon Jun 26, 2025
70d855a
docs: modified development section images
Nonnyjoe Mar 16, 2025
2a9af27
docs: modified assets-handling section
Nonnyjoe Mar 16, 2025
1d02069
docs: modified building section in line with v2 updates
Nonnyjoe Mar 16, 2025
ce20e0c
docs: partial update to the cli command section
Nonnyjoe Mar 16, 2025
a4f2c66
docs: Modified graphQL queries and dapp reference in query section
Nonnyjoe Mar 16, 2025
cc2efe9
docs: updated send-inputs section in line with V2 updates
Nonnyjoe Mar 16, 2025
1bae824
docs: added page for managing devnet environment
Nonnyjoe Mar 18, 2025
88a509b
docs: modifying the deploying an app section
Nonnyjoe Mar 19, 2025
abfd8c7
docs: updated cli-commands section inline with cli2.0
Nonnyjoe Mar 20, 2025
8327fca
docs: updated broken links in tutorial section referencing changes in…
Nonnyjoe Mar 20, 2025
d00462b
docs: modified page title for building and deploying an application
Nonnyjoe Mar 20, 2025
0dcb171
docs: reflected first stage of reviews
Nonnyjoe Mar 21, 2025
2364000
docs: updated cli commands in line with cli-aplha-9
Nonnyjoe Apr 21, 2025
598800c
docs: updated api-reference
Nonnyjoe Jun 5, 2025
261dd53
docs: restructured development section
Nonnyjoe Jun 5, 2025
c0c556b
docs: Implemented reviews across development section
Nonnyjoe Jun 9, 2025
dfcf453
docs: Rebased on staging and fixed broken links
Nonnyjoe Jun 9, 2025
f431976
fixup! docs: Implemented reviews across development section
Nonnyjoe Jun 11, 2025
93a1f33
fixup! docs: Implemented reviews across development section
Nonnyjoe Jun 11, 2025
be35263
update delegatecall
henriquemarlon Aug 8, 2025
dbd18fe
removed espresso, added react tutorials and app-chains page
riseandshaheen Jun 16, 2025
5b37b15
added diagrams and minor improvements
riseandshaheen Jul 3, 2025
32e1cca
added spacing on big square image
jplgarcia Jul 3, 2025
61a23fa
update application contract and add consensus section
henriquemarlon Aug 8, 2025
19a5fa0
minor improvements and cosmetic changes
henriquemarlon Aug 10, 2025
d53b90f
fix: id correspondence
henriquemarlon Aug 10, 2025
c0e8f4b
fix: id correspondence
henriquemarlon Aug 10, 2025
e706427
revert golang version for delegate call voucher
henriquemarlon Aug 10, 2025
eeda77c
docs(development): Updated development section in line with updates o…
Nonnyjoe Aug 12, 2025
4f23ef6
feat: src files and deployment tutorial for local node deployment
henriquemarlon Aug 11, 2025
5b62820
feat: change link for compose file
henriquemarlon Aug 11, 2025
0d8a69e
minor improvements and snapshot section with gh actions example
henriquemarlon Aug 14, 2025
ba52c43
docs: update snapshot workflow description and minor updates on self-…
henriquemarlon Aug 21, 2025
38d86bb
Fraud Proofs Tab- Content
riseandshaheen Aug 25, 2025
5a93023
cosmetic updates and review comments updated content
riseandshaheen Aug 27, 2025
2025fdf
cosmetic updates, dapp to app, sidebar collapse set to true
riseandshaheen Aug 28, 2025
89dc09a
honeypot application logic corrections
riseandshaheen Sep 4, 2025
a3434fa
updates with review comments from lyno
riseandshaheen Sep 5, 2025
be1f5c4
Rename Computation-Hash-Rollups.jpg to computation-hash-rollups.jpg
riseandshaheen Sep 5, 2025
87da25a
minor updates
riseandshaheen Sep 8, 2025
0d72ce9
minor refinements
riseandshaheen Sep 8, 2025
6006da7
Default to 1.5, removed outdated commands from quickstart and removed…
riseandshaheen Sep 19, 2025
2a19563
Hide 2.0 docs from the dropdown version list
riseandshaheen Sep 24, 2025
d773053
Update vouchers.md
jplgarcia Sep 24, 2025
176b496
Update yarn.lock
jplgarcia Sep 24, 2025
d57f815
add: implemented a sidebar file for V2
Nonnyjoe Oct 10, 2024
c771681
update: Modified the Development folder for V2
Nonnyjoe Oct 10, 2024
233f8fc
fix: Handled error relating to broken links
Nonnyjoe Oct 11, 2024
75afc3f
docs: restructuring the api reference
henriquemarlon Oct 15, 2024
07de780
modified: overview & quickstart merged in side-bar
riseandshaheen Oct 14, 2024
4c80b73
docs: fix the reference for api-reference inside of getting-started
henriquemarlon Oct 15, 2024
232dd31
remapped pages
jplgarcia Nov 21, 2024
2a50f50
setting redirects
jplgarcia Nov 21, 2024
28dcf29
remapped pages
jplgarcia Nov 21, 2024
6fe7e35
setting redirects
jplgarcia Nov 21, 2024
c886534
add: implemented a sidebar file for V2
Nonnyjoe Oct 10, 2024
39cec73
update: Modified the Development folder for V2
Nonnyjoe Oct 10, 2024
1a7799c
fix: Handled error relating to broken links
Nonnyjoe Oct 11, 2024
758a451
update: modified application factory contract in line with V2.0
Nonnyjoe Nov 18, 2024
2091c4e
update: modified the different portals page in line with docs V2
Nonnyjoe Nov 18, 2024
e6ee997
mod: relayer page and also reference in sidebar
Nonnyjoe Nov 18, 2024
0f6cac2
mod: updated querry outputs inline with V2
Nonnyjoe Nov 25, 2024
bce0cf9
merge: merged Joao's restructure with V2 updates
Nonnyjoe Nov 25, 2024
6271a09
update: modified asssets-handling inline with V2
Nonnyjoe Nov 25, 2024
370f4a0
add: Added an external resource section
Nonnyjoe Nov 7, 2024
d092e49
update: restructured external resource position
Nonnyjoe Nov 7, 2024
51cf9eb
add: Added an external resource section
Nonnyjoe Nov 7, 2024
4f89c43
update: restructured external resource position
Nonnyjoe Nov 7, 2024
a22160c
update: added shour descriptions for different integratins
Nonnyjoe Nov 18, 2024
fd49071
add: added the integrations guide section
Nonnyjoe Nov 25, 2024
d86acd5
add: added the integrations guide section
Nonnyjoe Nov 25, 2024
f32e8e1
update on structure, spliting architecture concepts and installation …
jplgarcia Dec 9, 2024
0de5310
updated tutorials for v2
jplgarcia Dec 23, 2024
3d44eec
admonition
jorka Dec 2, 2024
12362e4
announcement bar
jorka Dec 2, 2024
2557be9
api item
jorka Dec 2, 2024
a9fe9ee
edit this page, custom icons
jorka Dec 9, 2024
cd4341d
footer
jorka Dec 10, 2024
284ed72
edit icon fix
jorka Dec 11, 2024
7e276ff
edit icon fix
jorka Dec 11, 2024
92ef5d8
remove console log
jorka Dec 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ An **Advance** request involves sending input data to the base layer via JSON-RP

In the dApp architecture, here is how an advance request plays out.

- Step 1: Send an input to the [`addInput(address, bytes)`](../contracts/input-box.md#addinput) function of the InputBox smart contract.
- Step 1: Send an input to the [`addInput(address, bytes)`](../json-rpc/input-box.md) function of the InputBox smart contract.

- Step 2: The HTTP Rollups Server reads the data and gives it to the Cartesi machine for processing.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,22 @@ async function handle_advance(data) {
<pre><code>

```python
# Notice creation Process from a message string
def emit_notice(message):
notice_payload = {"payload": "0x" + message.encode("utf-8").hex()}
response = requests.post(rollup_server + "/notice", json=notice_payload)
if response.status_code == 200 or response.status_code == 201:
logger.info(f"Notice emitted successfully with data: {notice_payload}")
else:
logger.error(f"Failed to emit Notice with data: {notice_payload}. Status code: {response.status_code}")

emit_notice("hello world")
def handle_advance(data):
logger.info(f"Received advance request data {data}")

status = "accept"
try:
inputPayload = data["payload"]
# Send the input payload as a notice
response = requests.post(
rollup_server + "/notice", json={"payload": inputPayload}
)
logger.info(
f"Received notice status {response.status_code} body {response.content}"
)
except Exception as e:
# Emit report with error message here
return status
```

</code></pre>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The voucher explicitly specifies the action that the dApp intends to execute on

For instance, in a DeFi application built on Cartesi, users may want to swap one token for another. The dApp generates a voucher that authorizes the on-chain smart contract to execute the swap on the user's behalf.

The [`CartesiDApp`](../contracts/application.md) contract is crucial in validating and executing the received voucher on the blockchain. This execution process occurs through the [`executeVoucher()`](../contracts/application.md/#executevoucher) function, ensuring that the action specified in the voucher is legitimate and authorized.
The [`CartesiDApp`](../json-rpc/application.md) contract is crucial in validating and executing the received voucher on the blockchain. This execution process occurs through the [`executeVoucher()`](../json-rpc/application.md/#executevoucher) function, ensuring that the action specified in the voucher is legitimate and authorized.

The result of the voucher execution is recorded on the base layer. This recording typically involves submitting claims by a consensus contract, ensuring the integrity and transparency of the executed on-chain action.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
id: application-factory
title: ApplicationFactory
resources:
- url: https://github.com/cartesi/rollups-contracts/blob/prerelease/2.0.0/contracts/dapp/ApplicationFactory.sol
- url: https://github.com/cartesi/rollups-contracts/tree/v2.0.1/src/dapp/ApplicationFactory.sol
title: Application Factory contract
---

Expand All @@ -12,62 +12,118 @@ Additionally, it provides a function to calculate the address of a potential new

This contract ensures efficient and secure deployment of `Application` contracts within the Cartesi Rollups framework.

## `newApplication()`
## Functions

### `newApplication()`

```solidity
function newApplication( IConsensus consensus, address appOwner, bytes32 templateHash) external override returns (IApplication)
function newApplication(
IOutputsMerkleRootValidator outputsMerkleRootValidator,
address appOwner,
bytes32 templateHash,
bytes calldata dataAvailability
) external override returns (IApplication)
```

Deploys a new Application contract without specifying a salt value for address derivation.
Deploys a new Application contract without a salt value for address derivation.

**Parameters**

Emits an `ApplicationCreated` event upon successful deployment.
| Name | Type | Description |
|------|------|-------------|
| `outputsMerkleRootValidator` | `IOutputsMerkleRootValidator` | The initial outputs Merkle root validator contract |
| `appOwner` | `address` | Address of the owner of the application |
| `templateHash` | `bytes32` | Hash of the template for the application |
| `dataAvailability` | `bytes` | The data availability solution |

#### Parameters
**Return Values**

| Name | Type | Description |
| ------------ | ---------- | ---------------------------------------- |
| consensus | IConsensus | Instance of the consensus interface |
| appOwner | address | Address of the owner of the application |
| templateHash | bytes32 | Hash of the template for the application |
| Name | Type | Description |
|------|------|-------------|
| `[0]` | `IApplication` | The deployed Application contract |

## `newApplication()`(with salt)
### `newApplication()` (with salt)

```solidity
function newApplication( IConsensus consensus, address appOwner, bytes32 templateHash, bytes32 salt ) external override returns (IApplication)
function newApplication(
IOutputsMerkleRootValidator outputsMerkleRootValidator,
address appOwner,
bytes32 templateHash,
bytes calldata dataAvailability,
bytes32 salt
) external override returns (IApplication)
```

Deploys a new `Application` contract with a specified salt value for address derivation.

Emits an `ApplicationCreated` event upon successful deployment.
**Parameters**

| Name | Type | Description |
|------|------|-------------|
| `outputsMerkleRootValidator` | `IOutputsMerkleRootValidator` | The initial outputs Merkle root validator contract |
| `appOwner` | `address` | Address of the owner of the application |
| `templateHash` | `bytes32` | Hash of the template for the application |
| `dataAvailability` | `bytes` | The data availability solution |
| `salt` | `bytes32` | Salt value for address derivation |

#### Parameters
**Return Values**

| Name | Type | Description |
| ------------ | ---------- | ---------------------------------------- |
| consensus | IConsensus | Instance of the consensus interface |
| appOwner | address | Address of the owner of the application |
| templateHash | bytes32 | Hash of the template for the application |
| salt | bytes32 | Salt value for address derivation |
| Name | Type | Description |
|------|------|-------------|
| `[0]` | `IApplication` | The deployed Application contract |

### `calculateApplicationAddress()`

```solidity
function calculateApplicationAddress( IConsensus consensus, address appOwner, bytes32 templateHash, bytes32 salt ) external view override returns (address)
function calculateApplicationAddress(
IOutputsMerkleRootValidator outputsMerkleRootValidator,
address appOwner,
bytes32 templateHash,
bytes calldata dataAvailability,
bytes32 salt
) external view override returns (address)
```

Calculates the address of a potential new Application contract based on input parameters.

#### Parameters
**Parameters**

| Name | Type | Description |
|------|------|-------------|
| `outputsMerkleRootValidator` | `IOutputsMerkleRootValidator` | The initial outputs Merkle root validator contract |
| `appOwner` | `address` | Address of the owner of the application |
| `templateHash` | `bytes32` | Hash of the template for the application |
| `dataAvailability` | `bytes` | The data availability solution |
| `salt` | `bytes32` | Salt value for address derivation |

**Return Values**

| Name | Type | Description |
|------|------|-------------|
| `[0]` | `address` | Address of the potential new Application contract |

## Events

### `ApplicationCreated()`

```solidity
event ApplicationCreated(
IOutputsMerkleRootValidator outputsMerkleRootValidator,
address appOwner,
bytes32 templateHash,
bytes dataAvailability,
IApplication appContract
)
```

| Name | Type | Description |
| ------------ | ---------- | ---------------------------------------- |
| consensus | IConsensus | Instance of the consensus interface |
| appOwner | address | Address of the owner of the application |
| templateHash | bytes32 | Hash of the template for the application |
| salt | bytes32 | Salt value for address derivation |
A new Application contract was deployed.

#### Returns
**Parameters**

| Type | Description |
| ------- | ------------------------------------------------- |
| address | Address of the potential new Application contract |
| Name | Type | Description |
|------|------|-------------|
| `outputsMerkleRootValidator` | `IOutputsMerkleRootValidator` | The outputs Merkle root validator contract |
| `appOwner` | `address` | The owner of the application |
| `templateHash` | `bytes32` | The template hash |
| `dataAvailability` | `bytes` | The data availability solution |
| `appContract` | `IApplication` | The deployed Application contract |
Loading
Loading