Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const { assert } = chai
// const BN = web3.utils.BN
chai
.use(require('chai-as-promised'))
.should()
async function blockTime () {
const block = await web3.eth.getBlock('latest')
return block.timestamp
}
const Moloch = artifacts.require('./Moloch')
const GuildBank = artifacts.require('./GuildBank')
const Token = artifacts.require('./Token')
const initSummonerBalance = 100
const deploymentConfig = {
'SUMMONER': '0x9a8d670c323e894dda9a045372a75d607a47cb9e',
'PERIOD_DURATION_IN_SECONDS': 17280,
'VOTING_DURATON_IN_PERIODS': 35,
'GRACE_DURATON_IN_PERIODS': 35,
'EMERGENCY_EXIT_WAIT_IN_PERIODS': 35,
'PROPOSAL_DEPOSIT': 10,
'DILUTION_BOUND': 3,
'PROCESSING_REWARD': 1,
'TOKEN_SUPPLY': 10000
}
contract('Moloch V2', ([creator, summoner, applicant1, applicant2, processor, delegateKey, ...otherAccounts]) => {
const chai = require('chai')
const { assert } = chai
// const BN = web3.utils.BN
chai
.use(require('chai-as-promised'))
.should()
async function blockTime () {
const block = await web3.eth.getBlock('latest')
return block.timestamp
}
const Moloch = artifacts.require('./Moloch')
const GuildBank = artifacts.require('./GuildBank')
const Token = artifacts.require('./Token')
const initSummonerBalance = 100
const deploymentConfig = {
'SUMMONER': '0x9a8d670c323e894dda9a045372a75d607a47cb9e',
'PERIOD_DURATION_IN_SECONDS': 17280,
'VOTING_DURATON_IN_PERIODS': 35,
'GRACE_DURATON_IN_PERIODS': 35,
'EMERGENCY_EXIT_WAIT_IN_PERIODS': 35,
'PROPOSAL_DEPOSIT': 10,
'DILUTION_BOUND': 3,
'PROCESSING_REWARD': 1,
'TOKEN_SUPPLY': 10000
}
const { artifacts, web3 } = require('@nomiclabs/buidler')
const chai = require('chai')
const { assert } = chai
// const BN = web3.utils.BN
chai
.use(require('chai-as-promised'))
.should()
async function blockTime () {
const block = await web3.eth.getBlock('latest')
return block.timestamp
}
const Moloch = artifacts.require('./Moloch')
const GuildBank = artifacts.require('./GuildBank')
const Token = artifacts.require('./Token')
const initSummonerBalance = 100
const deploymentConfig = {
'SUMMONER': '0x9a8d670c323e894dda9a045372a75d607a47cb9e',
'PERIOD_DURATION_IN_SECONDS': 17280,
'VOTING_DURATON_IN_PERIODS': 35,
'GRACE_DURATON_IN_PERIODS': 35,
'EMERGENCY_EXIT_WAIT_IN_PERIODS': 35,
'PROPOSAL_DEPOSIT': 10,
'DILUTION_BOUND': 3,
'PROCESSING_REWARD': 1,
'TOKEN_SUPPLY': 10000
}
const { artifacts, ethereum, web3 } = require('@nomiclabs/buidler')
const chai = require('chai')
const { assert } = chai
const BN = web3.utils.BN
chai
.use(require('chai-as-promised'))
.should()
const GuildBank = artifacts.require('./GuildBank')
const Token = artifacts.require('./Token')
const deploymentConfig = {
'TOKEN_SUPPLY': 10000
}
const SolRevert = 'VM Exception while processing transaction: revert'
async function snapshot () {
return ethereum.send('evm_snapshot', [])
}
async function restore (snapshotId) {
return ethereum.send('evm_revert', [snapshotId])
}
contract('GuildBank', ([creator, shareHolder, random, ...otherAccounts]) => {
const { artifacts, ethereum, web3 } = require('@nomiclabs/buidler')
const chai = require('chai')
const { assert } = chai
const BN = web3.utils.BN
chai
.use(require('chai-as-promised'))
.should()
const GuildBank = artifacts.require('./GuildBank')
const Token = artifacts.require('./Token')
const deploymentConfig = {
'TOKEN_SUPPLY': 10000
}
const SolRevert = 'VM Exception while processing transaction: revert'
async function snapshot () {
return ethereum.send('evm_snapshot', [])
}
async function restore (snapshotId) {
return ethereum.send('evm_revert', [snapshotId])
}