I did all modification related to this instruction https://github.com/tabookey/tabookey-gasless

However, when I'm trying to write some tests it fails and provides me the following error

     Error: No relay responded! 4 attempted, 4 pinged
      at RelayClient.relayTransaction (node_modules/tabookey-gasless/src/js/relayclient/relayclient.js:264:15)
      at processTicksAndRejections (internal/process/next_tick.js:81:5)

the logs are

relayTransaction: req: from:0xc.....
relayTransaction: [object Object]
One batch of relays failed, last error:  No response matched filter from any server: [object Object]

Here is an implemented code:

    var tabookey = require('tabookey-gasless');
    var provider = new tabookey.RelayProvider(web3.currentProvider, {});

    it("test transfer gas free", async function() {


        let initBalance = await web3.eth.getBalance(account_one)

        let tokenTestAddress = "0x8......."
        let tokenTestRelay = await new web3.eth.Contract(Token._json.abi, tokenTestAddress); 
        let result = await tokenTestRelay.methods.transfer(account_two, 100).send({ from: account_one, gasPrice: 2000000000, gasLimit: 65000});

I use Ropsten network for tests relayHub is 0x1349584869A1C7b8dc8AE0e93D8c15F5BB3B4B87

I sent funds for one of the relay addressed, however, this does not help.

1 Answer 1


So found the reason:

1. The contract should be deployed

2. You need to send a deposit

you can implement own function in your contract.sol

    function deposit() public payable {

or use external script like http://gsn.tabookey.com/webtools/contractmanager.html

3. For tests you need to setup provider in a special for tests way example from taboo key team tabookey-gasless repo

NOTE: in real application its enough to set the provider in web3.
however, in Truffle, all contracts are built BEFORE the test have started, and COPIED the web3,
so changing the global one is not enough...
TokenContract.web3.setProvider(relayProvider) - should be for tests only

Here is an example gist

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.