Skip to content

Contribution

This page describes a general approach on how to write a new module and to share it with the community.

Before you start

Follow these steps to implement a new module:

  1. Read the architecture and develop documentation to get a comprehensive understanding
  2. Dive into smart contracts:
  3. Implement the logic
  4. Contact StaFi team if you have any questions
  5. Write documentation

Share your module

StaFi team have made it easy for every community member to participate in contribution. You are encouraged to share your module with a pull request to LSD Stack App. You should prepare these information:

  1. Name of your module
  2. A short description
  3. Resources about the module
  4. Documentation link

Below is an example pull request.

diff
# filename: interfaces/common.ts
export enum ModuleType {
+  Ccip = 'ccip',
}
# filename: interfaces/common.ts
export enum ModuleType {
+  Ccip = 'ccip',
}
diff
# filename: config/modular/index.ts

export const modularConfigs = {
  externalModules: [
+    {
+      type: ModuleType.Ccip,
+      title: 'Chainlink CCIP',
+      description:
+        'By seamlessly integrating Chainlink‘s robust and secure CCIP functions, this module empowers developers to build and operate dApps with cross-chain capabilities.',
+      externalLink: 'https://chain.link/cross-chain',
+      tutorialLink:
+        'https://lsaas-docs.stafi.io/docs/modules/ccip_modules.html',
+    },
  ],
  supportList: [
    [AppEco.Eth]: [
+      ModuleType.Ccip,
    ],
  ]
}
# filename: config/modular/index.ts

export const modularConfigs = {
  externalModules: [
+    {
+      type: ModuleType.Ccip,
+      title: 'Chainlink CCIP',
+      description:
+        'By seamlessly integrating Chainlink‘s robust and secure CCIP functions, this module empowers developers to build and operate dApps with cross-chain capabilities.',
+      externalLink: 'https://chain.link/cross-chain',
+      tutorialLink:
+        'https://lsaas-docs.stafi.io/docs/modules/ccip_modules.html',
+    },
  ],
  supportList: [
    [AppEco.Eth]: [
+      ModuleType.Ccip,
    ],
  ]
}