diff --git a/dist/esm/index.evm.js b/dist/esm/index.evm.js index 7371f6b..d3ff9c7 100644 --- a/dist/esm/index.evm.js +++ b/dist/esm/index.evm.js @@ -2,7 +2,7 @@ import { ethers } from 'ethers'; import Blockchains from '@depay/web3-blockchains'; const findFragment = ({ fragments, method, params })=>{ - return contract.interface.fragments.find((fragment) => { + return fragments.find((fragment) => { return( fragment.name == method && (fragment.inputs && params && typeof(params) === 'object' ? fragment.inputs.length == Object.keys(params).length : true) diff --git a/dist/esm/index.js b/dist/esm/index.js index 15bc1fc..dc57256 100644 --- a/dist/esm/index.js +++ b/dist/esm/index.js @@ -725,7 +725,7 @@ let simulate = async function ({ blockchain, from, to, keys, api, params }) { }; const findFragment = ({ fragments, method, params })=>{ - return contract.interface.fragments.find((fragment) => { + return fragments.find((fragment) => { return( fragment.name == method && (fragment.inputs && params && typeof(params) === 'object' ? fragment.inputs.length == Object.keys(params).length : true) diff --git a/dist/esm/index.solana.js b/dist/esm/index.solana.js index 2f15d64..17fb9b5 100644 --- a/dist/esm/index.solana.js +++ b/dist/esm/index.solana.js @@ -476,7 +476,7 @@ let simulate = async function ({ blockchain, from, to, keys, api, params }) { }; const findFragment = ({ fragments, method, params })=>{ - return contract.interface.fragments.find((fragment) => { + return fragments.find((fragment) => { return( fragment.name == method && (fragment.inputs && params && typeof(params) === 'object' ? fragment.inputs.length == Object.keys(params).length : true) diff --git a/dist/umd/index.evm.js b/dist/umd/index.evm.js index 6ca7a30..1493a5d 100644 --- a/dist/umd/index.evm.js +++ b/dist/umd/index.evm.js @@ -9,7 +9,7 @@ var Blockchains__default = /*#__PURE__*/_interopDefaultLegacy(Blockchains); const findFragment = ({ fragments, method, params })=>{ - return contract.interface.fragments.find((fragment) => { + return fragments.find((fragment) => { return( fragment.name == method && (fragment.inputs && params && typeof(params) === 'object' ? fragment.inputs.length == Object.keys(params).length : true) diff --git a/dist/umd/index.js b/dist/umd/index.js index 38a4cb1..400d0d8 100644 --- a/dist/umd/index.js +++ b/dist/umd/index.js @@ -731,7 +731,7 @@ }; const findFragment = ({ fragments, method, params })=>{ - return contract.interface.fragments.find((fragment) => { + return fragments.find((fragment) => { return( fragment.name == method && (fragment.inputs && params && typeof(params) === 'object' ? fragment.inputs.length == Object.keys(params).length : true) diff --git a/dist/umd/index.solana.js b/dist/umd/index.solana.js index 3aaa1dc..48c51a2 100644 --- a/dist/umd/index.solana.js +++ b/dist/umd/index.solana.js @@ -482,7 +482,7 @@ }; const findFragment = ({ fragments, method, params })=>{ - return contract.interface.fragments.find((fragment) => { + return fragments.find((fragment) => { return( fragment.name == method && (fragment.inputs && params && typeof(params) === 'object' ? fragment.inputs.length == Object.keys(params).length : true) diff --git a/src/platforms/evm/estimate.js b/src/platforms/evm/estimate.js index 149a4e7..611132d 100644 --- a/src/platforms/evm/estimate.js +++ b/src/platforms/evm/estimate.js @@ -1,7 +1,7 @@ import { ethers } from 'ethers' const findFragment = ({ fragments, method, params })=>{ - return contract.interface.fragments.find((fragment) => { + return fragments.find((fragment) => { return( fragment.name == method && (fragment.inputs && params && typeof(params) === 'object' ? fragment.inputs.length == Object.keys(params).length : true)