verification: add mainnet BadgeReg ids (#4190)

* verification: mainnet BadgeReg ids

* verification: fetch contracts by name

* verification: better wording

* typo

* reregistered badges
This commit is contained in:
Jannis Redmann
2017-01-19 08:45:32 +01:00
committed by arkpar
parent 516e16a36b
commit ff3ae33d99
5 changed files with 40 additions and 5 deletions

View File

@@ -73,6 +73,26 @@ export default class BadgeReg {
});
}
fetchCertifierByName (name) {
return this
.getContract()
.then((badgeReg) => {
return badgeReg.instance.fromName.call({}, [ name ]);
})
.then(([ id, address, owner ]) => {
if (address === ZERO20) {
throw new Error(`Certifier ${name} does not exist.`);
}
return this.fetchMeta(id)
.then(({ title, icon }) => {
const data = { address, id, name, title, icon };
this.certifiers[id] = data;
return data;
});
});
}
fetchMeta (id) {
return this
.getContract()