Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bugfix] fix to huma mainnet deploy #970

Merged
merged 2 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions packages/core/src/config/validatenv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function validateEnv() {
devDefault: onlyOnTestEnv('xyz')
}),
IMPACT_MARKET_CONTRACT_BLOCK: num({ devDefault: 0 }),
ATTESTATION_PROXY_ADDRESS: str({ devDefault: onlyOnTestEnv('xyz') }),
ATTESTATION_PROXY_ADDRESS: str({ default: '0x0000000000000000000000000000000000000000' }),
// aws config
AWS_ACCESS_KEY_ID: str({ devDefault: onlyOnTestEnv('xyz') }),
AWS_SECRET_ACCESS_KEY: str({ devDefault: onlyOnTestEnv('xyz') }),
Expand All @@ -77,12 +77,12 @@ function validateEnv() {
SLACK_TOKEN: str({ default: 'xyz' }),
SLACK_LAMBDA_CHANNEL: str({ default: 'xyz' }),
SENDGRID_API_KEY: str({ default: 'xyz' }),
FIREBASE_FILE_BASE64: str({ devDefault: 'xyz' }),
FIREBASE_FILE_BASE64: str({ default: 'a0' }),
HAS_REDIS_TLS: bool({ default: true }),
MAX_REQUEST_PER_USER: num({ default: 900 }),
HUBSPOT_KEY: str({ devDefault: 'xyz' }),
DAO_CONTRACT_ADDRESS: str({ devDefault: onlyOnTestEnv('xyz') }),
COMMUNITY_ADMIN_ADDRESS: str({ devDefault: onlyOnTestEnv('xyz') }),
COMMUNITY_ADMIN_ADDRESS: str({ default: '0x0000000000000000000000000000000000000000' }),
MICROCREDIT_CONTRACT_ADDRESS: str({ devDefault: onlyOnTestEnv('xyz') }),
CLAIM_LOCATION_TIMEFRAME: num({ default: 150 }),
CLAIM_INACTIVITY_THRESHOLD: num({ default: 4 }),
Expand All @@ -102,7 +102,6 @@ function validateEnv() {
COUNCIL_SUBGRAPH_URL: str({ devDefault: onlyOnTestEnv('xyz') }),
MICROCREDIT_SUBGRAPH_URL: str({ devDefault: onlyOnTestEnv('xyz') }),
IMAGE_HANDLER_URL: str({ devDefault: onlyOnTestEnv('xyz') }),
LEARN_AND_EARN_PRIVATE_KEY: str({ devDefault: onlyOnTestEnv('xyz') }),
INTERVAL_BETWEEN_LESSONS: num({ default: 7 }),
DAYS_TO_LIMIT_USERS: num({ default: 30 }),
CRON_JOB_BATCH_SIZE: num({ default: 20 }),
Expand All @@ -122,8 +121,12 @@ function validateEnv() {
// hot wallet variables
HUMA_PRIVATE_KEY: str({ default: '0785969a6f070bce78c7259252413d3e5099e990c042b27c561d6af59c8e506e' }),
// wallets
// default keys are randomly generated on string generators
LEARN_AND_EARN_PRIVATE_KEY: str({
default: '3591c95d47c357aaec3dd1803cc0f2236e439366d69b19664a8e6b7a747ea0a2'
}),
RECURRING_DONATION_PRIVATE_KEY: str({
default: 'xg8rprh6vzjja31xx2b6db5wwo2i5gmcc37c239wyp6jhyiefapev5738nvj77c4'
default: '53c4687d6048f9e875049c36fdb466bd1a360e5e9a36965a1f5ff1d32ea45642'
})
});
}
Expand Down
2 changes: 2 additions & 0 deletions services/community-metrics/handler.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'cross-fetch/polyfill';
import {
calcuateCommunitiesDemographics,
calcuateCommunitiesMetrics,
Expand All @@ -13,6 +14,7 @@ import { verifyLazyAgenda } from './src/verifyLazyAgenda';

global.btoa = (str: string) => Buffer.from(str, 'binary').toString('base64');
global.atob = (str: string) => Buffer.from(str, 'base64').toString('binary');
global.fetch = require('node-fetch').default;

export const calculate = async (event, context) => {
const today = new Date();
Expand Down
11 changes: 5 additions & 6 deletions services/community-metrics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
"node": "18.x"
},
"dependencies": {
"@huma-finance/sdk": "0.0.44-beta.156",
"@huma-finance/shared": "0.0.43-beta.112",
"@huma-finance/sdk": "0.0.46",
"@huma-finance/shared": "0.0.46",
"@impactmarket/core": "1.0.0",
"ethers": "5.7.2"
"cross-fetch": "4.0.0",
"ethers": "5.7.2",
"node-fetch": "2.7.0"
},
"devDependencies": {
"serverless": "3.35.2",
Expand All @@ -24,8 +26,5 @@
"ts-loader": "9.4.1",
"webpack": "5.88.2",
"webpack-node-externals": "3.0.0"
},
"resolutions": {
"@huma-finance/shared": "0.0.43-beta.112"
}
}
Loading
Loading