Skip to content

Commit

Permalink
fhenix new
Browse files Browse the repository at this point in the history
  • Loading branch information
terryli0095 committed Aug 16, 2024
1 parent bd6842c commit 4e1c385
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ const FHENIX_INFO_TEXT = {
"Users will be asked to verify that they have interacted with a Fhenix Faucet",
[TYPES.VERIFY_FHENIX_CONTRACTS_CREATED]:
"Users will be asked to verify how many contracts they've created on Fhenix.",
[TYPES.NEW_FHENIX_CONTRACTS_CREATED]
: "Users will be asked to verify how many contracts they've created on Fhenix.",
[TYPES.NEW_FHENIX_WALLET_GAS_USAGE]
: "Users will be asked to verify how much gas their wallet has used on Fhenix.",
[TYPES.NEW_FHENIX_GAS_CONSUMED_BY_CONTRACTS]
: "Users will be asked to verify how much gas their contracts have consumed on Fhenix.",
[TYPES.NEW_FHENIX_CONTRACTS_VERIFIED]
: "Users will be asked to verify how many contracts they've verified on Fhenix.",
};
const VerifyFhenixIntegrations = ({ error, ...rest }: Props) => {
return (
Expand Down
6 changes: 5 additions & 1 deletion wondrous-bot-admin/src/components/CreateTemplate/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ const processSteps = (steps) =>
next.type === TYPES.VERIFY_FHENIX_ACTIVE_WALLET ||
next.type === TYPES.VERIFY_FHENIX_CONTRACTS_CREATED ||
next.type === TYPES.VERIFY_FHENIX_FAUCET_INTERACTION ||
next.type === TYPES.VERIFY_FHENIX_WALLET_GAS_USAGE
next.type === TYPES.VERIFY_FHENIX_WALLET_GAS_USAGE ||
next.type === TYPES.NEW_FHENIX_CONTRACTS_CREATED ||
next.type === TYPES.NEW_FHENIX_WALLET_GAS_USAGE ||
next.type === TYPES.NEW_FHENIX_GAS_CONSUMED_BY_CONTRACTS ||
next.type === TYPES.NEW_FHENIX_CONTRACTS_VERIFIED
) {
step.prompt = next.value;
step["additionalData"] = {
Expand Down
4 changes: 4 additions & 0 deletions wondrous-bot-admin/src/utils/configComponents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ const FHENIX_INTEGRATIONS = {
[TYPES.VERIFY_FHENIX_CONTRACTS_CREATED]: VerifyFhenixIntegrations,
[TYPES.VERIFY_FHENIX_WALLET_GAS_USAGE]: VerifyFhenixIntegrations,
[TYPES.VERIFY_FHENIX_FAUCET_INTERACTION]: VerifyFhenixIntegrations,
[TYPES.NEW_FHENIX_CONTRACTS_CREATED]: VerifyFhenixIntegrations,
[TYPES.NEW_FHENIX_WALLET_GAS_USAGE]: VerifyFhenixIntegrations,
[TYPES.NEW_FHENIX_GAS_CONSUMED_BY_CONTRACTS]: VerifyFhenixIntegrations,
[TYPES.NEW_FHENIX_CONTRACTS_VERIFIED]: VerifyFhenixIntegrations,
};
export const CONFIG_COMPONENTS = {
[TYPES.TEXT_FIELD]: TextComponent,
Expand Down
42 changes: 34 additions & 8 deletions wondrous-bot-admin/src/utils/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ export const FHENIX_TYPES = {
VERIFY_FHENIX_ACTIVE_WALLET: "active_wallet",
};


export const FHENIX_NEW_TYPES = {
NEW_FHENIX_WALLET_GAS_USAGE: "fhenix_gas_usage",
NEW_FHENIX_CONTRACTS_CREATED: "fhenix_contract_created",
NEW_FHENIX_CONTRACTS_VERIFIED: "fhenix_contracts_verified",
NEW_FHENIX_GAS_CONSUMED_BY_CONTRACTS: "fhenix_gas_consumed_by_contracts",
};

export const APEIRON_ORG_ID = "98989259425317451";
export const TYPES = {
TEXT_FIELD: "text",
Expand Down Expand Up @@ -43,6 +51,7 @@ export const TYPES = {
VERIFY_GITCOIN_PASSPORT_SCORE: "verify_gitcoin_passport_score",
...APEIRON_TYPES,
...FHENIX_TYPES,
...FHENIX_NEW_TYPES,
};

export const CONFIG = [
Expand Down Expand Up @@ -427,21 +436,38 @@ const APEIRON_INTEGRATIONS = [

const FHENIX_INTEGRATIONS = [
{
label: "Verify Fhenix Wallet Gas Usage",
value: TYPES.VERIFY_FHENIX_WALLET_GAS_USAGE,
label: "Verify Fhenix Wallet Gas Usage",
value: TYPES.NEW_FHENIX_WALLET_GAS_USAGE,
},
{
label: "Verify Fhenix Wallet Faucet Interaction",
value: TYPES.VERIFY_FHENIX_FAUCET_INTERACTION,
label: "Verify Fhenix Gas Consumed by Contracts",
value: TYPES.NEW_FHENIX_GAS_CONSUMED_BY_CONTRACTS,
},
{
label: "Verify Fhenix Wallet Contracts Created",
value: TYPES.VERIFY_FHENIX_CONTRACTS_CREATED,
label: "Verify Fhenix Contracts Verified",
value: TYPES.NEW_FHENIX_CONTRACTS_VERIFIED,
},
{
label: "Verify Fhenix Wallet Active",
value: TYPES.VERIFY_FHENIX_ACTIVE_WALLET,
label: "Verify Fhenix Contracts Created",
value: TYPES.NEW_FHENIX_CONTRACTS_CREATED,
},

// {
// label: "Verify Fhenix Wallet Gas Usage",
// value: TYPES.VERIFY_FHENIX_WALLET_GAS_USAGE,
// },
// {
// label: "Verify Fhenix Wallet Faucet Interaction",
// value: TYPES.VERIFY_FHENIX_FAUCET_INTERACTION,
// },
// {
// label: "Verify Fhenix Wallet Contracts Created",
// value: TYPES.VERIFY_FHENIX_CONTRACTS_CREATED,
// },
// {
// label: "Verify Fhenix Wallet Active",
// value: TYPES.VERIFY_FHENIX_ACTIVE_WALLET,
// },
];
export const POKT_ORG_ID = import.meta.env.VITE_PRODUCTION ? "110964182503916540" : "89444950095167649";

Expand Down
6 changes: 5 additions & 1 deletion wondrous-bot-admin/src/utils/transformQuestConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,11 @@ export function transformQuestConfig(obj: InputQuestStep[]): OutputQuestStep[] {
step.type === TYPES.VERIFY_FHENIX_ACTIVE_WALLET ||
step.type === TYPES.VERIFY_FHENIX_CONTRACTS_CREATED ||
step.type === TYPES.VERIFY_FHENIX_FAUCET_INTERACTION ||
step.type === TYPES.VERIFY_FHENIX_WALLET_GAS_USAGE
step.type === TYPES.VERIFY_FHENIX_WALLET_GAS_USAGE||
step.type === TYPES.NEW_FHENIX_CONTRACTS_CREATED ||
step.type === TYPES.NEW_FHENIX_WALLET_GAS_USAGE ||
step.type === TYPES.NEW_FHENIX_GAS_CONSUMED_BY_CONTRACTS ||
step.type === TYPES.NEW_FHENIX_CONTRACTS_VERIFIED
) {
outputStep.value = step?.prompt;
} else if (step.type === TYPES.DATA_COLLECTION) {
Expand Down

0 comments on commit 4e1c385

Please sign in to comment.