copy ABIs to contract-config dir on deploy
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 29s
Details
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 29s
Details
This commit is contained in:
parent
3846ec5d08
commit
1e67f80808
|
@ -11,10 +11,11 @@ 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';
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,4 @@
|
|||
import contractAddresses from '../../contract-addresses.json';
|
||||
import contractAddresses from 'contract-config/addresses.json';
|
||||
|
||||
const networks = {
|
||||
localhost: '0x539',
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"localhost": {
|
||||
"DAO": "0x76Dfe9F47f06112a1b78960bf37d87CfbB6D6133",
|
||||
"Work1": "0xd2845aE812Ee42cF024fB4C55c052365792aBd78"
|
||||
"DAO": "0xee46C48314Db1cd91DfaDc4f2f2cb12DE3B0Ec54",
|
||||
"Work1": "0x37C7d46CC4Ae5a12402811B763998db4248C7069"
|
||||
},
|
||||
"sepolia": {
|
||||
"DAO": "0x39B7522Ee1A5B13aE5580C40114239D4cE0e7D29",
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"name": "contract-config",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC"
|
||||
}
|
|
@ -22,6 +22,7 @@ struct Stake {
|
|||
struct ValidationPool {
|
||||
uint id;
|
||||
uint postIndex;
|
||||
address sender;
|
||||
mapping(uint => Stake) stakes;
|
||||
uint stakeCount;
|
||||
uint256 fee;
|
||||
|
@ -82,6 +83,7 @@ contract DAO is ERC20("Reputation", "REP") {
|
|||
require(post.author != address(0), "Target post not found");
|
||||
poolIndex = validationPoolCount++;
|
||||
ValidationPool storage pool = validationPools[poolIndex];
|
||||
pool.sender = msg.sender;
|
||||
pool.postIndex = postIndex;
|
||||
pool.fee = msg.value;
|
||||
pool.duration = duration;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const contractAddresses = require('../../contract-addresses.json');
|
||||
const contractAddresses = require('contract-config/addresses.json');
|
||||
|
||||
const networks = {
|
||||
localhost: '0x539',
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
const { ethers } = require('hardhat');
|
||||
const fs = require('fs');
|
||||
|
||||
const contractAddresses = require('../../contract-addresses.json');
|
||||
|
||||
const contractAddressesWritePath = '../contract-addresses.json';
|
||||
const contractAddresses = require('contract-config/addresses.json');
|
||||
|
||||
const contractAddressesWritePath = '../contract-config/addresses.json';
|
||||
const network = process.env.HARDHAT_NETWORK;
|
||||
|
||||
async function main() {
|
||||
|
@ -23,6 +22,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');
|
||||
}
|
||||
|
||||
// We recommend this pattern to be able to use async/await everywhere
|
||||
|
|
|
@ -85,6 +85,7 @@ describe('DAO', () => {
|
|||
expect(pool.duration).to.equal(POOL_DURATION);
|
||||
expect(pool.postIndex).to.equal(0);
|
||||
expect(pool.resolved).to.be.false;
|
||||
expect(pool.sender).to.equal(account1);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -233,6 +233,9 @@ describe('Work1', () => {
|
|||
const post = await dao.posts(1);
|
||||
expect(post.author).to.equal(account1);
|
||||
expect(post.sender).to.equal(work1.target);
|
||||
const pool = await dao.validationPools(1);
|
||||
expect(pool.fee).to.equal(WORK1_PRICE);
|
||||
expect(pool.sender).to.equal(work1.target);
|
||||
});
|
||||
|
||||
it('should be able to submit work disapproval', async () => {
|
||||
|
|
Loading…
Reference in New Issue