Hi Guys,
I am trying to integrate gsn in my use case and getting
Rejected relayTransaction call TypeError: Cannot read property ‘contract’ of undefined
at ContractInteractor.getPastEventsForHub (/Users/virazmalhotra/Development/front-monorepo/packages/front-contracts/node_modules/@opengsn/gsn/src/relayclient/ContractInteractor.ts:306:60)
at KnownRelaysManager._fetchRecentlyActiveRelayManagers (/Users/virazmalhotra/Development/front-monorepo/packages/front-contracts/node_modules/@opengsn/gsn/src/relayclient/KnownRelaysManager.ts:109:62)
at processTicksAndRejections (internal/process/task_queues.js:85:5)
at KnownRelaysManager.refresh (/Users/virazmalhotra/Development/front-monorepo/packages/front-contracts/node_modules/@opengsn/gsn/src/relayclient/KnownRelaysManager.ts:66:41)
at RelayClient.relayTransaction (/Users/virazmalhotra/Development/front-monorepo/packages/front-contracts/node_modules/@opengsn/gsn/src/relayclient/RelayClient.ts:176:5)
Also, I get a warning
WARNING: beta ignore version compatibility Error: Provided Hub version(1.0) is not supported by the current interactor(2.0.1)
at ContractInteractor._validateVersion (/Users/virazmalhotra/Development/front-monorepo/packages/front-contracts/node_modules/@opengsn/gsn/src/relayclient/ContractInteractor.ts:173:13)
at /Users/virazmalhotra/Development/front-monorepo/packages/front-contracts/node_modules/@opengsn/gsn/src/relayclient/GSNConfigurator.ts:76:154
at processTicksAndRejections (internal/process/task_queues.js:85:5)
at async Promise.all (index 3)
at Object.resolveConfigurationGSN (/Users/virazmalhotra/Development/front-monorepo/packages/front-contracts/node_modules/@opengsn/gsn/src/relayclient/GSNConfigurator.ts:71:7)
I have open gsn 2.0.1
I have a custom patymaster contract and setting the relayhub like this
await paymaster.setRelayHub( RELAYHUB.address, { from: gsnAccount}) config = resolveConfigurationGSN( web3provider.currentProvider, {paymasterAddress: paymaster.address, preferredRelays: [ 'http://127.0.0.1:55712' ], forwarderAddress: FORWARDER.address});
And I am able see my relayhub address when doing getHubAddr() but it looks like at the time of my tx call i.e
await factory.deploy(salt, smartwallet.address, encodedData, FORWARDER.address, { from: user2 });
the relay hub instance here
https://github.com/opengsn/gsn/blob/master/src/relayclient/ContractInteractor.ts#L299 is still undefined not sure why is that user2 here is the no eth fresh account created from the gsn provider
Need help on this thanks