Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getAvailableAllocation(address _addr)
- constant
- returns (uint ethAvailableAllocation)
- {
- return investorActions.getAvailableAllocation(_addr);
- }
- onSubmit = async event => {
- event.preventDefault();
- const accounts = await web3.eth.getAccounts();
- await fund.methods.getAvailableAllocation(this.state.value).call({
- from: accounts[0],
- address: this.state.value
- }).then(console.log);
- <form onSubmit={this.onSubmit}>
- <h4>Available allocation</h4>
- <h5>Get the remaining available amount in Ether that an investor can subscribe for</h5>
- <div>
- <label>Your ethereum address</label>
- <input
- value={this.state.address}
- onChange={event => this.setState({ address: event.target.value })}
- />
- </div>
- <button>Get available allocation</button>
- </form>
Add Comment
Please, Sign In to add comment