We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
web3-plugin-example
4.0.1-rc.1
run:
cd tools/web3-plugin-example/ yarn test
You will see those logged:
yarn run v1.22.19 $ jest --config=./test/unit/jest.config.js PASS test/unit/custom_rpc_methods.test.ts FAIL test/unit/contract_method_wrappers.test.ts ● CustomRpcMethodsPlugin Tests › CustomRpcMethodsPlugin methods tests › should call contractMethodWrappersPlugin.getFormattedBalance with expected RPC object expect(jest.fn()).toHaveBeenCalledWith(...expected) - Expected + Received @@ -1,10 +1,9 @@ Object { "method": "eth_call", "params": Array [ Object { - "data": "0x70a082310000000000000000000000008da5e39ec14b57fb9bcd9aa2b4500e909119795d", "input": "0x70a082310000000000000000000000008da5e39ec14b57fb9bcd9aa2b4500e909119795d", "to": "0xdAC17F958D2ee523a2206206994597C13D831ec7", }, "latest", ],, Number of calls: 1 65 | DEFAULT_RETURN_FORMAT, 66 | ); > 67 | expect(requestManagerSendSpy).toHaveBeenCalledWith({ | ^ 68 | method: 'eth_call', 69 | params: [ 70 | { at test/unit/contract_method_wrappers.test.ts:67:34 at fulfilled (test/unit/contract_method_wrappers.test.ts:5:58) ● CustomRpcMethodsPlugin Tests › CustomRpcMethodsPlugin methods tests › should call CustomRpcMethodsPlugin.customRpcMethodWithParameters with expected RPC object expect(jest.fn()).toHaveBeenCalledWith(...expected) Expected: {"method": "eth_sendTransaction", "params": [{"data": "0xa9059cbb0000000000000000000000004f641def1e7845caab95ac717c80416082430d0d000000000000000000000000000000000000000000000000000000000000002a", "from": "0x8da5e39ec14b57fb9bcd9aa2b4500e909119795d", "gasPrice": "0x1ca14bd70", "input": "0xa9059cbb0000000000000000000000004f641def1e7845caab95ac717c80416082430d0d000000000000000000000000000000000000000000000000000000000000002a", "maxFeePerGas": undefined, "maxPriorityFeePerGas": undefined, "to": "0xdAC17F958D2ee523a2206206994597C13D831ec7"}]} Received 1 Object { - "method": "eth_sendTransaction", + "method": "eth_call", "params": Array [ Object { - "data": "0xa9059cbb0000000000000000000000004f641def1e7845caab95ac717c80416082430d0d000000000000000000000000000000000000000000000000000000000000002a", - "from": "0x8da5e39ec14b57fb9bcd9aa2b4500e909119795d", - "gasPrice": "0x1ca14bd70", - "input": "0xa9059cbb0000000000000000000000004f641def1e7845caab95ac717c80416082430d0d000000000000000000000000000000000000000000000000000000000000002a", - "maxFeePerGas": undefined, - "maxPriorityFeePerGas": undefined, + "input": "0x70a082310000000000000000000000008da5e39ec14b57fb9bcd9aa2b4500e909119795d", "to": "0xdAC17F958D2ee523a2206206994597C13D831ec7", }, + "latest", ], }, 2 Object { - "method": "eth_sendTransaction", - "params": Array [ - Object { - "data": "0xa9059cbb0000000000000000000000004f641def1e7845caab95ac717c80416082430d0d000000000000000000000000000000000000000000000000000000000000002a", - "from": "0x8da5e39ec14b57fb9bcd9aa2b4500e909119795d", - "gasPrice": "0x1ca14bd70", - "input": "0xa9059cbb0000000000000000000000004f641def1e7845caab95ac717c80416082430d0d000000000000000000000000000000000000000000000000000000000000002a", - "maxFeePerGas": undefined, - "maxPriorityFeePerGas": undefined, - "to": "0xdAC17F958D2ee523a2206206994597C13D831ec7", - }, - ], + "method": "eth_gasPrice", + "params": Array [], }, 3 Object { - "method": "eth_sendTransaction", - "params": Array [ - Object { - "data": "0xa9059cbb0000000000000000000000004f641def1e7845caab95ac717c80416082430d0d000000000000000000000000000000000000000000000000000000000000002a", - "from": "0x8da5e39ec14b57fb9bcd9aa2b4500e909119795d", - "gasPrice": "0x1ca14bd70", - "input": "0xa9059cbb0000000000000000000000004f641def1e7845caab95ac717c80416082430d0d000000000000000000000000000000000000000000000000000000000000002a", - "maxFeePerGas": undefined, - "maxPriorityFeePerGas": undefined, - "to": "0xdAC17F958D2ee523a2206206994597C13D831ec7", - }, - ], + "method": "eth_blockNumber", + "params": Array [], }, Number of calls: 8 99 | amount, 100 | ); > 101 | expect(requestManagerSendSpy).toHaveBeenCalledWith({ | ^ 102 | method: 'eth_sendTransaction', 103 | params: [ 104 | { at test/unit/contract_method_wrappers.test.ts:101:34 at fulfilled (test/unit/contract_method_wrappers.test.ts:5:58) Test Suites: 1 failed, 1 passed, 2 total Tests: 2 failed, 4 passed, 6 total
The text was updated successfully, but these errors were encountered:
Muhammad-Altabba
Successfully merging a pull request may close this issue.
Steps to reproduce the behavior
run:
You will see those logged:
The text was updated successfully, but these errors were encountered: