@@ -175,21 +193,3 @@ export default class Choice extends Component {
}
}
-Choice.propTypes = {
- children: PropTypes.oneOfType([
- PropTypes.arrayOf(PropTypes.node),
- PropTypes.node,
- ]),
- accountAddress: PropTypes.string,
- percentage: PropTypes.string,
- label: PropTypes.string,
- voteValue: PropTypes.number,
- votingPeriodBegins: PropTypes.string,
- votingPeriodEnds: PropTypes.string,
- title: PropTypes.string,
- proposalIndex: PropTypes.string,
- publicAddress: PropTypes.string,
- daoName: PropTypes.string,
- now: PropTypes.number,
-};
-
diff --git a/src/components/Choice/messages.js b/src/components/Choice/messages.js
index 598ccf084..0af702980 100644
--- a/src/components/Choice/messages.js
+++ b/src/components/Choice/messages.js
@@ -1,23 +1,71 @@
-import { displayModal } from 'components/Modal/Modal';
import i18n from 'i18n';
-
import logo from 'images/logo.png';
+
+const modalContent = {
+ default: {
+ icon: logo,
+ title: i18n.t('wallet'),
+ cancelLabel: i18n.t('close'),
+ mode: 'ALERT'
+ },
+ notMember: {
+ icon: logo,
+ title: i18n.t('moloch-not-member'),
+ message: i18n.t('moloch-alert-not-member'),
+ cancelLabel: i18n.t('close'),
+ mode: 'ALERT'
+ },
+ notSynced: {
+ icon: logo,
+ title: i18n.t('not-synced'),
+ message: i18n.t('not-synced-message'),
+ cancelLabel: i18n.t('close'),
+ mode: 'ALERT',
+ },
+ notLogged: {
+ icon: logo,
+ title: i18n.t('place-vote'),
+ message: i18n.t('unlogged-cant-vote'),
+ cancelLabel: i18n.t('close'),
+ mode: 'ALERT'
+ },
+ pollClosed: {
+ icon: logo,
+ title: i18n.t('poll-closed'),
+ message: i18n.t('poll-is-closed'),
+ cancelLabel: i18n.t('close'),
+ mode: 'ALERT'
+ },
+ alreadyVoted: {
+ icon: logo,
+ title: i18n.t('already-voted'),
+ message: i18n.t('already-voted-detail'),
+ cancelLabel: i18n.t('close'),
+ mode: 'ALERT'
+ },
+ noWallet: {
+ icon: logo,
+ title: i18n.t('no-wallet'),
+ message: i18n.t('no-wallet-message'),
+ cancelLabel: i18n.t('close'),
+ mode: 'ALERT'
+ },
+ walletError: {
+ icon: logo,
+ title: i18n.t('wallet'),
+ cancelLabel: i18n.t('close'),
+ mode: 'ALERT',
+ }
+};
+
/**
* @summary reject vote message;
*/
const _notMember = () => {
// not member of dao
- displayModal(
- true,
- {
- icon: logo,
- title: i18n.t('moloch-not-member'),
- message: i18n.t('moloch-alert-not-member'),
- cancel: i18n.t('close'),
- alertMode: true,
- },
- );
+ window.modal = modalContent.notMember;
+ window.showModal.value = true;
};
/**
@@ -25,30 +73,15 @@ const _notMember = () => {
*/
const _notSynced = () => {
// not synced
- displayModal(
- true,
- {
- icon: logo,
- title: i18n.t('not-synced'),
- message: i18n.t('not-synced-message'),
- cancel: i18n.t('close'),
- alertMode: true,
- },
- );
+ window.modal = modalContent.notSynced;
+ window.showModal.value = true;
+
};
const _notLogged = () => {
// not logged
- displayModal(
- true,
- {
- icon: logo,
- title: i18n.t('place-vote'),
- message: i18n.t('unlogged-cant-vote'),
- cancel: i18n.t('close'),
- alertMode: true,
- },
- );
+ window.modal = modalContent.notLogged;
+ window.showModal.value = true;
};
/**
@@ -56,16 +89,8 @@ const _notLogged = () => {
*/
const _pollClosed = () => {
// poll already closed
- displayModal(
- true,
- {
- icon: logo,
- title: i18n.t('poll-closed'),
- message: i18n.t('poll-is-closed'),
- cancel: i18n.t('close'),
- alertMode: true,
- },
- );
+ window.modal = modalContent.pollClosed;
+ window.showModal.value = true;
};
/**
@@ -73,16 +98,8 @@ const _pollClosed = () => {
*/
const _alreadyVoted = () => {
// poll already closed
- displayModal(
- true,
- {
- icon: logo,
- title: i18n.t('already-voted'),
- message: i18n.t('already-voted-detail'),
- cancel: i18n.t('close'),
- alertMode: true,
- },
- );
+ window.modal = modalContent.alreadyVoted;
+ window.showModal.value = true;
};
/**
@@ -90,16 +107,8 @@ const _alreadyVoted = () => {
*/
const _noWallet = () => {
// no wallet
- displayModal(
- true,
- {
- icon: logo,
- title: i18n.t('no-wallet'),
- message: i18n.t('no-wallet-message'),
- cancel: i18n.t('close'),
- alertMode: true,
- },
- );
+ window.modal = modalContent.noWallet;
+ window.showModal.value = true;
};
/**
@@ -125,16 +134,12 @@ const _walletError = (err) => {
message = err.message;
}
}
- displayModal(
- true,
- {
- icon: logo,
- title: i18n.t('wallet'),
- message,
- cancel: i18n.t('close'),
- alertMode: true,
- }
- );
+
+
+ let error = modalContent.walletError;
+ error.message = message;
+ window.modal = error;
+ window.showModal.value = true;
};
export const walletError = _walletError;
diff --git a/src/components/Dapp/Dapp.jsx b/src/components/Dapp/Dapp.jsx
index 9c65a3544..1ecf2fee3 100644
--- a/src/components/Dapp/Dapp.jsx
+++ b/src/components/Dapp/Dapp.jsx
@@ -8,6 +8,7 @@ import {
// dapp
import Browser from 'components/Browser/Browser';
import Layout from 'components/Layout/Layout';
+import Modal from 'components/Modal/Modal';
// wallets
import Web3Modal from 'web3modal';
@@ -58,7 +59,8 @@ const INITIAL_STATE = {
showModal: false,
pendingRequest: false,
result: null,
- mobile: (window.innerWidth < 768)
+ mobile: (window.innerWidth < 768),
+ modal: null,
};
const routes = [
@@ -95,6 +97,8 @@ const routes = [
},
];
+export const ConnectedAccount = React.createContext('');
+
/**
* @summary Dapp layout with routing and wallet configuration.
*/
@@ -113,19 +117,45 @@ export default class Dapp extends Component {
this.onConnect = this.onConnect.bind(this);
this.reset = this.reset.bind(this);
this.resize = this.resize.bind(this);
+ this.showModal = this.showModal.bind(this);
}
async componentDidMount() {
if (this.web3Modal.cachedProvider) {
this.onConnect();
}
- window.addEventListener('resize', this.resize)
+ window.addEventListener('resize', this.resize);
+
+ window.showModal = {
+ valueInternal: false,
+ valueListener: function (val) { },
+ set value(val) {
+ this.valueInternal = val;
+ this.valueListener(val);
+ },
+ get value() {
+ return this.valueInternal;
+ },
+ registerListener: function (listener) {
+ this.valueListener = listener;
+ }
+ }
+
+ const instance = this;
+ window.showModal.registerListener(function (val) {
+ instance.showModal(val);
+ });
}
componentWillUnmount() {
window.removeEventListener('resize', this.resize)
}
+ showModal(val) {
+ this.setState({ showModal: val });
+ this.setState({ modal: window.modal });
+ }
+
async onConnect() {
const provider = await this.web3Modal.connect();
await this.subscribeProvider(provider);
@@ -148,7 +178,7 @@ export default class Dapp extends Component {
if (!provider.on) {
return;
}
- provider.on('close', () => { this.resetApp(); });
+ provider.on('close', () => { this.reset(); });
provider.on('accountsChanged', async (accounts) => {
this.setState({ address: accounts[0] });
@@ -180,6 +210,7 @@ export default class Dapp extends Component {
const { web3 } = this.state;
if (web3 && web3.currentProvider && web3.currentProvider.close) {
await web3.currentProvider.close();
+ console.log(`web3.isConnected(): ${web3.isConnected()}`);
}
this.web3Modal.clearCachedProvider();
this.setState({ ...INITIAL_STATE });
@@ -187,31 +218,40 @@ export default class Dapp extends Component {
render() {
return (
-
- {GA.init() && }
-
- {routes.map((route, index) => (
-
-
-
-
-
- {(this.state.mobile || (window.innerWidth < 768)) ?
-
- :
- null
- }
- >
- }
- />
- ))}
-
+ <>
+
+ {GA.init() && }
+
+ {routes.map((route, index) => (
+
+ {(this.state.showModal) ?
+
+ :
+ null
+ }
+
+
+
+
+
+
+ {(this.state.mobile || (window.innerWidth < 768)) ?
+
+ :
+ null
+ }
+ >
+ }
+ />
+ ))}
+
+ >
);
}
}
diff --git a/src/components/Modal/Modal.jsx b/src/components/Modal/Modal.jsx
index 25b5b5683..b78ea8c94 100644
--- a/src/components/Modal/Modal.jsx
+++ b/src/components/Modal/Modal.jsx
@@ -1,5 +1,101 @@
-const _displayModal = (prop) => {
- console.log(prop);
-}
+import React, { Component } from 'react';
+import PropTypes from 'prop-types';
+
+import i18n from 'i18n';
+import SyncLoader from "react-spinners/SyncLoader";
+import parser from 'html-react-parser';
+
+import 'styles/Dapp.css';
+
+/**
+* @summary displays the timestamp of a given post or event
+*/
+export default class Modal extends Component {
+ static propTypes = {
+ mode: PropTypes.string,
+ visible: PropTypes.bool,
+ modal: PropTypes.object,
+ }
-export const displayModal = _displayModal;
\ No newline at end of file
+ constructor (props) {
+ super(props);
+
+ this.cancel = this.cancel.bind(this);
+ }
+
+ cancel() {
+ window.showModal.value = false;
+ }
+
+ render() {
+ return (
+ ((this.props.visible) ?
+
+
+
+
+
+ {parser(this.props.modal.title)}
+
+
+
+ {parser(this.props.modal.message)}
+
+ {(this.props.modal.displayBallot) ?
+
+
+ -
+ {this.props.modal.proposalTitle}
+
+
+
+ :
+ null
+ }
+ {(this.props.modal.mode === 'AWAIT') ?
+
+
+
+ :
+ null
+ }
+ {(this.props.modal.mode === 'ALERT') ?
+
+
+
+ {this.props.modal.cancelLabel}
+
+
+
+ :
+ null
+ }
+ {(this.props.modal.mode === 'ACTION') ?
+
+ :
+ null
+ }
+
+
+ :
+ null
+ )
+ );
+ }
+}
diff --git a/src/components/Timeline/Timeline.jsx b/src/components/Timeline/Timeline.jsx
index 4d24b071c..ad9b145e0 100644
--- a/src/components/Timeline/Timeline.jsx
+++ b/src/components/Timeline/Timeline.jsx
@@ -1,4 +1,4 @@
-import React, { useEffect } from 'react';
+import React, { useEffect, useContext } from 'react';
import ApolloClient, { InMemoryCache } from 'apollo-boost';
import { ApolloProvider, useLazyQuery } from '@apollo/react-hooks';
@@ -23,6 +23,7 @@ import Search from 'components/Search/Search';
import Paginator from 'components/Paginator/Paginator';
import Expand from 'components/Expand/Expand';
+import { ConnectedAccount } from 'components/Dapp/Dapp';
import { getQuery } from 'components/Timeline/queries';
import { config } from 'config'
import { defaults, view as routerView, period as routerPeriod } from 'lib/const';
@@ -43,6 +44,7 @@ import thumbDown from 'images/rejected.svg';
import thumbDownActive from 'images/rejected-active.svg';
import 'styles/Dapp.css';
+import { abiLibrary } from 'lib/abi';
/**
* @summary retrieves the corresponding query for the timeline.
@@ -145,6 +147,9 @@ const Feed = (props) => {
};
}, []);
+ // user account
+ const connectedAccount = useContext(ConnectedAccount)
+
// fx
if (props.format !== 'searchBar' && props.page === 1 && document.getElementById('dapp')) {
document.getElementById('dapp').scroll({ top: 0 });
@@ -242,6 +247,7 @@ const Feed = (props) => {
const voterCount = (Number(totalVoters) > 0) ? i18n.t('see-proposal-vote-count', { totalVoters, voterLabel }) : i18n.t('no-voters')
const proposalValue = _getProposalValue(proposal);
+ const abiLibrary = (proposal.molochVersion === '1') ? 'moloch' : 'moloch2';
return (
{
diff --git a/src/lang/en.json b/src/lang/en.json
index 9572fa0fa..fc8cc9b79 100644
--- a/src/lang/en.json
+++ b/src/lang/en.json
@@ -604,7 +604,8 @@
"request": "Request",
"tweet": "Tweet",
"transaction-broadcast": "{{token}} Transaction sent to blockchain.",
- "voting-interaction": "Vote on {{collective}} proposal sent. See on Etherescan.",
+ "vote-cast": "Vote Cast",
+ "voting-interaction": "Vote successfully cast. See on Etherescan.",
"ethereum-metamask": "Ethereum",
"no-chain-found": "No blockchain address found.",
"metamask-confirm-transaction": "Confirm transaction in your blockchain wallet.
To be included Delegate list:",
@@ -816,7 +817,7 @@
"moloch-member-cannot-vote": "Only member addresses can vote.",
"moloch-valid-voter": "You can vote",
"moloch-invalid-voter": "You are not a member",
- "moloch-alert-not-member": "The address being used to vote is not a valid member of this DAO.",
+ "moloch-alert-not-member": "The connected wallet address
is not a member of this DAO.",
"moloch-not-member": "Not a Member",
"moloch-period-ragequit": "Ragequit",
"moloch-ragequit-short": "Quit",
@@ -831,10 +832,10 @@
"not-synced": "Not synced ",
"not-synced-message": "The application is not synced with the corresponding blockchain for this transaction.",
"no-wallet": "Missing Wallet",
- "no-wallet-message": "No Web3 Wallet was found.",
+ "no-wallet-message": "No Web3 wallet was found.
Install a compatible Web3 wallet.",
"not-connected": "Not connected",
"not-connected-message": "The application is not connected to a server.",
- "dao-confirm-tally": "You are voting for {{voteValue}} on:
{{proposalName}}
Awaiting for vote confirmation on the blockchain...
",
+ "dao-confirm-tally": "You are voting for {{voteValue}} on:
{{proposalName}}
Awaiting blockchain confirmation...
",
"dao-default-tally": "You are voting on
{{proposalName}}
Confirm vote in your blockchain wallet.
",
"moloch-guild": "Budget.",
"guild-total-shares": "Total Shares",
diff --git a/src/lib/abi.js b/src/lib/abi.js
index bf02178c2..187c1f355 100644
--- a/src/lib/abi.js
+++ b/src/lib/abi.js
@@ -1,684 +1,1954 @@
-export const molochABI = [
- {
- constant: true,
- inputs: [],
- name: 'processingReward',
- outputs: [
- {
- name: '',
- type: 'uint256',
- },
- ],
- payable: false,
- stateMutability: 'view',
- type: 'function',
- },
- {
- constant: true,
- inputs: [
- {
- name: 'memberAddress',
- type: 'address',
- },
- {
- name: 'proposalIndex',
- type: 'uint256',
- },
- ],
- name: 'getMemberProposalVote',
- outputs: [
- {
- name: '',
- type: 'uint8',
- },
- ],
- payable: false,
- stateMutability: 'view',
- type: 'function',
- },
- {
- constant: true,
- inputs: [],
- name: 'getCurrentPeriod',
- outputs: [
- {
- name: '',
- type: 'uint256',
- },
- ],
- payable: false,
- stateMutability: 'view',
- type: 'function',
- },
- {
- constant: true,
- inputs: [
- {
- name: '',
- type: 'address',
- },
- ],
- name: 'members',
- outputs: [
- {
- name: 'delegateKey',
- type: 'address',
- },
- {
- name: 'shares',
- type: 'uint256',
- },
- {
- name: 'exists',
- type: 'bool',
- },
- {
- name: 'highestIndexYesVote',
- type: 'uint256',
- },
- ],
- payable: false,
- stateMutability: 'view',
- type: 'function',
- },
- {
- constant: true,
- inputs: [],
- name: 'totalSharesRequested',
- outputs: [
- {
- name: '',
- type: 'uint256',
- },
- ],
- payable: false,
- stateMutability: 'view',
- type: 'function',
- },
- {
- constant: false,
- inputs: [
- {
- name: 'newDelegateKey',
- type: 'address',
- },
- ],
- name: 'updateDelegateKey',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- constant: true,
- inputs: [],
- name: 'totalShares',
- outputs: [
- {
- name: '',
- type: 'uint256',
- },
- ],
- payable: false,
- stateMutability: 'view',
- type: 'function',
- },
- {
- constant: true,
- inputs: [
- {
- name: '',
- type: 'uint256',
- },
- ],
- name: 'proposalQueue',
- outputs: [
- {
- name: 'proposer',
- type: 'address',
- },
- {
- name: 'applicant',
- type: 'address',
- },
- {
- name: 'sharesRequested',
- type: 'uint256',
- },
- {
- name: 'startingPeriod',
- type: 'uint256',
- },
- {
- name: 'yesVotes',
- type: 'uint256',
- },
- {
- name: 'noVotes',
- type: 'uint256',
- },
- {
- name: 'processed',
- type: 'bool',
- },
- {
- name: 'didPass',
- type: 'bool',
- },
- {
- name: 'aborted',
- type: 'bool',
- },
- {
- name: 'tokenTribute',
- type: 'uint256',
- },
- {
- name: 'details',
- type: 'string',
- },
- {
- name: 'maxTotalSharesAtYesVote',
- type: 'uint256',
- },
- ],
- payable: false,
- stateMutability: 'view',
- type: 'function',
- },
- {
- constant: true,
- inputs: [
- {
- name: '',
- type: 'address',
- },
- ],
- name: 'memberAddressByDelegateKey',
- outputs: [
- {
- name: '',
- type: 'address',
- },
- ],
- payable: false,
- stateMutability: 'view',
- type: 'function',
- },
- {
- constant: true,
- inputs: [],
- name: 'gracePeriodLength',
- outputs: [
- {
- name: '',
- type: 'uint256',
- },
- ],
- payable: false,
- stateMutability: 'view',
- type: 'function',
- },
- {
- constant: true,
- inputs: [],
- name: 'abortWindow',
- outputs: [
- {
- name: '',
- type: 'uint256',
- },
- ],
- payable: false,
- stateMutability: 'view',
- type: 'function',
- },
- {
- constant: true,
- inputs: [],
- name: 'getProposalQueueLength',
- outputs: [
- {
- name: '',
- type: 'uint256',
- },
- ],
- payable: false,
- stateMutability: 'view',
- type: 'function',
- },
- {
- constant: true,
- inputs: [],
- name: 'summoningTime',
- outputs: [
- {
- name: '',
- type: 'uint256',
- },
- ],
- payable: false,
- stateMutability: 'view',
- type: 'function',
- },
- {
- constant: true,
- inputs: [],
- name: 'votingPeriodLength',
- outputs: [
- {
- name: '',
- type: 'uint256',
- },
- ],
- payable: false,
- stateMutability: 'view',
- type: 'function',
- },
- {
- constant: false,
- inputs: [
- {
- name: 'sharesToBurn',
- type: 'uint256',
- },
- ],
- name: 'ragequit',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- constant: true,
- inputs: [],
- name: 'proposalDeposit',
- outputs: [
- {
- name: '',
- type: 'uint256',
- },
- ],
- payable: false,
- stateMutability: 'view',
- type: 'function',
- },
- {
- constant: true,
- inputs: [
- {
- name: 'startingPeriod',
- type: 'uint256',
- },
- ],
- name: 'hasVotingPeriodExpired',
- outputs: [
- {
- name: '',
- type: 'bool',
- },
- ],
- payable: false,
- stateMutability: 'view',
- type: 'function',
- },
- {
- constant: false,
- inputs: [
- {
- name: 'applicant',
- type: 'address',
- },
- {
- name: 'tokenTribute',
- type: 'uint256',
- },
- {
- name: 'sharesRequested',
- type: 'uint256',
- },
- {
- name: 'details',
- type: 'string',
- },
- ],
- name: 'submitProposal',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- constant: false,
- inputs: [
- {
- name: 'proposalIndex',
- type: 'uint256',
- },
- {
- name: 'uintVote',
- type: 'uint8',
- },
- ],
- name: 'submitVote',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- constant: true,
- inputs: [
- {
- name: 'highestIndexYesVote',
- type: 'uint256',
- },
- ],
- name: 'canRagequit',
- outputs: [
- {
- name: '',
- type: 'bool',
- },
- ],
- payable: false,
- stateMutability: 'view',
- type: 'function',
- },
- {
- constant: true,
- inputs: [],
- name: 'guildBank',
- outputs: [
- {
- name: '',
- type: 'address',
- },
- ],
- payable: false,
- stateMutability: 'view',
- type: 'function',
- },
- {
- constant: true,
- inputs: [],
- name: 'dilutionBound',
- outputs: [
- {
- name: '',
- type: 'uint256',
- },
- ],
- payable: false,
- stateMutability: 'view',
- type: 'function',
- },
- {
- constant: true,
- inputs: [],
- name: 'periodDuration',
- outputs: [
- {
- name: '',
- type: 'uint256',
- },
- ],
- payable: false,
- stateMutability: 'view',
- type: 'function',
- },
- {
- constant: true,
- inputs: [],
- name: 'approvedToken',
- outputs: [
- {
- name: '',
- type: 'address',
- },
- ],
- payable: false,
- stateMutability: 'view',
- type: 'function',
- },
- {
- constant: false,
- inputs: [
- {
- name: 'proposalIndex',
- type: 'uint256',
- },
- ],
- name: 'abort',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- constant: false,
- inputs: [
- {
- name: 'proposalIndex',
- type: 'uint256',
- },
- ],
- name: 'processProposal',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
- },
- {
- inputs: [
- {
- name: 'summoner',
- type: 'address',
- },
- {
- name: '_approvedToken',
- type: 'address',
- },
- {
- name: '_periodDuration',
- type: 'uint256',
- },
- {
- name: '_votingPeriodLength',
- type: 'uint256',
- },
- {
- name: '_gracePeriodLength',
- type: 'uint256',
- },
- {
- name: '_abortWindow',
- type: 'uint256',
- },
- {
- name: '_proposalDeposit',
- type: 'uint256',
- },
- {
- name: '_dilutionBound',
- type: 'uint256',
- },
- {
- name: '_processingReward',
- type: 'uint256',
- },
- ],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'constructor',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: false,
- name: 'proposalIndex',
- type: 'uint256',
- },
- {
- indexed: true,
- name: 'delegateKey',
- type: 'address',
- },
- {
- indexed: true,
- name: 'memberAddress',
- type: 'address',
- },
- {
- indexed: true,
- name: 'applicant',
- type: 'address',
- },
- {
- indexed: false,
- name: 'tokenTribute',
- type: 'uint256',
- },
- {
- indexed: false,
- name: 'sharesRequested',
- type: 'uint256',
- },
- ],
- name: 'SubmitProposal',
- type: 'event',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- name: 'proposalIndex',
- type: 'uint256',
- },
- {
- indexed: true,
- name: 'delegateKey',
- type: 'address',
- },
- {
- indexed: true,
- name: 'memberAddress',
- type: 'address',
- },
- {
- indexed: false,
- name: 'uintVote',
- type: 'uint8',
- },
- ],
- name: 'SubmitVote',
- type: 'event',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- name: 'proposalIndex',
- type: 'uint256',
- },
- {
- indexed: true,
- name: 'applicant',
- type: 'address',
- },
- {
- indexed: true,
- name: 'memberAddress',
- type: 'address',
- },
- {
- indexed: false,
- name: 'tokenTribute',
- type: 'uint256',
- },
- {
- indexed: false,
- name: 'sharesRequested',
- type: 'uint256',
- },
- {
- indexed: false,
- name: 'didPass',
- type: 'bool',
- },
- ],
- name: 'ProcessProposal',
- type: 'event',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- name: 'memberAddress',
- type: 'address',
- },
- {
- indexed: false,
- name: 'sharesToBurn',
- type: 'uint256',
- },
- ],
- name: 'Ragequit',
- type: 'event',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- name: 'proposalIndex',
- type: 'uint256',
- },
- {
- indexed: false,
- name: 'applicantAddress',
- type: 'address',
- },
- ],
- name: 'Abort',
- type: 'event',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- name: 'memberAddress',
- type: 'address',
- },
- {
- indexed: false,
- name: 'newDelegateKey',
- type: 'address',
- },
- ],
- name: 'UpdateDelegateKey',
- type: 'event',
- },
- {
- anonymous: false,
- inputs: [
- {
- indexed: true,
- name: 'summoner',
- type: 'address',
- },
- {
- indexed: false,
- name: 'shares',
- type: 'uint256',
- },
- ],
- name: 'SummonComplete',
- type: 'event',
- },
-];
+export const abiLibrary = {
+ moloch: [
+ {
+ constant: true,
+ inputs: [],
+ name: 'processingReward',
+ outputs: [
+ {
+ name: '',
+ type: 'uint256',
+ },
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function',
+ },
+ {
+ constant: true,
+ inputs: [
+ {
+ name: 'memberAddress',
+ type: 'address',
+ },
+ {
+ name: 'proposalIndex',
+ type: 'uint256',
+ },
+ ],
+ name: 'getMemberProposalVote',
+ outputs: [
+ {
+ name: '',
+ type: 'uint8',
+ },
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function',
+ },
+ {
+ constant: true,
+ inputs: [],
+ name: 'getCurrentPeriod',
+ outputs: [
+ {
+ name: '',
+ type: 'uint256',
+ },
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function',
+ },
+ {
+ constant: true,
+ inputs: [
+ {
+ name: '',
+ type: 'address',
+ },
+ ],
+ name: 'members',
+ outputs: [
+ {
+ name: 'delegateKey',
+ type: 'address',
+ },
+ {
+ name: 'shares',
+ type: 'uint256',
+ },
+ {
+ name: 'exists',
+ type: 'bool',
+ },
+ {
+ name: 'highestIndexYesVote',
+ type: 'uint256',
+ },
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function',
+ },
+ {
+ constant: true,
+ inputs: [],
+ name: 'totalSharesRequested',
+ outputs: [
+ {
+ name: '',
+ type: 'uint256',
+ },
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function',
+ },
+ {
+ constant: false,
+ inputs: [
+ {
+ name: 'newDelegateKey',
+ type: 'address',
+ },
+ ],
+ name: 'updateDelegateKey',
+ outputs: [],
+ payable: false,
+ stateMutability: 'nonpayable',
+ type: 'function',
+ },
+ {
+ constant: true,
+ inputs: [],
+ name: 'totalShares',
+ outputs: [
+ {
+ name: '',
+ type: 'uint256',
+ },
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function',
+ },
+ {
+ constant: true,
+ inputs: [
+ {
+ name: '',
+ type: 'uint256',
+ },
+ ],
+ name: 'proposalQueue',
+ outputs: [
+ {
+ name: 'proposer',
+ type: 'address',
+ },
+ {
+ name: 'applicant',
+ type: 'address',
+ },
+ {
+ name: 'sharesRequested',
+ type: 'uint256',
+ },
+ {
+ name: 'startingPeriod',
+ type: 'uint256',
+ },
+ {
+ name: 'yesVotes',
+ type: 'uint256',
+ },
+ {
+ name: 'noVotes',
+ type: 'uint256',
+ },
+ {
+ name: 'processed',
+ type: 'bool',
+ },
+ {
+ name: 'didPass',
+ type: 'bool',
+ },
+ {
+ name: 'aborted',
+ type: 'bool',
+ },
+ {
+ name: 'tokenTribute',
+ type: 'uint256',
+ },
+ {
+ name: 'details',
+ type: 'string',
+ },
+ {
+ name: 'maxTotalSharesAtYesVote',
+ type: 'uint256',
+ },
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function',
+ },
+ {
+ constant: true,
+ inputs: [
+ {
+ name: '',
+ type: 'address',
+ },
+ ],
+ name: 'memberAddressByDelegateKey',
+ outputs: [
+ {
+ name: '',
+ type: 'address',
+ },
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function',
+ },
+ {
+ constant: true,
+ inputs: [],
+ name: 'gracePeriodLength',
+ outputs: [
+ {
+ name: '',
+ type: 'uint256',
+ },
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function',
+ },
+ {
+ constant: true,
+ inputs: [],
+ name: 'abortWindow',
+ outputs: [
+ {
+ name: '',
+ type: 'uint256',
+ },
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function',
+ },
+ {
+ constant: true,
+ inputs: [],
+ name: 'getProposalQueueLength',
+ outputs: [
+ {
+ name: '',
+ type: 'uint256',
+ },
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function',
+ },
+ {
+ constant: true,
+ inputs: [],
+ name: 'summoningTime',
+ outputs: [
+ {
+ name: '',
+ type: 'uint256',
+ },
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function',
+ },
+ {
+ constant: true,
+ inputs: [],
+ name: 'votingPeriodLength',
+ outputs: [
+ {
+ name: '',
+ type: 'uint256',
+ },
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function',
+ },
+ {
+ constant: false,
+ inputs: [
+ {
+ name: 'sharesToBurn',
+ type: 'uint256',
+ },
+ ],
+ name: 'ragequit',
+ outputs: [],
+ payable: false,
+ stateMutability: 'nonpayable',
+ type: 'function',
+ },
+ {
+ constant: true,
+ inputs: [],
+ name: 'proposalDeposit',
+ outputs: [
+ {
+ name: '',
+ type: 'uint256',
+ },
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function',
+ },
+ {
+ constant: true,
+ inputs: [
+ {
+ name: 'startingPeriod',
+ type: 'uint256',
+ },
+ ],
+ name: 'hasVotingPeriodExpired',
+ outputs: [
+ {
+ name: '',
+ type: 'bool',
+ },
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function',
+ },
+ {
+ constant: false,
+ inputs: [
+ {
+ name: 'applicant',
+ type: 'address',
+ },
+ {
+ name: 'tokenTribute',
+ type: 'uint256',
+ },
+ {
+ name: 'sharesRequested',
+ type: 'uint256',
+ },
+ {
+ name: 'details',
+ type: 'string',
+ },
+ ],
+ name: 'submitProposal',
+ outputs: [],
+ payable: false,
+ stateMutability: 'nonpayable',
+ type: 'function',
+ },
+ {
+ constant: false,
+ inputs: [
+ {
+ name: 'proposalIndex',
+ type: 'uint256',
+ },
+ {
+ name: 'uintVote',
+ type: 'uint8',
+ },
+ ],
+ name: 'submitVote',
+ outputs: [],
+ payable: false,
+ stateMutability: 'nonpayable',
+ type: 'function',
+ },
+ {
+ constant: true,
+ inputs: [
+ {
+ name: 'highestIndexYesVote',
+ type: 'uint256',
+ },
+ ],
+ name: 'canRagequit',
+ outputs: [
+ {
+ name: '',
+ type: 'bool',
+ },
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function',
+ },
+ {
+ constant: true,
+ inputs: [],
+ name: 'guildBank',
+ outputs: [
+ {
+ name: '',
+ type: 'address',
+ },
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function',
+ },
+ {
+ constant: true,
+ inputs: [],
+ name: 'dilutionBound',
+ outputs: [
+ {
+ name: '',
+ type: 'uint256',
+ },
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function',
+ },
+ {
+ constant: true,
+ inputs: [],
+ name: 'periodDuration',
+ outputs: [
+ {
+ name: '',
+ type: 'uint256',
+ },
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function',
+ },
+ {
+ constant: true,
+ inputs: [],
+ name: 'approvedToken',
+ outputs: [
+ {
+ name: '',
+ type: 'address',
+ },
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function',
+ },
+ {
+ constant: false,
+ inputs: [
+ {
+ name: 'proposalIndex',
+ type: 'uint256',
+ },
+ ],
+ name: 'abort',
+ outputs: [],
+ payable: false,
+ stateMutability: 'nonpayable',
+ type: 'function',
+ },
+ {
+ constant: false,
+ inputs: [
+ {
+ name: 'proposalIndex',
+ type: 'uint256',
+ },
+ ],
+ name: 'processProposal',
+ outputs: [],
+ payable: false,
+ stateMutability: 'nonpayable',
+ type: 'function',
+ },
+ {
+ inputs: [
+ {
+ name: 'summoner',
+ type: 'address',
+ },
+ {
+ name: '_approvedToken',
+ type: 'address',
+ },
+ {
+ name: '_periodDuration',
+ type: 'uint256',
+ },
+ {
+ name: '_votingPeriodLength',
+ type: 'uint256',
+ },
+ {
+ name: '_gracePeriodLength',
+ type: 'uint256',
+ },
+ {
+ name: '_abortWindow',
+ type: 'uint256',
+ },
+ {
+ name: '_proposalDeposit',
+ type: 'uint256',
+ },
+ {
+ name: '_dilutionBound',
+ type: 'uint256',
+ },
+ {
+ name: '_processingReward',
+ type: 'uint256',
+ },
+ ],
+ payable: false,
+ stateMutability: 'nonpayable',
+ type: 'constructor',
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: false,
+ name: 'proposalIndex',
+ type: 'uint256',
+ },
+ {
+ indexed: true,
+ name: 'delegateKey',
+ type: 'address',
+ },
+ {
+ indexed: true,
+ name: 'memberAddress',
+ type: 'address',
+ },
+ {
+ indexed: true,
+ name: 'applicant',
+ type: 'address',
+ },
+ {
+ indexed: false,
+ name: 'tokenTribute',
+ type: 'uint256',
+ },
+ {
+ indexed: false,
+ name: 'sharesRequested',
+ type: 'uint256',
+ },
+ ],
+ name: 'SubmitProposal',
+ type: 'event',
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: true,
+ name: 'proposalIndex',
+ type: 'uint256',
+ },
+ {
+ indexed: true,
+ name: 'delegateKey',
+ type: 'address',
+ },
+ {
+ indexed: true,
+ name: 'memberAddress',
+ type: 'address',
+ },
+ {
+ indexed: false,
+ name: 'uintVote',
+ type: 'uint8',
+ },
+ ],
+ name: 'SubmitVote',
+ type: 'event',
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: true,
+ name: 'proposalIndex',
+ type: 'uint256',
+ },
+ {
+ indexed: true,
+ name: 'applicant',
+ type: 'address',
+ },
+ {
+ indexed: true,
+ name: 'memberAddress',
+ type: 'address',
+ },
+ {
+ indexed: false,
+ name: 'tokenTribute',
+ type: 'uint256',
+ },
+ {
+ indexed: false,
+ name: 'sharesRequested',
+ type: 'uint256',
+ },
+ {
+ indexed: false,
+ name: 'didPass',
+ type: 'bool',
+ },
+ ],
+ name: 'ProcessProposal',
+ type: 'event',
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: true,
+ name: 'memberAddress',
+ type: 'address',
+ },
+ {
+ indexed: false,
+ name: 'sharesToBurn',
+ type: 'uint256',
+ },
+ ],
+ name: 'Ragequit',
+ type: 'event',
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: true,
+ name: 'proposalIndex',
+ type: 'uint256',
+ },
+ {
+ indexed: false,
+ name: 'applicantAddress',
+ type: 'address',
+ },
+ ],
+ name: 'Abort',
+ type: 'event',
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: true,
+ name: 'memberAddress',
+ type: 'address',
+ },
+ {
+ indexed: false,
+ name: 'newDelegateKey',
+ type: 'address',
+ },
+ ],
+ name: 'UpdateDelegateKey',
+ type: 'event',
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: true,
+ name: 'summoner',
+ type: 'address',
+ },
+ {
+ indexed: false,
+ name: 'shares',
+ type: 'uint256',
+ },
+ ],
+ name: 'SummonComplete',
+ type: 'event',
+ },
+ ],
+ moloch2: [
+ {
+ constant: true,
+ inputs: [
+ {
+ name: '',
+ type: 'uint256'
+ }
+ ],
+ name: 'proposals',
+ outputs: [
+ {
+ name: 'applicant',
+ type: 'address'
+ },
+ {
+ name: 'proposer',
+ type: 'address'
+ },
+ {
+ name: 'sponsor',
+ type: 'address'
+ },
+ {
+ name: 'sharesRequested',
+ type: 'uint256'
+ },
+ {
+ name: 'lootRequested',
+ type: 'uint256'
+ },
+ {
+ name: 'tributeOffered',
+ type: 'uint256'
+ },
+ {
+ name: 'tributeToken',
+ type: 'address'
+ },
+ {
+ name: 'paymentRequested',
+ type: 'uint256'
+ },
+ {
+ name: 'paymentToken',
+ type: 'address'
+ },
+ {
+ name: 'startingPeriod',
+ type: 'uint256'
+ },
+ {
+ name: 'yesVotes',
+ type: 'uint256'
+ },
+ {
+ name: 'noVotes',
+ type: 'uint256'
+ },
+ {
+ name: 'details',
+ type: 'string'
+ },
+ {
+ name: 'maxTotalSharesAndLootAtYesVote',
+ type: 'uint256'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: true,
+ inputs: [],
+ name: 'processingReward',
+ outputs: [
+ {
+ name: '',
+ type: 'uint256'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: true,
+ inputs: [
+ {
+ name: 'memberAddress',
+ type: 'address'
+ },
+ {
+ name: 'proposalIndex',
+ type: 'uint256'
+ }
+ ],
+ name: 'getMemberProposalVote',
+ outputs: [
+ {
+ name: '',
+ type: 'uint8'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: true,
+ inputs: [],
+ name: 'getCurrentPeriod',
+ outputs: [
+ {
+ name: '',
+ type: 'uint256'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: true,
+ inputs: [
+ {
+ name: '',
+ type: 'address'
+ }
+ ],
+ name: 'members',
+ outputs: [
+ {
+ name: 'delegateKey',
+ type: 'address'
+ },
+ {
+ name: 'shares',
+ type: 'uint256'
+ },
+ {
+ name: 'loot',
+ type: 'uint256'
+ },
+ {
+ name: 'exists',
+ type: 'bool'
+ },
+ {
+ name: 'highestIndexYesVote',
+ type: 'uint256'
+ },
+ {
+ name: 'jailed',
+ type: 'uint256'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: false,
+ inputs: [
+ {
+ name: 'token',
+ type: 'address'
+ },
+ {
+ name: 'amount',
+ type: 'uint256'
+ }
+ ],
+ name: 'withdrawBalance',
+ outputs: [],
+ payable: false,
+ stateMutability: 'nonpayable',
+ type: 'function'
+ },
+ {
+ constant: false,
+ inputs: [
+ {
+ name: 'memberToKick',
+ type: 'address'
+ },
+ {
+ name: 'details',
+ type: 'string'
+ }
+ ],
+ name: 'submitGuildKickProposal',
+ outputs: [
+ {
+ name: 'proposalId',
+ type: 'uint256'
+ }
+ ],
+ payable: false,
+ stateMutability: 'nonpayable',
+ type: 'function'
+ },
+ {
+ constant: false,
+ inputs: [
+ {
+ name: 'sharesToBurn',
+ type: 'uint256'
+ },
+ {
+ name: 'lootToBurn',
+ type: 'uint256'
+ }
+ ],
+ name: 'ragequit',
+ outputs: [],
+ payable: false,
+ stateMutability: 'nonpayable',
+ type: 'function'
+ },
+ {
+ constant: true,
+ inputs: [
+ {
+ name: '',
+ type: 'uint256'
+ }
+ ],
+ name: 'approvedTokens',
+ outputs: [
+ {
+ name: '',
+ type: 'address'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: false,
+ inputs: [
+ {
+ name: 'newDelegateKey',
+ type: 'address'
+ }
+ ],
+ name: 'updateDelegateKey',
+ outputs: [],
+ payable: false,
+ stateMutability: 'nonpayable',
+ type: 'function'
+ },
+ {
+ constant: true,
+ inputs: [],
+ name: 'TOTAL',
+ outputs: [
+ {
+ name: '',
+ type: 'address'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: false,
+ inputs: [
+ {
+ name: 'proposalIndex',
+ type: 'uint256'
+ }
+ ],
+ name: 'processWhitelistProposal',
+ outputs: [],
+ payable: false,
+ stateMutability: 'nonpayable',
+ type: 'function'
+ },
+ {
+ constant: true,
+ inputs: [],
+ name: 'totalShares',
+ outputs: [
+ {
+ name: '',
+ type: 'uint256'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: true,
+ inputs: [
+ {
+ name: '',
+ type: 'uint256'
+ }
+ ],
+ name: 'proposalQueue',
+ outputs: [
+ {
+ name: '',
+ type: 'uint256'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: true,
+ inputs: [
+ {
+ name: '',
+ type: 'address'
+ }
+ ],
+ name: 'proposedToKick',
+ outputs: [
+ {
+ name: '',
+ type: 'bool'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: true,
+ inputs: [
+ {
+ name: '',
+ type: 'address'
+ }
+ ],
+ name: 'memberAddressByDelegateKey',
+ outputs: [
+ {
+ name: '',
+ type: 'address'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: false,
+ inputs: [
+ {
+ name: 'tokens',
+ type: 'address[]'
+ },
+ {
+ name: 'amounts',
+ type: 'uint256[]'
+ },
+ {
+ name: 'max',
+ type: 'bool'
+ }
+ ],
+ name: 'withdrawBalances',
+ outputs: [],
+ payable: false,
+ stateMutability: 'nonpayable',
+ type: 'function'
+ },
+ {
+ constant: true,
+ inputs: [
+ {
+ name: '',
+ type: 'address'
+ },
+ {
+ name: '',
+ type: 'address'
+ }
+ ],
+ name: 'userTokenBalances',
+ outputs: [
+ {
+ name: '',
+ type: 'uint256'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: false,
+ inputs: [
+ {
+ name: 'applicant',
+ type: 'address'
+ },
+ {
+ name: 'sharesRequested',
+ type: 'uint256'
+ },
+ {
+ name: 'lootRequested',
+ type: 'uint256'
+ },
+ {
+ name: 'tributeOffered',
+ type: 'uint256'
+ },
+ {
+ name: 'tributeToken',
+ type: 'address'
+ },
+ {
+ name: 'paymentRequested',
+ type: 'uint256'
+ },
+ {
+ name: 'paymentToken',
+ type: 'address'
+ },
+ {
+ name: 'details',
+ type: 'string'
+ }
+ ],
+ name: 'submitProposal',
+ outputs: [
+ {
+ name: 'proposalId',
+ type: 'uint256'
+ }
+ ],
+ payable: false,
+ stateMutability: 'nonpayable',
+ type: 'function'
+ },
+ {
+ constant: false,
+ inputs: [
+ {
+ name: 'token',
+ type: 'address'
+ }
+ ],
+ name: 'collectTokens',
+ outputs: [],
+ payable: false,
+ stateMutability: 'nonpayable',
+ type: 'function'
+ },
+ {
+ constant: true,
+ inputs: [],
+ name: 'totalLoot',
+ outputs: [
+ {
+ name: '',
+ type: 'uint256'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: true,
+ inputs: [],
+ name: 'gracePeriodLength',
+ outputs: [
+ {
+ name: '',
+ type: 'uint256'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: true,
+ inputs: [
+ {
+ name: 'user',
+ type: 'address'
+ },
+ {
+ name: 'token',
+ type: 'address'
+ }
+ ],
+ name: 'getUserTokenBalance',
+ outputs: [
+ {
+ name: '',
+ type: 'uint256'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: true,
+ inputs: [
+ {
+ name: '',
+ type: 'address'
+ }
+ ],
+ name: 'tokenWhitelist',
+ outputs: [
+ {
+ name: '',
+ type: 'bool'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: true,
+ inputs: [],
+ name: 'getTokenCount',
+ outputs: [
+ {
+ name: '',
+ type: 'uint256'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: true,
+ inputs: [],
+ name: 'getProposalQueueLength',
+ outputs: [
+ {
+ name: '',
+ type: 'uint256'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: true,
+ inputs: [],
+ name: 'summoningTime',
+ outputs: [
+ {
+ name: '',
+ type: 'uint256'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: true,
+ inputs: [],
+ name: 'votingPeriodLength',
+ outputs: [
+ {
+ name: '',
+ type: 'uint256'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: true,
+ inputs: [],
+ name: 'proposalDeposit',
+ outputs: [
+ {
+ name: '',
+ type: 'uint256'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: true,
+ inputs: [
+ {
+ name: 'startingPeriod',
+ type: 'uint256'
+ }
+ ],
+ name: 'hasVotingPeriodExpired',
+ outputs: [
+ {
+ name: '',
+ type: 'bool'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: false,
+ inputs: [
+ {
+ name: 'proposalId',
+ type: 'uint256'
+ }
+ ],
+ name: 'sponsorProposal',
+ outputs: [],
+ payable: false,
+ stateMutability: 'nonpayable',
+ type: 'function'
+ },
+ {
+ constant: false,
+ inputs: [
+ {
+ name: 'proposalIndex',
+ type: 'uint256'
+ },
+ {
+ name: 'uintVote',
+ type: 'uint8'
+ }
+ ],
+ name: 'submitVote',
+ outputs: [],
+ payable: false,
+ stateMutability: 'nonpayable',
+ type: 'function'
+ },
+ {
+ constant: true,
+ inputs: [],
+ name: 'totalGuildBankTokens',
+ outputs: [
+ {
+ name: '',
+ type: 'uint256'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: true,
+ inputs: [
+ {
+ name: 'highestIndexYesVote',
+ type: 'uint256'
+ }
+ ],
+ name: 'canRagequit',
+ outputs: [
+ {
+ name: '',
+ type: 'bool'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: true,
+ inputs: [],
+ name: 'dilutionBound',
+ outputs: [
+ {
+ name: '',
+ type: 'uint256'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: true,
+ inputs: [
+ {
+ name: 'proposalId',
+ type: 'uint256'
+ }
+ ],
+ name: 'getProposalFlags',
+ outputs: [
+ {
+ name: '',
+ type: 'bool[6]'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: true,
+ inputs: [],
+ name: 'periodDuration',
+ outputs: [
+ {
+ name: '',
+ type: 'uint256'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: true,
+ inputs: [],
+ name: 'depositToken',
+ outputs: [
+ {
+ name: '',
+ type: 'address'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: true,
+ inputs: [],
+ name: 'proposalCount',
+ outputs: [
+ {
+ name: '',
+ type: 'uint256'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: false,
+ inputs: [
+ {
+ name: 'memberToKick',
+ type: 'address'
+ }
+ ],
+ name: 'ragekick',
+ outputs: [],
+ payable: false,
+ stateMutability: 'nonpayable',
+ type: 'function'
+ },
+ {
+ constant: false,
+ inputs: [
+ {
+ name: 'proposalId',
+ type: 'uint256'
+ }
+ ],
+ name: 'cancelProposal',
+ outputs: [],
+ payable: false,
+ stateMutability: 'nonpayable',
+ type: 'function'
+ },
+ {
+ constant: true,
+ inputs: [
+ {
+ name: '',
+ type: 'address'
+ }
+ ],
+ name: 'proposedToWhitelist',
+ outputs: [
+ {
+ name: '',
+ type: 'bool'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: false,
+ inputs: [
+ {
+ name: 'proposalIndex',
+ type: 'uint256'
+ }
+ ],
+ name: 'processGuildKickProposal',
+ outputs: [],
+ payable: false,
+ stateMutability: 'nonpayable',
+ type: 'function'
+ },
+ {
+ constant: false,
+ inputs: [
+ {
+ name: 'proposalIndex',
+ type: 'uint256'
+ }
+ ],
+ name: 'processProposal',
+ outputs: [],
+ payable: false,
+ stateMutability: 'nonpayable',
+ type: 'function'
+ },
+ {
+ constant: true,
+ inputs: [],
+ name: 'ESCROW',
+ outputs: [
+ {
+ name: '',
+ type: 'address'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: true,
+ inputs: [],
+ name: 'GUILD',
+ outputs: [
+ {
+ name: '',
+ type: 'address'
+ }
+ ],
+ payable: false,
+ stateMutability: 'view',
+ type: 'function'
+ },
+ {
+ constant: false,
+ inputs: [
+ {
+ name: 'tokenToWhitelist',
+ type: 'address'
+ },
+ {
+ name: 'details',
+ type: 'string'
+ }
+ ],
+ name: 'submitWhitelistProposal',
+ outputs: [
+ {
+ name: 'proposalId',
+ type: 'uint256'
+ }
+ ],
+ payable: false,
+ stateMutability: 'nonpayable',
+ type: 'function'
+ },
+ {
+ inputs: [
+ {
+ name: '_summoner',
+ type: 'address'
+ },
+ {
+ name: '_approvedTokens',
+ type: 'address[]'
+ },
+ {
+ name: '_periodDuration',
+ type: 'uint256'
+ },
+ {
+ name: '_votingPeriodLength',
+ type: 'uint256'
+ },
+ {
+ name: '_gracePeriodLength',
+ type: 'uint256'
+ },
+ {
+ name: '_proposalDeposit',
+ type: 'uint256'
+ },
+ {
+ name: '_dilutionBound',
+ type: 'uint256'
+ },
+ {
+ name: '_processingReward',
+ type: 'uint256'
+ }
+ ],
+ payable: false,
+ stateMutability: 'nonpayable',
+ type: 'constructor'
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: true,
+ name: 'summoner',
+ type: 'address'
+ },
+ {
+ indexed: false,
+ name: 'tokens',
+ type: 'address[]'
+ },
+ {
+ indexed: false,
+ name: 'summoningTime',
+ type: 'uint256'
+ },
+ {
+ indexed: false,
+ name: 'periodDuration',
+ type: 'uint256'
+ },
+ {
+ indexed: false,
+ name: 'votingPeriodLength',
+ type: 'uint256'
+ },
+ {
+ indexed: false,
+ name: 'gracePeriodLength',
+ type: 'uint256'
+ },
+ {
+ indexed: false,
+ name: 'proposalDeposit',
+ type: 'uint256'
+ },
+ {
+ indexed: false,
+ name: 'dilutionBound',
+ type: 'uint256'
+ },
+ {
+ indexed: false,
+ name: 'processingReward',
+ type: 'uint256'
+ }
+ ],
+ name: 'SummonComplete',
+ type: 'event'
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: true,
+ name: 'applicant',
+ type: 'address'
+ },
+ {
+ indexed: false,
+ name: 'sharesRequested',
+ type: 'uint256'
+ },
+ {
+ indexed: false,
+ name: 'lootRequested',
+ type: 'uint256'
+ },
+ {
+ indexed: false,
+ name: 'tributeOffered',
+ type: 'uint256'
+ },
+ {
+ indexed: false,
+ name: 'tributeToken',
+ type: 'address'
+ },
+ {
+ indexed: false,
+ name: 'paymentRequested',
+ type: 'uint256'
+ },
+ {
+ indexed: false,
+ name: 'paymentToken',
+ type: 'address'
+ },
+ {
+ indexed: false,
+ name: 'details',
+ type: 'string'
+ },
+ {
+ indexed: false,
+ name: 'flags',
+ type: 'bool[6]'
+ },
+ {
+ indexed: false,
+ name: 'proposalId',
+ type: 'uint256'
+ },
+ {
+ indexed: true,
+ name: 'delegateKey',
+ type: 'address'
+ },
+ {
+ indexed: true,
+ name: 'memberAddress',
+ type: 'address'
+ }
+ ],
+ name: 'SubmitProposal',
+ type: 'event'
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: true,
+ name: 'delegateKey',
+ type: 'address'
+ },
+ {
+ indexed: true,
+ name: 'memberAddress',
+ type: 'address'
+ },
+ {
+ indexed: false,
+ name: 'proposalId',
+ type: 'uint256'
+ },
+ {
+ indexed: false,
+ name: 'proposalIndex',
+ type: 'uint256'
+ },
+ {
+ indexed: false,
+ name: 'startingPeriod',
+ type: 'uint256'
+ }
+ ],
+ name: 'SponsorProposal',
+ type: 'event'
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: false,
+ name: 'proposalId',
+ type: 'uint256'
+ },
+ {
+ indexed: true,
+ name: 'proposalIndex',
+ type: 'uint256'
+ },
+ {
+ indexed: true,
+ name: 'delegateKey',
+ type: 'address'
+ },
+ {
+ indexed: true,
+ name: 'memberAddress',
+ type: 'address'
+ },
+ {
+ indexed: false,
+ name: 'uintVote',
+ type: 'uint8'
+ }
+ ],
+ name: 'SubmitVote',
+ type: 'event'
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: true,
+ name: 'proposalIndex',
+ type: 'uint256'
+ },
+ {
+ indexed: true,
+ name: 'proposalId',
+ type: 'uint256'
+ },
+ {
+ indexed: false,
+ name: 'didPass',
+ type: 'bool'
+ }
+ ],
+ name: 'ProcessProposal',
+ type: 'event'
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: true,
+ name: 'proposalIndex',
+ type: 'uint256'
+ },
+ {
+ indexed: true,
+ name: 'proposalId',
+ type: 'uint256'
+ },
+ {
+ indexed: false,
+ name: 'didPass',
+ type: 'bool'
+ }
+ ],
+ name: 'ProcessWhitelistProposal',
+ type: 'event'
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: true,
+ name: 'proposalIndex',
+ type: 'uint256'
+ },
+ {
+ indexed: true,
+ name: 'proposalId',
+ type: 'uint256'
+ },
+ {
+ indexed: false,
+ name: 'didPass',
+ type: 'bool'
+ }
+ ],
+ name: 'ProcessGuildKickProposal',
+ type: 'event'
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: true,
+ name: 'memberAddress',
+ type: 'address'
+ },
+ {
+ indexed: false,
+ name: 'sharesToBurn',
+ type: 'uint256'
+ },
+ {
+ indexed: false,
+ name: 'lootToBurn',
+ type: 'uint256'
+ }
+ ],
+ name: 'Ragequit',
+ type: 'event'
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: true,
+ name: 'token',
+ type: 'address'
+ },
+ {
+ indexed: false,
+ name: 'amountToCollect',
+ type: 'uint256'
+ }
+ ],
+ name: 'TokensCollected',
+ type: 'event'
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: true,
+ name: 'proposalId',
+ type: 'uint256'
+ },
+ {
+ indexed: false,
+ name: 'applicantAddress',
+ type: 'address'
+ }
+ ],
+ name: 'CancelProposal',
+ type: 'event'
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: true,
+ name: 'memberAddress',
+ type: 'address'
+ },
+ {
+ indexed: false,
+ name: 'newDelegateKey',
+ type: 'address'
+ }
+ ],
+ name: 'UpdateDelegateKey',
+ type: 'event'
+ },
+ {
+ anonymous: false,
+ inputs: [
+ {
+ indexed: true,
+ name: 'memberAddress',
+ type: 'address'
+ },
+ {
+ indexed: false,
+ name: 'token',
+ type: 'address'
+ },
+ {
+ indexed: false,
+ name: 'amount',
+ type: 'uint256'
+ }
+ ],
+ name: 'Withdraw',
+ type: 'event'
+ }
+ ]
+}
diff --git a/src/lib/wallet.js b/src/lib/wallet.js
deleted file mode 100644
index 703ab3b70..000000000
--- a/src/lib/wallet.js
+++ /dev/null
@@ -1,92 +0,0 @@
-import Web3Modal from 'web3modal';
-import { Authereum } from 'authereum';
-import Torus from '@toruslabs/torus-embed';
-import WalletConnectProvider from '@walletconnect/web3-provider';
-import { config } from 'config'
-
-const Web3 = require('web3');
-const Fortmatic = require('fortmatic');
-
-const providerOptions = {
- fortmatic: {
- package: Fortmatic,
- options: {
- key: config.keys.fortmatic,
- },
- },
- authereum: {
- package: Authereum,
- },
- torus: {
- package: Torus,
- },
- walletconnect: {
- package: WalletConnectProvider,
- options: {
- infuraId: config.keys.infura,
- },
- },
-};
-
-const web3Modal = new Web3Modal({
- network: 'mainnet',
- cacheProvider: true,
- disableInjectedProvider: false,
- providerOptions,
-});
-
-
-const _subscribeProvider = async (provider) => {
- if (!provider.on) {
- return;
- }
- // Subscribe to accounts change
- provider.on('accountsChanged', (accounts) => {
- console.log(accounts);
- });
-
- // Subscribe to chainId change
- provider.on('chainChanged', (chainId) => {
- console.log(chainId);
- });
-
- // Subscribe to provider connection
- provider.on('connect', (info) => {
- console.log(info);
- });
-};
-
-/**
-* @summary setups a wallet either via plugin or iframe
-*/
-const _connectWallet = async () => {
- console.log('connect web3');
- let wallet;
- try {
- const provider = await web3Modal.connect();
- wallet = new Web3(provider);
- _subscribeProvider(provider);
- } catch (err) {
- console.log(err);
- }
-
- return wallet;
-};
-
-const _disconnectWallet = async () => {
- await web3Modal.clearCachedProvider();
-};
-
-/**
-* @summary check web3 plugin and connects to code obejct
-*/
-const _getWallet = async () => {
- if (window.web3) {
- return new Web3(window.web3.currentProvider);
- }
- return await _connectWallet();
-};
-
-export const getWallet = _getWallet;
-export const connectWallet = _connectWallet;
-export const disconnectWallet = _disconnectWallet;
\ No newline at end of file
diff --git a/src/styles/Dapp.css b/src/styles/Dapp.css
index bf2cacb17..25a4e0358 100755
--- a/src/styles/Dapp.css
+++ b/src/styles/Dapp.css
@@ -2081,6 +2081,12 @@ blockquote {
text-align: center;
}
+.modal-spinner {
+ display: inline-block;
+ margin-top: -10px;
+ margin-bottom: 20px;
+}
+
.param {
display: inline-block;
padding-right: 10px;
@@ -3325,6 +3331,8 @@ blockquote {
text-align: left;
clear:both;
text-transform: uppercase;
+ max-height: 32px;
+ overflow: hidden;
}
.separator.agora-separator {
@@ -5003,7 +5011,6 @@ blockquote {
left: 0px;
right: 0px;
background: white;
- border-right:1px solid #e1d7e5;
overflow: hidden;
}
@@ -5015,7 +5022,6 @@ blockquote {
.burger-menu.burger-menu-close {
transition: width 0.15s ease 0.15s;
width:0px;
- border: 0px;
}
.hero-button {
@@ -6497,10 +6503,6 @@ input[type="file"] {
}
-.modal {
- opacity: 0;
-}
-
body {
overflow-x: hidden;
position: relative;
@@ -7908,6 +7910,8 @@ h4 {
background-color: transparent;
border-radius: 0px;
margin-bottom: 0px;
+ min-width: 200px;
+ overflow: hidden;
}
}