deploy
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 36s Details

This commit is contained in:
Ladd Hoffman 2024-03-17 13:24:49 -05:00
parent 1e67f80808
commit 14d80bf1d5
6 changed files with 14 additions and 14 deletions

View File

@ -11,11 +11,10 @@ import Row from 'react-bootstrap/Row';
import Col from 'react-bootstrap/Col';
import Stack from 'react-bootstrap/Stack';
import DAOArtifact from 'contract-config/DAO.json';
import work1Artifact from 'contract-config/Work1.json';
import { getContractByChainId } from './contract-config';
import Web3Context from './Web3Context';
import DAOArtifact from './assets/DAO.json';
import work1Artifact from './assets/Work1.json';
import AvailabilityStakes from './AvailabilityStakes';
import WorkRequests from './WorkRequests';
@ -231,9 +230,10 @@ function App() {
fetchReputation();
});
work1Contract.events.WorkAssigned({ fromBlock: 'latest' }).on('data', (event) => {
work1Contract.events.WorkAssigned({ fromBlock: 'latest' }).on('data', async (event) => {
console.log('event: work assigned', event);
const r = fetchWorkRequest(event.returnValues.requestIndex);
const r = await fetchWorkRequest(event.returnValues.requestIndex);
console.log('work request', r);
fetchAvailabilityStake(r.stakeIndex);
});

View File

@ -1,10 +1,10 @@
{
"localhost": {
"DAO": "0xee46C48314Db1cd91DfaDc4f2f2cb12DE3B0Ec54",
"Work1": "0x37C7d46CC4Ae5a12402811B763998db4248C7069"
"DAO": "0xfc7E3bdF321821fF045Dde1586909AbBCC8D5d44",
"Work1": "0x89D456aF8A192B3D305007E1e94bFC2153Ead86B"
},
"sepolia": {
"DAO": "0x39B7522Ee1A5B13aE5580C40114239D4cE0e7D29",
"Work1": "0xC0Bb36820Ba891DE4ed6D60f75066805361dbeB8"
"DAO": "0xA4Cb4d99be0Fef3e59dCaE909D6E8ef46EF07257",
"Work1": "0xdB3b37B555c980617140C8d8687a19B8381F374d"
}
}

View File

@ -87,14 +87,13 @@ async function main() {
// Listen for new validation pools
dao.on('ValidationPoolInitiated', async (poolIndex) => {
console.log(`pool ${poolIndex} started`);
await fetchValidationPool(poolIndex);
const pool = await fetchValidationPool(poolIndex);
await fetchReputation();
const pool = validationPools[poolIndex];
if (poolIsValid(pool)) {
// Stake half of available reputation on this validation pool
const amount = reputation / BigInt(2);
await stake(poolIndex, amount, true);
await stake(pool, amount, true);
} else {
console.log(`pool sender ${pool.sender} is not recognized`);
}

View File

@ -23,8 +23,9 @@ async function main() {
fs.writeFileSync(contractAddressesWritePath, JSON.stringify(contractAddresses, null, 2));
console.log('Wrote file', fs.realpathSync(contractAddressesWritePath));
fs.copyFileSync('./artifacts/contracts/DAO.sol/DAO.json', '../contract-config/DAO.json');
fs.copyFileSync('./artifacts/contracts/Work1.sol/Work1.json', '../contract-config/Work1.json');
fs.copyFileSync('./artifacts/contracts/DAO.sol/DAO.json', '../client/src/assets/DAO.json');
fs.copyFileSync('./artifacts/contracts/Work1.sol/Work1.json', '../client/src/assets/Work1.json');
console.log('Copied ABIs to', fs.realpathSync('../client/src/assets'));
}
// We recommend this pattern to be able to use async/await everywhere