Skip to content

Instantly share code, notes, and snippets.

@GrandSchtroumpf
Created September 3, 2018 07:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GrandSchtroumpf/cfeca9f6ed9ea3bf8a79561b71e5ee04 to your computer and use it in GitHub Desktop.
Save GrandSchtroumpf/cfeca9f6ed9ea3bf8a79561b71e5ee04 to your computer and use it in GitHub Desktop.
The contract Decorator (empty)
import { Type } from '@angular/core';
import { ABIDefinition } from './models/abi.types';
export function Contract(config: {
abi: ABIDefinition[],
address: string
}) {
return function(Target: Type<any>) {
class DecoratedContract extends Target {
// FILL THIS PART LATER
}
return DecoratedContract;
};
}
// Example:
@Contract({abi: [], address: ''})
export class MyContract {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment