fix(contract):remove callData from method

dev
neeboo 5 years ago
parent dfdde42131
commit 98d6ccd0c6
  1. 2
      e2e/tsconfig.json
  2. 6
      packages/harmony-contract/src/methods/method.ts

@ -5,7 +5,7 @@
"rootDir": "src", "rootDir": "src",
"declarationDir": "dist" "declarationDir": "dist"
}, },
"include": ["src", "../typings/**/*.d.ts"], "include": ["src", "../typings/**/*.d.ts", "fixtures"],
"references": [ "references": [
{ "path": "../packages/harmony-account" }, { "path": "../packages/harmony-account" },
{ "path": "../packages/harmony-crypto" }, { "path": "../packages/harmony-crypto" },

@ -22,7 +22,6 @@ export class ContractMethod {
abiItem: AbiItemModel; abiItem: AbiItemModel;
callResponse?: any; callResponse?: any;
callPayload?: any; callPayload?: any;
callData?: string;
protected transaction: Transaction; protected transaction: Transaction;
constructor( constructor(
@ -39,7 +38,6 @@ export class ContractMethod {
this.transaction = this.createTransaction(); this.transaction = this.createTransaction();
this.callPayload = undefined; this.callPayload = undefined;
this.callResponse = undefined; this.callResponse = undefined;
this.callData = undefined;
} }
send(params: any): Emitter { send(params: any): Emitter {
try { try {
@ -182,13 +180,11 @@ export class ContractMethod {
} }
encodeABI() { encodeABI() {
const encodedABI = methodEncoder( return methodEncoder(
this.contract.abiCoder, this.contract.abiCoder,
this.abiItem, this.abiItem,
this.contract.data, this.contract.data,
); );
this.callData = encodedABI;
return encodedABI;
} }
public debug() { public debug() {

Loading…
Cancel
Save