Skip to content

Commit

Permalink
mpDAO features progress & bugfixes (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
carina-akaia authored Nov 29, 2024
1 parent 2d1c7ae commit 9937856
Show file tree
Hide file tree
Showing 33 changed files with 1,763 additions and 305 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"shadcn",
"socialdb",
"SOURCECODE",
"stnear",
"svgr",
"typecheck",
"unocss",
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
"lint": "next lint",
"format": "yarn lint --fix ./",
"typecheck": "tsc --noEmit",
"generate:core-voting-contract-client": "near2ts ./src/common/contracts/core/voting/abi.json",
"generate:contract-clients": "concurrently 'yarn generate:core-voting-contract-client'",
"generate:api-clients": "orval --config api.config.cjs",
"generate:clients": "concurrently 'yarn generate:api-clients'",
"generate:css": "unocss 'src/**/*.tsx' --out-file=src/common/ui/styles/uno.generated.css --write-transformed",
Expand Down
48 changes: 29 additions & 19 deletions src/common/_config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,49 @@ export const {

contractMetadata: { version: CONTRACT_SOURCECODE_VERSION, repoUrl: CONTRACT_SOURCECODE_REPO_URL },

features: FEATURE_REGISTRY,
core: {
campaigns: {
contract: { accountId: CAMPAIGNS_CONTRACT_ACCOUNT_ID },
},

campaigns: {
contract: { accountId: CAMPAIGNS_CONTRACT_ACCOUNT_ID },
},
donation: {
contract: { accountId: DONATION_CONTRACT_ACCOUNT_ID },
},

deFi: {
refFinance: {
exchangeContract: { accountId: REF_EXCHANGE_CONTRACT_ACCOUNT_ID },
lists: {
contract: { accountId: LISTS_CONTRACT_ACCOUNT_ID },
},
},

donation: {
contract: { accountId: DONATION_CONTRACT_ACCOUNT_ID },
},
potFactory: {
contract: { accountId: POT_FACTORY_CONTRACT_ACCOUNT_ID },
},

lists: {
contract: { accountId: LISTS_CONTRACT_ACCOUNT_ID },
},
sybil: {
app: { url: SYBIL_APP_LINK_URL },
contract: { accountId: SYBIL_CONTRACT_ACCOUNT_ID },
},

potFactory: {
contract: { accountId: POT_FACTORY_CONTRACT_ACCOUNT_ID },
voting: {
contract: { accountId: VOTING_CONTRACT_ACCOUNT_ID },
},
},

social: {
app: { url: SOCIAL_APP_LINK_URL },
contract: { accountId: SOCIAL_CONTRACT_ACCOUNT_ID },
},

sybil: {
app: { url: SYBIL_APP_LINK_URL },
contract: { accountId: SYBIL_CONTRACT_ACCOUNT_ID },
deFi: {
metapool: {
liquidStakingContract: { accountId: METAPOOL_LIQUID_STAKING_CONTRACT_ACCOUNT_ID },
},

refFinance: {
exchangeContract: { accountId: REF_EXCHANGE_CONTRACT_ACCOUNT_ID },
},
},

features: FEATURE_REGISTRY,
} = getEnvConfig();

export const BLOCKCHAIN_EXPLORER_TX_ENDPOINT_URL =
Expand Down
88 changes: 50 additions & 38 deletions src/common/_config/production.env-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,59 +8,71 @@ export const envConfig: EnvConfig = {
repoUrl: "https://github.com/PotLock/core",
},

features: {
[FeatureId.DirectFtDonation]: {
id: FeatureId.DirectFtDonation,
name: "Direct FT donation",
indexer: {
api: { endpointUrl: "https://api.potlock.io" },
},

/**
* The implementation is not finished yet
*/
isEnabled: false,
core: {
campaigns: {
contract: { accountId: "campaigns.staging.potlock.near" },
},

[FeatureId.DirectNativeTokenDonation]: {
id: FeatureId.DirectNativeTokenDonation,
name: "Direct native token donation",
isEnabled: true,
donation: {
contract: { accountId: "donate.potlock.near" },
},
},

deFi: {
refFinance: {
exchangeContract: {
accountId: "v2.ref-finance.near",
},
lists: {
contract: { accountId: "lists.potlock.near" },
},
},

campaigns: {
contract: { accountId: "campaigns.staging.potlock.near" },
},

donation: {
contract: { accountId: "donate.potlock.near" },
},

lists: {
contract: { accountId: "lists.potlock.near" },
},
potFactory: {
contract: { accountId: "v1.potfactory.potlock.near" },
},

potFactory: {
contract: { accountId: "v1.potfactory.potlock.near" },
},
sybil: {
app: { url: "https://app.nada.bot" },
contract: { accountId: "v1.nadabot.near" },
},

sybil: {
app: { url: "https://app.nada.bot" },
contract: { accountId: "v1.nadabot.near" },
voting: {
contract: { accountId: "v1.voting.potlock.near" },
},
},

social: {
app: { url: "https://near.social" },
contract: { accountId: "social.near" },
},

indexer: {
api: { endpointUrl: "https://api.potlock.io" },
deFi: {
metapool: {
liquidStakingContract: {
accountId: "meta-pool.near",
},
},

refFinance: {
exchangeContract: {
accountId: "v2.ref-finance.near",
},
},
},

features: {
[FeatureId.DirectFtDonation]: {
id: FeatureId.DirectFtDonation,
name: "Direct FT donation",

/**
* The implementation is not finished yet
*/
isEnabled: false,
},

[FeatureId.DirectNativeTokenDonation]: {
id: FeatureId.DirectNativeTokenDonation,
name: "Direct native token donation",
isEnabled: true,
},
},
};
88 changes: 50 additions & 38 deletions src/common/_config/staging.env-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,59 +8,71 @@ export const envConfig: EnvConfig = {
repoUrl: "https://github.com/PotLock/core",
},

features: {
[FeatureId.DirectFtDonation]: {
id: FeatureId.DirectFtDonation,
name: "Direct FT donation",
indexer: {
api: { endpointUrl: "https://dev.potlock.io" },
},

/**
* The implementation is not finished yet
*/
isEnabled: false,
core: {
donation: {
contract: { accountId: "donate.staging.potlock.near" },
},

[FeatureId.DirectNativeTokenDonation]: {
id: FeatureId.DirectNativeTokenDonation,
name: "Direct native token donation",
isEnabled: true,
campaigns: {
contract: { accountId: "campaigns.staging.potlock.near" },
},
},

deFi: {
refFinance: {
exchangeContract: {
accountId: "v2.ref-finance.near",
},
lists: {
contract: { accountId: "lists.staging.potlock.near" },
},
},

donation: {
contract: { accountId: "donate.staging.potlock.near" },
},

campaigns: {
contract: { accountId: "campaigns.staging.potlock.near" },
},

lists: {
contract: { accountId: "lists.staging.potlock.near" },
},
potFactory: {
contract: { accountId: "potfactory.staging.potlock.near" },
},

potFactory: {
contract: { accountId: "potfactory.staging.potlock.near" },
},
sybil: {
app: { url: "https://staging.nada.bot" },
contract: { accountId: "v2new.staging.nadabot.near" },
},

sybil: {
app: { url: "https://staging.nada.bot" },
contract: { accountId: "v2new.staging.nadabot.near" },
voting: {
contract: { accountId: "v1.voting.potlock.near" },
},
},

social: {
app: { url: "https://near.social" },
contract: { accountId: "social.near" },
},

indexer: {
api: { endpointUrl: "https://dev.potlock.io" },
deFi: {
metapool: {
liquidStakingContract: {
accountId: "meta-pool.near",
},
},

refFinance: {
exchangeContract: {
accountId: "v2.ref-finance.near",
},
},
},

features: {
[FeatureId.DirectFtDonation]: {
id: FeatureId.DirectFtDonation,
name: "Direct FT donation",

/**
* The implementation is not finished yet
*/
isEnabled: false,
},

[FeatureId.DirectNativeTokenDonation]: {
id: FeatureId.DirectNativeTokenDonation,
name: "Direct native token donation",
isEnabled: true,
},
},
};
Loading

0 comments on commit 9937856

Please sign in to comment.