More ergonomic contracts interfaces (RxJs only initial) (#1015)
* More ergnomic contracts interfaces
* extend SubmittableResult
* Allow creation of contract from blueprint
* "decorate" Contract (just playing with interfaces)
* Make actual messages calls
* Rename to Rx{Blueprint, Cond, Contract}
* Add exports
* Support contract & contracts endpoints
* Remove unneeded ApiType generics (may return)
* Comment 2.x/1.x detection
This commit is contained in:
@@ -2,17 +2,17 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import { ContractABI, ContractABIFn } from './types';
|
||||
import { ContractABI, ContractABIFn, IAbi, IAbi$Messages } from './types';
|
||||
|
||||
import { stringCamelCase } from '@polkadot/util';
|
||||
|
||||
import { createMethod } from './method';
|
||||
import { validateAbi } from './validation';
|
||||
|
||||
export default class ContractAbi {
|
||||
export default class ContractAbi implements IAbi {
|
||||
readonly abi: ContractABI;
|
||||
readonly deploy: ContractABIFn;
|
||||
readonly messages: { [index: string]: ContractABIFn } = {};
|
||||
readonly messages: IAbi$Messages = {};
|
||||
|
||||
constructor (abi: ContractABI) {
|
||||
validateAbi(abi);
|
||||
|
||||
Reference in New Issue
Block a user