Skip to content

Commit

Permalink
fix/payment-gas-estimation (#263)
Browse files Browse the repository at this point in the history
* test: integration tests
* test: estimation smart wallets
* refactor(NoClient): method name
* build: rskj update
* test: hardhat test network
  • Loading branch information
franciscotobar authored Jul 18, 2024
1 parent a776f89 commit cd52801
Show file tree
Hide file tree
Showing 12 changed files with 1,849 additions and 1,357 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
run: npm run lint

- name: Run docker image
run: docker run -d -p 127.0.0.1:4444:4444 -p 127.0.0.1:4445:4445 --name enveloping-rskj -it -v $PWD/docker/logback.xml:/etc/rsk/logback.xml -v $PWD/docker/node.conf:/etc/rsk/node.conf rsksmart/rskj:FINGERROOT-5.0.0 --regtest
run: docker run -d -p 127.0.0.1:4444:4444 -p 127.0.0.1:4445:4445 --name enveloping-rskj -it -v $PWD/docker/logback.xml:/etc/rsk/logback.xml -v $PWD/docker/node.conf:/etc/rsk/node.conf rsksmart/rskj:ARROWHEAD-6.0.0 --regtest

- name: Run tests
run: npm run test -- --network regtest
31 changes: 31 additions & 0 deletions contracts/test/TestBoltzDeployVerifierEverythingAccepted.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// SPDX-License-Identifier:MIT
pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;

import "@rsksmart/rif-relay-contracts/contracts/interfaces/IDeployVerifier.sol";
import "@rsksmart/rif-relay-contracts/contracts/TokenHandler.sol";
import "@rsksmart/rif-relay-contracts/contracts/DestinationContractHandler.sol";

contract TestBoltzDeployVerifierEverythingAccepted is IDeployVerifier, TokenHandler, DestinationContractHandler {

function versionVerifier() external view override virtual returns (string memory){
return "2.0.1+enveloping.test-pea.iverifier";
}

event SampleRecipientPreCall();
event SampleRecipientPostCall(bool success);

function verifyRelayedCall(
/* solhint-disable-next-line no-unused-vars */
EnvelopingTypes.DeployRequest calldata relayRequest,
bytes calldata signature
)
external
override
virtual
returns (bytes memory) {
(signature, relayRequest);
emit SampleRecipientPreCall();
return ("no revert here");
}
}
2 changes: 1 addition & 1 deletion docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
To run the RSKj container please use the following command:

```bash
docker run -d -p 127.0.0.1:4444:4444 -p 127.0.0.1:4445:4445 --name relay-rskj-fingerroot-5.0.0 -it -v $PWD/docker/logback.xml:/etc/rsk/logback.xml -v $PWD/docker/node.conf:/etc/rsk/node.conf rsksmart/rskj:FINGERROOT-5.0.0 --regtest
docker run -d -p 127.0.0.1:4444:4444 -p 127.0.0.1:4445:4445 --name relay-rskj-arrowhead-6.0.0 -it -v $PWD/docker/logback.xml:/etc/rsk/logback.xml -v $PWD/docker/node.conf:/etc/rsk/node.conf rsksmart/rskj:ARROWHEAD-6.0.0 --regtest
```

You could also use docker-compose:
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3"
services:
rskj:
container_name: rsk-node
image: rsksmart/rskj:FINGERROOT-5.0.0
image: rsksmart/rskj:ARROWHEAD-6.0.0
ports:
- "127.0.0.1:4444:4444"
- "127.0.0.1:4445:4445"
Expand Down
1 change: 1 addition & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const config: HardhatUserConfig = {
regtest: {
url: getRskNodeUrl(),
chainId: 33,
gasPrice: 1, //RSKj on startup returns 0 gasPrice on first tx.
},
},
typechain: {
Expand Down
Loading

0 comments on commit cd52801

Please sign in to comment.