You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cookbook/cookbook.md
+171-5Lines changed: 171 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -208,7 +208,7 @@ When manually instantiating a network provider, you can provide a configuration
208
208
}
209
209
```
210
210
211
-
A full list of available methods for `ApiNetworkProvider` can be found [here](https://multiversx.github.io/mx-sdk-js-core/v14/classes/ApiNetworkProvider.html).
211
+
Here you can find a full list of available methods for [`ApiNetworkProvider`](https://multiversx.github.io/mx-sdk-js-core/v14/classes/ApiNetworkProvider.html).
212
212
213
213
Both `ApiNetworkProvider` and `ProxyNetworkProvider` implement a common interface, which can be found [here](https://multiversx.github.io/mx-sdk-js-core/v14/interfaces/INetworkProvider.html). This allows them to be used interchangeably.
214
214
@@ -1749,8 +1749,8 @@ For scripts or quick network interactions, we recommend using the controller. Ho
1749
1749
1750
1750
These are just a few examples of what you can do using the token management controller or factory. For a complete list of supported methods, please refer to the autogenerated documentation:
@@ -1997,8 +1997,8 @@ In this section, we'll cover how to:
1997
1997
- Undelegate and withdraw funds
1998
1998
1999
1999
These operations can be performed using both the controller and the **factory**. For a complete list of supported methods, please refer to the autogenerated documentation:
#### Creating a New Delegation Contract Using the Controller
2004
2004
```js
@@ -2613,6 +2613,172 @@ Flow for Creating Guarded Relayed Transactions:
2613
2613
4. Then, the guardian signs.
2614
2614
5. Finally, the relayer signs before broadcasting.
2615
2615
2616
+
### Governance
2617
+
2618
+
We can create transactions for creating a new governance proposal, vote for a proposal or query the governance contract.
2619
+
2620
+
These operations can be performed using both the **controller** and the **factory**. For a complete list of supported methods, please refer to the autogenerated documentation:
Unlike creating transactions, querying the contract is only possible using the controller. Let's query the contract to get more details about a proposal.
2770
+
2771
+
```js
2772
+
{
2773
+
// create the entrypoint and the governance controller
// These operations can be performed using both the controller and the **factory**. For a complete list of supported methods, please refer to the autogenerated documentation:
// We can create transactions for creating a new governance proposal, vote for a proposal or query the governance contract.
8
+
9
+
// These operations can be performed using both the **controller** and the **factory**. For a complete list of supported methods, please refer to the autogenerated documentation:
10
+
// - `class:GovernanceController`
11
+
// - `class:GovernanceTransactionsFactory`
12
+
13
+
// #### Creating a new proposal using the controller
14
+
// ```js
15
+
{
16
+
// create the entrypoint and the governance controller // md-as-comment
// Unlike creating transactions, querying the contract is only possible using the controller. Let's query the contract to get more details about a proposal.
159
+
160
+
// ```js
161
+
{
162
+
// create the entrypoint and the governance controller // md-as-comment
0 commit comments