-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathindex.js
44 lines (43 loc) · 2.39 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
const Token = require('./build/contracts/MyToken.json')
const Deployer = require('./build/contracts/Deployer.json')
const EthConference = require('./build/contracts/EthConference.json')
const ERC20Conference = require('./build/contracts/ERC20Conference.json')
const AbstractConference = require('./build/contracts/AbstractConference.json')
const Conference = require('./build/contracts/Conference.json')
const EthDeployer = require('./build/contracts/EthDeployer.json')
const ERC20Deployer = require('./build/contracts/ERC20Deployer.json')
module.exports = {
Token,
Deployer,
Conference,
EthConference,
ERC20Conference,
AbstractConference,
EthDeployer,
ERC20Deployer,
events: {
/* when new party gets deployed */
NewParty: Deployer.abi.find(({ type, name }) => type === 'event' && name === 'NewParty'),
/* when fee is changed */
ClearFeeChanged: Deployer.abi.find(({ type, name }) => type === 'event' && name === 'ClearFeeChanged'),
/* when someone registers for a party */
Register: Conference.abi.find(({ type, name }) => type === 'event' && name === 'RegisterEvent'),
/* when party attendance is finalized and payout is enabled */
Finalize: Conference.abi.find(({ type, name }) => type === 'event' && name === 'FinalizeEvent'),
/* when someone withdraws their payout */
Withdraw: Conference.abi.find(({ type, name }) => type === 'event' && name === 'WithdrawEvent'),
/* when someone sends and withdraws their payout */
SendAndWithdrawEvent: Conference.abi.find(({ type, name }) => type === 'event' && name === 'SendAndWithdrawEvent'),
Clear: Conference.abi.find(({ type, name }) => type === 'event' && name === 'ClearEvent'),
/* when the party gets cancelled */
CancelParty: Conference.abi.find(({ type, name }) => type === 'event' && name === 'CancelEvent'),
/* when a new admin gets added */
AddAdmin: Conference.abi.find(({ type, name }) => type === 'event' && name === 'AdminGranted'),
/* when an admin gets removed */
RemoveAdmin: Conference.abi.find(({ type, name }) => type === 'event' && name === 'AdminRevoked'),
/* when ownership gets tranferred */
ChangeOwner: Conference.abi.find(({ type, name }) => type === 'event' && name === 'OwnershipTransferred'),
/* when participant limit changes */
UpdateParticipantLimit: Conference.abi.find(({ type, name }) => type === 'event' && name === 'UpdateParticipantLimit'),
}
}