Created
September 3, 2018 07:28
-
-
Save GrandSchtroumpf/cfeca9f6ed9ea3bf8a79561b71e5ee04 to your computer and use it in GitHub Desktop.
The contract Decorator (empty)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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