backend, slight refactor; we already had a wallet available to export
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 29s Details

This commit is contained in:
Ladd Hoffman 2024-04-30 19:22:55 -05:00
parent 62741ead01
commit b3371c84d9
26 changed files with 110 additions and 70 deletions

View File

@ -1,14 +1,14 @@
{
"localhost": {
"DAO": "0x3287061aDCeE36C1aae420a06E4a5EaE865Fe3ce",
"Work1": "0x76Dfe9F47f06112a1b78960bf37d87CfbB6D6133",
"Onboarding": "0xd2845aE812Ee42cF024fB4C55c052365792aBd78",
"Proposals": "0x8688E736D0D72161db4D25f68EF7d0EE4856ba19",
"Rollup": "0x8BDA04936887cF11263B87185E4D19e8158c6296",
"Work2": "0xf15aCe29E5e3e4bb31FCddF2C65DF7C440449a57",
"Reputation": "0xC0f00E5915F9abE6476858fD1961EAf79395ea64",
"Forum": "0x3734B0944ea37694E85AEF60D5b256d19EDA04be",
"Bench": "0x71cb20D63576a0Fa4F620a2E96C73F82848B09e1"
"DAO": "0x21E65E57a2F7DF8B85E0F59b57afc024595dD833",
"Work1": "0x0686417a476C37701734dd405e381b7d9B247d22",
"Onboarding": "0x495c5AF3fD0B1c2bA3e959f11A48d6FC8C246633",
"Proposals": "0x43e45a19FAD2932D08c8D9B07f6830d1250DA71D",
"Rollup": "0x5E614c4d8C956A937e4a6acC6a9459CAAE193feA",
"Work2": "0xE3CC69EF45312959F9F752C971C35F553a165559",
"Reputation": "0xb8C047c11eF88A02cd2C706120ef27D67586785a",
"Forum": "0xdAA95487F0027C67473A4A560dD6628c49d218A9",
"Bench": "0x05d4aE5d0097d47C9FcC0191d7f68F175a8122Db"
},
"sepolia": {
"DAO": "0x8e5bd58B2ca8910C5F9be8de847d6883B15c60d2",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,14 +1,12 @@
const { getClient } = require('../matrix-bot');
const { matrixUserToAuthorAddress } = require('../util/db');
const write = require('../util/forum/write');
const { dao } = require('../util/contracts');
const { dao, wallet } = require('../util/contracts');
const {
ETH_NETWORK,
} = process.env;
const wallet = require('../util/wallet');
const addPostWithRetry = async (authors, hash, citations, retryDelay = 5000) => {
try {
await dao.addPost(authors, hash, citations);

View File

@ -72,8 +72,8 @@ const getOrCreateAuthors = async (paper) => Promise.mapSeries(
// Generate and store a new account
const id = crypto.randomBytes(32).toString('hex');
authorPrivKey = `0x${id}`;
const wallet = new ethers.Wallet(authorPrivKey);
authorAddress = wallet.address;
const authorWallet = new ethers.Wallet(authorPrivKey);
authorAddress = authorWallet.address;
await authorAddresses.put(authorId, authorAddress);
await authorPrivKeys.put(authorAddress, authorPrivKey);
}

View File

@ -1,9 +1,8 @@
const Promise = require('bluebird');
const { dao } = require('../util/contracts');
const { dao, wallet } = require('../util/contracts');
const read = require('../util/forum/read');
const gateByProposal = require('../util/gate-by-proposal');
const wallet = require('../util/wallet');
const {
ENABLE_STAKING,

View File

@ -29,6 +29,7 @@ const getProvider = () => {
const wallet = new ethers.Wallet(ETH_PRIVATE_KEY, getProvider());
module.exports = {
wallet,
getProvider,
dao: new ethers.Contract(
getContractAddressByNetworkName(ETH_NETWORK, 'DAO'),

View File

@ -1,14 +1,14 @@
{
"localhost": {
"DAO": "0x3287061aDCeE36C1aae420a06E4a5EaE865Fe3ce",
"Work1": "0x76Dfe9F47f06112a1b78960bf37d87CfbB6D6133",
"Onboarding": "0xd2845aE812Ee42cF024fB4C55c052365792aBd78",
"Proposals": "0x8688E736D0D72161db4D25f68EF7d0EE4856ba19",
"Rollup": "0x8BDA04936887cF11263B87185E4D19e8158c6296",
"Work2": "0xf15aCe29E5e3e4bb31FCddF2C65DF7C440449a57",
"Reputation": "0xC0f00E5915F9abE6476858fD1961EAf79395ea64",
"Forum": "0x3734B0944ea37694E85AEF60D5b256d19EDA04be",
"Bench": "0x71cb20D63576a0Fa4F620a2E96C73F82848B09e1"
"DAO": "0x21E65E57a2F7DF8B85E0F59b57afc024595dD833",
"Work1": "0x0686417a476C37701734dd405e381b7d9B247d22",
"Onboarding": "0x495c5AF3fD0B1c2bA3e959f11A48d6FC8C246633",
"Proposals": "0x43e45a19FAD2932D08c8D9B07f6830d1250DA71D",
"Rollup": "0x5E614c4d8C956A937e4a6acC6a9459CAAE193feA",
"Work2": "0xE3CC69EF45312959F9F752C971C35F553a165559",
"Reputation": "0xb8C047c11eF88A02cd2C706120ef27D67586785a",
"Forum": "0xdAA95487F0027C67473A4A560dD6628c49d218A9",
"Bench": "0x05d4aE5d0097d47C9FcC0191d7f68F175a8122Db"
},
"sepolia": {
"DAO": "0x8e5bd58B2ca8910C5F9be8de847d6883B15c60d2",

View File

@ -265,6 +265,10 @@ contract DAO {
return forum.postCount();
}
function postIds(uint postIndex) public view returns (string memory) {
return forum.postIds(postIndex);
}
function getPostAuthors(
string calldata postId
) public view returns (Author[] memory) {

View File

@ -1,14 +1,14 @@
{
"localhost": {
"DAO": "0x3287061aDCeE36C1aae420a06E4a5EaE865Fe3ce",
"Work1": "0x76Dfe9F47f06112a1b78960bf37d87CfbB6D6133",
"Onboarding": "0xd2845aE812Ee42cF024fB4C55c052365792aBd78",
"Proposals": "0x8688E736D0D72161db4D25f68EF7d0EE4856ba19",
"Rollup": "0x8BDA04936887cF11263B87185E4D19e8158c6296",
"Work2": "0xf15aCe29E5e3e4bb31FCddF2C65DF7C440449a57",
"Reputation": "0xC0f00E5915F9abE6476858fD1961EAf79395ea64",
"Forum": "0x3734B0944ea37694E85AEF60D5b256d19EDA04be",
"Bench": "0x71cb20D63576a0Fa4F620a2E96C73F82848B09e1"
"DAO": "0x21E65E57a2F7DF8B85E0F59b57afc024595dD833",
"Work1": "0x0686417a476C37701734dd405e381b7d9B247d22",
"Onboarding": "0x495c5AF3fD0B1c2bA3e959f11A48d6FC8C246633",
"Proposals": "0x43e45a19FAD2932D08c8D9B07f6830d1250DA71D",
"Rollup": "0x5E614c4d8C956A937e4a6acC6a9459CAAE193feA",
"Work2": "0xE3CC69EF45312959F9F752C971C35F553a165559",
"Reputation": "0xb8C047c11eF88A02cd2C706120ef27D67586785a",
"Forum": "0xdAA95487F0027C67473A4A560dD6628c49d218A9",
"Bench": "0x05d4aE5d0097d47C9FcC0191d7f68F175a8122Db"
},
"sepolia": {
"DAO": "0x8e5bd58B2ca8910C5F9be8de847d6883B15c60d2",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long