ens-usernames/app/components/ensSubManagement.js
Ricardo Guilherme Schmidt cbfdd9cc72
Removes multiple domain functionaility from project (#20)
* refactor ENSSubdomainRegistry

* Rename contract

* remove obsolete file

* typo

* Add legacy contract upgradability adaptor

* refactor Dapp to use UsernameRegistrar contract

* use reservedNames.js in usernameregistrar.spec.js

* change array of merkle roots to single merkle root

* load reserved words to deploy contract

* reorganized contract methods

* add withdraw methods for controller move excess funds & wrong ens nodes

* add deployed MerkleProof addresses

* include contract terms in the @notice of register

* approve and call fix & solidity update

* add approveAndCall support

* clear subnode owner and resolver
2018-09-04 18:49:39 -03:00

45 lines
1.5 KiB
JavaScript

import EmbarkJS from 'Embark/EmbarkJS';
import ENSRegistry from 'Embark/contracts/ENSRegistry';
import UsernameRegistrar from 'Embark/contracts/UsernameRegistrar';
import TestToken from 'Embark/contracts/TestToken';
import React, { Fragment } from 'react';
import { Form, FormGroup, FormControl, HelpBlock, Button, ControlLabel } from 'react-bootstrap';
import AddDomain from './ens/addDomain';
import MoveDomain from './ens/moveDomain';
import RegisterSubDomain from './ens/registerSubDomain';
import TokenPermissions from './standard/TokenPermission';
import SetupENS from './ens/setupENS';
import UpdateController from './ens/updateController';
const FieldGroup = ({ id, label, help, ...props }) => (
<FormGroup controlId={id}>
<ControlLabel>{label}</ControlLabel>
<FormControl {...props} />
{help && <HelpBlock>{help}</HelpBlock>}
</FormGroup>
)
const ENSSubManagement = props => (
<Fragment>
<h2 style={{ textAlign: 'center' }}>Subdomain Management</h2>
<h3>Change Registry Controller</h3>
<UpdateController />
<h3>Activate Registry/Update Registry Price</h3>
<AddDomain />
<h3>Move Domain To Another Registry</h3>
<MoveDomain />
<hr/>
<h3>Register Sub-Domain</h3>
<RegisterSubDomain />
<hr/>
<TokenPermissions
symbol='SNT'
spender={UsernameRegistrar._address}
methods={TestToken.methods} />
<hr/>
<SetupENS ENSRegistry={ENSRegistry} />
</Fragment>
)
export default ENSSubManagement;