Loading The dApp Within Core

We need to enable and load the plugin in the correct network and process configurations of our Core framework. To accomplish this we need to follow the next two steps:

STEP 1: Load your dApp In The Corresponding Network Configurations

Go to: core/packages/core/bin/testnet

1cd packages/core/bin/config/testnet

Locate file app.json. We will add our plugin name to the list of the loaded plugins. This means that core will pickup the plugin/dapp and load it for a specific network configuration. Add line "@arkecosystem/custom-transactions": {}: to the file app.json file, so it looks something like this:

1......
2"core": {
3 "plugins": [
4 ......
5 {
6 "package": "@arkecosystem/core-transactions"
7 },
8 {
9 "package": "@arkecosystem/custom-transactions"
10 },
11 ......
12 ],
13},
14"relay": {
15 "plugins": [
16 ......
17 {
18 "package": "@arkecosystem/core-transactions"
19 },
20 {
21 "package": "@arkecosystem/custom-transactions"
22 },
23 ......
24 ],
25}
26......

Note that you will need to add the plugin under both core and relay keys, to have the custom transaction registered when you run a relay or a full node.

Repeat the process if needed for other network configurations (devnet, mainnet).

A fully working example is available for you to examine, learn and download here.

Now, let’s get the example running:

Custom Transactions - Running the Example

Last updated 3 years ago
Edit Page
Share: