Skip to content

Commit

Permalink
center Mermaid diagrams
Browse files Browse the repository at this point in the history
  • Loading branch information
radumojic committed Sep 29, 2023
1 parent 03b41a0 commit 9206651
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
13 changes: 0 additions & 13 deletions docs/developers/developer-reference/sc-contract-calls.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,17 +195,13 @@ contract_call.push_raw_argument(arg2_encoded);

Up to here we have created a contract call without payment, so an object of type `ContractCallNoPayment`, in the following ways:

<div style={{textAlign: 'center'}}>

```mermaid
graph LR
gen-proxy[Generated Proxy] --> ccnp[ContractCallNoPayment]
man-proxy[Manual Proxy] --> ccnp
ccnp-new["ContractCallNoPayment::new(to, function)"] --> ccnp
```

</div>

---

[comment]: # (mx-context-auto)
Expand Down Expand Up @@ -318,8 +314,6 @@ self.callee_contract_proxy(callee_sc_address)

To recap, these are all the various ways in which we can specify value transfers for a contract call:

<div style={{textAlign: 'center'}}>

```mermaid
graph LR
ccnp[ContractCallNoPayment]
Expand All @@ -331,8 +325,6 @@ graph LR
ccnp -->|".with_egld_or_single_esdt_transfer"| cc-egld-single[ContractCallWithEgldOrSingleEsdt]
```

</div>

---

[comment]: # (mx-context-auto)
Expand Down Expand Up @@ -725,9 +717,6 @@ It shares a lot in common with the contract calls, with these notable difference
- No ESDT transfers are allowed in `init`.
- They get executed slightly differently.


<div style={{textAlign: 'center'}}>

```mermaid
flowchart TB
gen-proxy[Generated Proxy] --> cc
Expand All @@ -741,8 +730,6 @@ flowchart TB
.deploy_from_source()"| exec-upg["⚙️ Upgrade contract"]
```

</div>

The object encoding these calls is called `ContractDeploy`. Unlike the contract calls, there is a single such object.

Creating this object is done in a similar fashion: either via proxies, or manually. Constructors in proxies naturally produce `ContractDeploy` objects:
Expand Down
8 changes: 8 additions & 0 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -290,3 +290,11 @@ h2.anchor code {
}

/* -------------------- End Markdown ------------------- */

/* ------------------- Start Mermaid ------------------- */

.docusaurus-mermaid-container {
text-align: center;
}

/* -------------------- End Mermaid ------------------- */

0 comments on commit 9206651

Please sign in to comment.