/* * This file is auto-generated using abi-gen. Any changes will be reverted */ // Needed for the promisifed events, some contracts don't have events // tslint:disable:no-unused-variable import { DecodedLogEntryEvent, DecodedLogEntry, DecodedTransactionReceipt } from "@joincivil/typescript-types"; // tslint:enable:no-unused-variable import "rxjs/add/operator/distinctUntilChanged"; import {Contract} from "web3-eth-contract"; import {TransactionConfig, TransactionConfig as SendOptions} from "web3-core"; import { bindNestedAll, isDefined, CivilErrors } from "@joincivil/utils"; import * as Debug from "debug"; import { EthAddress, TxHash } from "@joincivil/typescript-types"; import { streamifyEvent } from "../../../contracts/utils/contracts"; import { EthApi, currentNetwork } from "@joincivil/ethapi"; import { BaseContract } from "../../basecontract"; import { artifacts } from "../artifacts"; // hack(dankins): abi-gen things these are bignumber.js, but they are actually returned as strings // https://github.com/0xProject/0x-monorepo/blob/development/packages/abi-gen/src/utils.ts#L64 type BigNumber = string; const debug = Debug("civil:contracts:NewsroomContract"); export class NewsroomContract extends BaseContract { // tslint:disable:member-ordering public static async singletonTrusted(ethApi: EthApi): Promise { if (!artifacts.Newsroom.networks) { debug("Trying to get singleton from contract without any singleton data"); return undefined; } const networkId = (await currentNetwork(ethApi)).toString(); const networkData = artifacts.Newsroom.networks[networkId]; if (!networkData) { debug("Failed to find network data for network ID " + networkId + ". Supported networks: " + Object.keys(artifacts.Newsroom.networks)); return undefined; } return NewsroomContract.atUntrusted(ethApi, networkData.address); } public static atUntrusted(ethApi: EthApi, address: EthAddress): NewsroomContract { const contract = ethApi.getContractClass(artifacts.Newsroom.abi, address); return new NewsroomContract(contract, ethApi); } // TODO(ritave): This code won't work with smart-contracts with library links // see [ch429] in Clubhouse public static deployTrusted = { async sendTransactionAsync( ethApi: EthApi, newsroomName: string, charterUri: string, charterHash: string, options: SendOptions): Promise { if (!options.gas) { options.gas = await NewsroomContract.deployTrusted .estimateGasAsync( ethApi, newsroomName, charterUri, charterHash, ); } if (!options.gasPrice) { options.gasPrice = (await ethApi.getGasPrice()).toString(); } const clazz = ethApi.getContractClass(artifacts.Newsroom.abi); return new Promise( (resolve, reject) => { /* There's a bug in Metamask, this callback should be called twice, first when the transaction * gets into mempool, and second when it's mined. But it's called only once, so we have to resolve * the contract on our own */ const tx = clazz.deploy({data: artifacts.Newsroom.bytecode, arguments: [newsroomName, charterUri, charterHash, ]}).send(options); return tx.once("transactionHash", resolve) }) }, async estimateGasAsync( ethApi: EthApi, newsroomName: string, charterUri: string, charterHash: string, ): Promise { const clazz = ethApi.getContractClass(artifacts.Newsroom.abi); const contractData = clazz.deploy({ data: artifacts.Newsroom.bytecode, arguments: [newsroomName, charterUri, charterHash, ] }).encodeABI(); return ethApi.estimateGas({data: contractData}); }, }; // tslint:disable:variable-name public name = { async callAsync( ): Promise { const self = this as NewsroomContract; return self.instance.methods.name().call(); } } public hasRole = { async callAsync( user: string, role: string, ): Promise { const self = this as NewsroomContract; return self.instance.methods.hasRole(user, role, ).call(); } } public isOwner = { async callAsync( user: string, ): Promise { const self = this as NewsroomContract; return self.instance.methods.isOwner(user, ).call(); } } public renounceOwnership = { async sendTransactionAsync( txData?: TransactionConfig, ): Promise { const self = this as NewsroomContract; const txOptions: TransactionConfig = { ...self.configuration.txDefaults, ...txData }; debug(`renounceOwnership()`); debug("renounceOwnership: txOptions:", txOptions); debug("renounceOwnership: Sending with:", ); txOptions.to = self.instance.options.address; txOptions.data = self.instance.methods.renounceOwnership().encodeABI(); if (!isDefined(txOptions.gas)) { txOptions.gas = await self.ethApi.estimateGas(txOptions); } if (!isDefined(txOptions.gasPrice)) { const gasPricePromise = self.ethApi.getGasPriceString() txOptions.gasPrice = (await gasPricePromise).toString(); debug("renounceOwnership: new gas price: ", txOptions.gasPrice); } return self.ethApi.sendTransaction(txOptions) }, async estimateGasAsync( txData?: TransactionConfig, ): Promise { const self = this as NewsroomContract; const estimateGas = self.instance.methods.renounceOwnership().estimateGas try { const estimate = Math.floor(await estimateGas(txData) * self.configuration.estimationMultiplier); debug("renounceOwnership: Gas estimation:", estimate); return estimate; } catch (e) { debug("renounceOwnership: Gas estimation failed, only sensible error is EVM error", e); throw new Error(CivilErrors.EvmException); } }, async getRaw( txData?: TransactionConfig, ): Promise { const self = this as NewsroomContract; const options: TransactionConfig = {... txData}; if (!isDefined(options.gas)) { options.gas = await self.renounceOwnership.estimateGasAsync( options, ); } options.data = self.instance.methods.renounceOwnership().encodeABI(); return options; }, }; public owner = { async callAsync( ): Promise { const self = this as NewsroomContract; return self.instance.methods.owner().call(); } } public contentCount = { async callAsync( ): Promise { const self = this as NewsroomContract; return self.instance.methods.contentCount().call(); } } public transferOwnership = { async sendTransactionAsync( _newOwner: string, txData?: TransactionConfig, ): Promise { const self = this as NewsroomContract; const txOptions: TransactionConfig = { ...self.configuration.txDefaults, ...txData }; debug(`transferOwnership(_newOwner: string, )`); debug("transferOwnership: txOptions:", txOptions); debug("transferOwnership: Sending with:", _newOwner, ); txOptions.to = self.instance.options.address; txOptions.data = self.instance.methods.transferOwnership(_newOwner, ).encodeABI(); if (!isDefined(txOptions.gas)) { txOptions.gas = await self.ethApi.estimateGas(txOptions); } if (!isDefined(txOptions.gasPrice)) { const gasPricePromise = self.ethApi.getGasPriceString() txOptions.gasPrice = (await gasPricePromise).toString(); debug("transferOwnership: new gas price: ", txOptions.gasPrice); } return self.ethApi.sendTransaction(txOptions) }, async estimateGasAsync( _newOwner: string, txData?: TransactionConfig, ): Promise { const self = this as NewsroomContract; const estimateGas = self.instance.methods.transferOwnership(_newOwner, ).estimateGas try { const estimate = Math.floor(await estimateGas(txData) * self.configuration.estimationMultiplier); debug("transferOwnership: Gas estimation:", estimate); return estimate; } catch (e) { debug("transferOwnership: Gas estimation failed, only sensible error is EVM error", e); throw new Error(CivilErrors.EvmException); } }, async getRaw( _newOwner: string, txData?: TransactionConfig, ): Promise { const self = this as NewsroomContract; const options: TransactionConfig = {... txData}; if (!isDefined(options.gas)) { options.gas = await self.transferOwnership.estimateGasAsync( _newOwner, options, ); } options.data = self.instance.methods.transferOwnership(_newOwner, ).encodeABI(); return options; }, }; public getContent = { async callAsync( contentId: BigNumber, ): Promise< [string, string, BigNumber, string, string]> { const self = this as NewsroomContract; return self.instance.methods.getContent(contentId, ).call(); } } public getRevision = { async callAsync( contentId: BigNumber, revisionId: BigNumber, ): Promise< [string, string, BigNumber, string, string]> { const self = this as NewsroomContract; return self.instance.methods.getRevision(contentId, revisionId, ).call(); } } public revisionCount = { async callAsync( contentId: BigNumber, ): Promise { const self = this as NewsroomContract; return self.instance.methods.revisionCount(contentId, ).call(); } } public isContentSigned = { async callAsync( contentId: BigNumber, ): Promise { const self = this as NewsroomContract; return self.instance.methods.isContentSigned(contentId, ).call(); } } public isRevisionSigned = { async callAsync( contentId: BigNumber, revisionId: BigNumber, ): Promise { const self = this as NewsroomContract; return self.instance.methods.isRevisionSigned(contentId, revisionId, ).call(); } } public setName = { async sendTransactionAsync( newName: string, txData?: TransactionConfig, ): Promise { const self = this as NewsroomContract; const txOptions: TransactionConfig = { ...self.configuration.txDefaults, ...txData }; debug(`setName(newName: string, )`); debug("setName: txOptions:", txOptions); debug("setName: Sending with:", newName, ); txOptions.to = self.instance.options.address; txOptions.data = self.instance.methods.setName(newName, ).encodeABI(); if (!isDefined(txOptions.gas)) { txOptions.gas = await self.ethApi.estimateGas(txOptions); } if (!isDefined(txOptions.gasPrice)) { const gasPricePromise = self.ethApi.getGasPriceString() txOptions.gasPrice = (await gasPricePromise).toString(); debug("setName: new gas price: ", txOptions.gasPrice); } return self.ethApi.sendTransaction(txOptions) }, async estimateGasAsync( newName: string, txData?: TransactionConfig, ): Promise { const self = this as NewsroomContract; const estimateGas = self.instance.methods.setName(newName, ).estimateGas try { const estimate = Math.floor(await estimateGas(txData) * self.configuration.estimationMultiplier); debug("setName: Gas estimation:", estimate); return estimate; } catch (e) { debug("setName: Gas estimation failed, only sensible error is EVM error", e); throw new Error(CivilErrors.EvmException); } }, async getRaw( newName: string, txData?: TransactionConfig, ): Promise { const self = this as NewsroomContract; const options: TransactionConfig = {... txData}; if (!isDefined(options.gas)) { options.gas = await self.setName.estimateGasAsync( newName, options, ); } options.data = self.instance.methods.setName(newName, ).encodeABI(); return options; }, }; public addRole = { async sendTransactionAsync( who: string, role: string, txData?: TransactionConfig, ): Promise { const self = this as NewsroomContract; const txOptions: TransactionConfig = { ...self.configuration.txDefaults, ...txData }; debug(`addRole(who: string, role: string, )`); debug("addRole: txOptions:", txOptions); debug("addRole: Sending with:", who, role, ); txOptions.to = self.instance.options.address; txOptions.data = self.instance.methods.addRole(who, role, ).encodeABI(); if (!isDefined(txOptions.gas)) { txOptions.gas = await self.ethApi.estimateGas(txOptions); } if (!isDefined(txOptions.gasPrice)) { const gasPricePromise = self.ethApi.getGasPriceString() txOptions.gasPrice = (await gasPricePromise).toString(); debug("addRole: new gas price: ", txOptions.gasPrice); } return self.ethApi.sendTransaction(txOptions) }, async estimateGasAsync( who: string, role: string, txData?: TransactionConfig, ): Promise { const self = this as NewsroomContract; const estimateGas = self.instance.methods.addRole(who, role, ).estimateGas try { const estimate = Math.floor(await estimateGas(txData) * self.configuration.estimationMultiplier); debug("addRole: Gas estimation:", estimate); return estimate; } catch (e) { debug("addRole: Gas estimation failed, only sensible error is EVM error", e); throw new Error(CivilErrors.EvmException); } }, async getRaw( who: string, role: string, txData?: TransactionConfig, ): Promise { const self = this as NewsroomContract; const options: TransactionConfig = {... txData}; if (!isDefined(options.gas)) { options.gas = await self.addRole.estimateGasAsync( who, role, options, ); } options.data = self.instance.methods.addRole(who, role, ).encodeABI(); return options; }, }; public addEditor = { async sendTransactionAsync( who: string, txData?: TransactionConfig, ): Promise { const self = this as NewsroomContract; const txOptions: TransactionConfig = { ...self.configuration.txDefaults, ...txData }; debug(`addEditor(who: string, )`); debug("addEditor: txOptions:", txOptions); debug("addEditor: Sending with:", who, ); txOptions.to = self.instance.options.address; txOptions.data = self.instance.methods.addEditor(who, ).encodeABI(); if (!isDefined(txOptions.gas)) { txOptions.gas = await self.ethApi.estimateGas(txOptions); } if (!isDefined(txOptions.gasPrice)) { const gasPricePromise = self.ethApi.getGasPriceString() txOptions.gasPrice = (await gasPricePromise).toString(); debug("addEditor: new gas price: ", txOptions.gasPrice); } return self.ethApi.sendTransaction(txOptions) }, async estimateGasAsync( who: string, txData?: TransactionConfig, ): Promise { const self = this as NewsroomContract; const estimateGas = self.instance.methods.addEditor(who, ).estimateGas try { const estimate = Math.floor(await estimateGas(txData) * self.configuration.estimationMultiplier); debug("addEditor: Gas estimation:", estimate); return estimate; } catch (e) { debug("addEditor: Gas estimation failed, only sensible error is EVM error", e); throw new Error(CivilErrors.EvmException); } }, async getRaw( who: string, txData?: TransactionConfig, ): Promise { const self = this as NewsroomContract; const options: TransactionConfig = {... txData}; if (!isDefined(options.gas)) { options.gas = await self.addEditor.estimateGasAsync( who, options, ); } options.data = self.instance.methods.addEditor(who, ).encodeABI(); return options; }, }; public removeRole = { async sendTransactionAsync( who: string, role: string, txData?: TransactionConfig, ): Promise { const self = this as NewsroomContract; const txOptions: TransactionConfig = { ...self.configuration.txDefaults, ...txData }; debug(`removeRole(who: string, role: string, )`); debug("removeRole: txOptions:", txOptions); debug("removeRole: Sending with:", who, role, ); txOptions.to = self.instance.options.address; txOptions.data = self.instance.methods.removeRole(who, role, ).encodeABI(); if (!isDefined(txOptions.gas)) { txOptions.gas = await self.ethApi.estimateGas(txOptions); } if (!isDefined(txOptions.gasPrice)) { const gasPricePromise = self.ethApi.getGasPriceString() txOptions.gasPrice = (await gasPricePromise).toString(); debug("removeRole: new gas price: ", txOptions.gasPrice); } return self.ethApi.sendTransaction(txOptions) }, async estimateGasAsync( who: string, role: string, txData?: TransactionConfig, ): Promise { const self = this as NewsroomContract; const estimateGas = self.instance.methods.removeRole(who, role, ).estimateGas try { const estimate = Math.floor(await estimateGas(txData) * self.configuration.estimationMultiplier); debug("removeRole: Gas estimation:", estimate); return estimate; } catch (e) { debug("removeRole: Gas estimation failed, only sensible error is EVM error", e); throw new Error(CivilErrors.EvmException); } }, async getRaw( who: string, role: string, txData?: TransactionConfig, ): Promise { const self = this as NewsroomContract; const options: TransactionConfig = {... txData}; if (!isDefined(options.gas)) { options.gas = await self.removeRole.estimateGasAsync( who, role, options, ); } options.data = self.instance.methods.removeRole(who, role, ).encodeABI(); return options; }, }; public publishContent = { async sendTransactionAsync( contentUri: string, contentHash: string, author: string, signature: string, txData?: TransactionConfig, ): Promise { const self = this as NewsroomContract; const txOptions: TransactionConfig = { ...self.configuration.txDefaults, ...txData }; debug(`publishContent(contentUri: string, contentHash: string, author: string, signature: string, )`); debug("publishContent: txOptions:", txOptions); debug("publishContent: Sending with:", contentUri, contentHash, author, signature, ); txOptions.to = self.instance.options.address; txOptions.data = self.instance.methods.publishContent(contentUri, contentHash, author, signature, ).encodeABI(); if (!isDefined(txOptions.gas)) { txOptions.gas = await self.ethApi.estimateGas(txOptions); } if (!isDefined(txOptions.gasPrice)) { const gasPricePromise = self.ethApi.getGasPriceString() txOptions.gasPrice = (await gasPricePromise).toString(); debug("publishContent: new gas price: ", txOptions.gasPrice); } return self.ethApi.sendTransaction(txOptions) }, async estimateGasAsync( contentUri: string, contentHash: string, author: string, signature: string, txData?: TransactionConfig, ): Promise { const self = this as NewsroomContract; const estimateGas = self.instance.methods.publishContent(contentUri, contentHash, author, signature, ).estimateGas try { const estimate = Math.floor(await estimateGas(txData) * self.configuration.estimationMultiplier); debug("publishContent: Gas estimation:", estimate); return estimate; } catch (e) { debug("publishContent: Gas estimation failed, only sensible error is EVM error", e); throw new Error(CivilErrors.EvmException); } }, async getRaw( contentUri: string, contentHash: string, author: string, signature: string, txData?: TransactionConfig, ): Promise { const self = this as NewsroomContract; const options: TransactionConfig = {... txData}; if (!isDefined(options.gas)) { options.gas = await self.publishContent.estimateGasAsync( contentUri, contentHash, author, signature, options, ); } options.data = self.instance.methods.publishContent(contentUri, contentHash, author, signature, ).encodeABI(); return options; }, }; public updateRevision = { async sendTransactionAsync( contentId: BigNumber, contentUri: string, contentHash: string, signature: string, txData?: TransactionConfig, ): Promise { const self = this as NewsroomContract; const txOptions: TransactionConfig = { ...self.configuration.txDefaults, ...txData }; debug(`updateRevision(contentId: BigNumber, contentUri: string, contentHash: string, signature: string, )`); debug("updateRevision: txOptions:", txOptions); debug("updateRevision: Sending with:", contentId, contentUri, contentHash, signature, ); txOptions.to = self.instance.options.address; txOptions.data = self.instance.methods.updateRevision(contentId, contentUri, contentHash, signature, ).encodeABI(); if (!isDefined(txOptions.gas)) { txOptions.gas = await self.ethApi.estimateGas(txOptions); } if (!isDefined(txOptions.gasPrice)) { const gasPricePromise = self.ethApi.getGasPriceString() txOptions.gasPrice = (await gasPricePromise).toString(); debug("updateRevision: new gas price: ", txOptions.gasPrice); } return self.ethApi.sendTransaction(txOptions) }, async estimateGasAsync( contentId: BigNumber, contentUri: string, contentHash: string, signature: string, txData?: TransactionConfig, ): Promise { const self = this as NewsroomContract; const estimateGas = self.instance.methods.updateRevision(contentId, contentUri, contentHash, signature, ).estimateGas try { const estimate = Math.floor(await estimateGas(txData) * self.configuration.estimationMultiplier); debug("updateRevision: Gas estimation:", estimate); return estimate; } catch (e) { debug("updateRevision: Gas estimation failed, only sensible error is EVM error", e); throw new Error(CivilErrors.EvmException); } }, async getRaw( contentId: BigNumber, contentUri: string, contentHash: string, signature: string, txData?: TransactionConfig, ): Promise { const self = this as NewsroomContract; const options: TransactionConfig = {... txData}; if (!isDefined(options.gas)) { options.gas = await self.updateRevision.estimateGasAsync( contentId, contentUri, contentHash, signature, options, ); } options.data = self.instance.methods.updateRevision(contentId, contentUri, contentHash, signature, ).encodeABI(); return options; }, }; public signRevision = { async sendTransactionAsync( contentId: BigNumber, revisionId: BigNumber, author: string, signature: string, txData?: TransactionConfig, ): Promise { const self = this as NewsroomContract; const txOptions: TransactionConfig = { ...self.configuration.txDefaults, ...txData }; debug(`signRevision(contentId: BigNumber, revisionId: BigNumber, author: string, signature: string, )`); debug("signRevision: txOptions:", txOptions); debug("signRevision: Sending with:", contentId, revisionId, author, signature, ); txOptions.to = self.instance.options.address; txOptions.data = self.instance.methods.signRevision(contentId, revisionId, author, signature, ).encodeABI(); if (!isDefined(txOptions.gas)) { txOptions.gas = await self.ethApi.estimateGas(txOptions); } if (!isDefined(txOptions.gasPrice)) { const gasPricePromise = self.ethApi.getGasPriceString() txOptions.gasPrice = (await gasPricePromise).toString(); debug("signRevision: new gas price: ", txOptions.gasPrice); } return self.ethApi.sendTransaction(txOptions) }, async estimateGasAsync( contentId: BigNumber, revisionId: BigNumber, author: string, signature: string, txData?: TransactionConfig, ): Promise { const self = this as NewsroomContract; const estimateGas = self.instance.methods.signRevision(contentId, revisionId, author, signature, ).estimateGas try { const estimate = Math.floor(await estimateGas(txData) * self.configuration.estimationMultiplier); debug("signRevision: Gas estimation:", estimate); return estimate; } catch (e) { debug("signRevision: Gas estimation failed, only sensible error is EVM error", e); throw new Error(CivilErrors.EvmException); } }, async getRaw( contentId: BigNumber, revisionId: BigNumber, author: string, signature: string, txData?: TransactionConfig, ): Promise { const self = this as NewsroomContract; const options: TransactionConfig = {... txData}; if (!isDefined(options.gas)) { options.gas = await self.signRevision.estimateGasAsync( contentId, revisionId, author, signature, options, ); } options.data = self.instance.methods.signRevision(contentId, revisionId, author, signature, ).encodeABI(); return options; }, }; public ContentPublishedStream = streamifyEvent (this.instance, "ContentPublished"); public RevisionSignedStream = streamifyEvent (this.instance, "RevisionSigned"); public RevisionUpdatedStream = streamifyEvent (this.instance, "RevisionUpdated"); public NameChangedStream = streamifyEvent (this.instance, "NameChanged"); public RoleAddedStream = streamifyEvent (this.instance, "RoleAdded"); public RoleRemovedStream = streamifyEvent (this.instance, "RoleRemoved"); public OwnershipRenouncedStream = streamifyEvent (this.instance, "OwnershipRenounced"); public OwnershipTransferredStream = streamifyEvent (this.instance, "OwnershipTransferred"); // tslint:enable:variable-name private constructor(instance: Contract, ethApi: EthApi) { super(instance, ethApi); // Call methods access this instance while being in a sub-object, we're rebinding what // "this" means for everything in this class, this also requires "noImplicitThis" to be false bindNestedAll(this, ["constructor", "instance", "defaults", "ethApi"]); } // tslint:enable:member-ordering } // tslint:disable:no-namespace export namespace Newsroom { export enum Events { ContentPublished = "ContentPublished", RevisionSigned = "RevisionSigned", RevisionUpdated = "RevisionUpdated", NameChanged = "NameChanged", RoleAdded = "RoleAdded", RoleRemoved = "RoleRemoved", OwnershipRenounced = "OwnershipRenounced", OwnershipTransferred = "OwnershipTransferred", } // tslint:disable:class-name export namespace Args { export interface ContentPublished { editor: string; contentId: BigNumber; uri: string; } export interface RevisionSigned { contentId: BigNumber; revisionId: BigNumber; author: string; } export interface RevisionUpdated { editor: string; contentId: BigNumber; revisionId: BigNumber; uri: string; } export interface NameChanged { newName: string; } export interface RoleAdded { granter: string; grantee: string; role: string; } export interface RoleRemoved { granter: string; grantee: string; role: string; } export interface OwnershipRenounced { previousOwner: string; } export interface OwnershipTransferred { previousOwner: string; newOwner: string; } } // tslint:enable:class-name export namespace Logs { export type ContentPublished = DecodedLogEntry; export type RevisionSigned = DecodedLogEntry; export type RevisionUpdated = DecodedLogEntry; export type NameChanged = DecodedLogEntry; export type RoleAdded = DecodedLogEntry; export type RoleRemoved = DecodedLogEntry; export type OwnershipRenounced = DecodedLogEntry; export type OwnershipTransferred = DecodedLogEntry; export type All = Logs.ContentPublished | Logs.RevisionSigned | Logs.RevisionUpdated | Logs.NameChanged | Logs.RoleAdded | Logs.RoleRemoved | Logs.OwnershipRenounced | Logs.OwnershipTransferred; } export namespace LogEvents { export type ContentPublished = DecodedLogEntryEvent; export type RevisionSigned = DecodedLogEntryEvent; export type RevisionUpdated = DecodedLogEntryEvent; export type NameChanged = DecodedLogEntryEvent; export type RoleAdded = DecodedLogEntryEvent; export type RoleRemoved = DecodedLogEntryEvent; export type OwnershipRenounced = DecodedLogEntryEvent; export type OwnershipTransferred = DecodedLogEntryEvent; export type All = LogEvents.ContentPublished | LogEvents.RevisionSigned | LogEvents.RevisionUpdated | LogEvents.NameChanged | LogEvents.RoleAdded | LogEvents.RoleRemoved | LogEvents.OwnershipRenounced | LogEvents.OwnershipTransferred; } export type Receipt = DecodedTransactionReceipt; export type EventReceipt = DecodedTransactionReceipt; } // tslint:enable:no-namespace