Display contract block creation (#4069)

* Add contract block creation to metadata

* Display mined block for contract on Contracts view

* Better use of Summary for Accounts

* Add sorted by mined block for contracts

* Proper Block Number sort // display in contract page

* PR Grumble

* Linting issues
This commit is contained in:
Nicolas Gotchac
2017-01-09 09:38:27 +01:00
committed by Jaco Greeff
parent 71e6e24a1f
commit cf0a20f08b
13 changed files with 161 additions and 99 deletions

View File

@@ -455,10 +455,15 @@ class DeployContract extends Component {
this.setState({ step: 'DEPLOYMENT' });
api
.newContract(abiParsed)
const contract = api.newContract(abiParsed);
contract
.deploy(options, params, this.onDeploymentState)
.then((address) => {
const blockNumber = contract._receipt
? contract.receipt.blockNumber.toNumber()
: null;
return Promise.all([
api.parity.setAccountName(address, name),
api.parity.setAccountMeta(address, {
@@ -466,8 +471,9 @@ class DeployContract extends Component {
contract: true,
timestamp: Date.now(),
deleted: false,
source,
description
blockNumber,
description,
source
})
])
.then(() => {