-
Notifications
You must be signed in to change notification settings - Fork 14
Hardhat + Localnet #54
New issue
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The local tests are able to run except for two specific errors which I have documented and would like @bojinovic to review. Also the calibnet test I think I am blocked related to an issue with the F3_ADDR value.
For the calibnet test I have this output, but I am thinking that the correct F3_ADDR value will fix and/or cleaning up the way that works so that F3_ADDR is inferred from the F3_PK.
export F3_ADDR=t3veh4pxl7337q2p6sqc2kmcun4tgqa7nupctohkd6yqo5iphlkk42yncrqswmbreek2xywcijpb6psk2cr6nq
# npx hardhat test --bail
Account Test
{
fil: {
address: 't3veh4pxl7337q2p6sqc2kmcun4tgqa7nupctohkd6yqo5iphlkk42yncrqswmbreek2xywcijpb6psk2cr6nq',
idAddress: 111415n
}
}
1) Test 1: Integration test port
DBG: (Test 1: Integration test port) ::::
Deploying contracts... (account)
Authenticating message...
0 passing (2m)
1 failing
1) Account Test
Test 1: Integration test port:
Error: missing revert data (action="call", data=null, reason=null, transaction={ "data": "0xf5c62e87000000000000000000000000000000000000000000000000000000000001b3370000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000006084680e6fe64ebe64d718a2a46145631fd52129b5c66e8b6e4d6216c754a7bf38f992fc3971f7d0ea0a6c217d1df164e213e0c7d718cb7fcb22151393c142e306411a881249b061710bb74c9c315ec7a476a3c56363af4799b9c27a9d9552fca500000000000000000000000000000000000000000000000000000000000000608eabea2a4001061ac4c9fe3c517725b8829b159149a863b2a2320cc628d026a871d3cb34947371f384a9eb49ff9bd56a019fa70e10c06ac5ca93df3c1d6f54d540c57cbe2f5209cafdc12146d5d59172dd4d8359015e10584fa6327de0ce5a6a", "from": "0xf7931ff7FC55d19EF4A8139fa7E4b3F06e03F2e2", "to": "0xA8095879b566A20BE28bafd55ca4A60B74Ce3BfE" }, invocation=null, revert=null, code=CALL_EXCEPTION, version=6.12.1)
at makeError (node_modules/ethers/src.ts/utils/errors.ts:694:21)
at getBuiltinCallException (node_modules/ethers/src.ts/abi/abi-coder.ts:118:21)
at Function.getBuiltinCallException (node_modules/ethers/src.ts/abi/abi-coder.ts:235:16)
at JsonRpcProvider.getRpcError (node_modules/ethers/src.ts/providers/provider-jsonrpc.ts:979:32)
at /var/lib/fil-sol/node_modules/ethers/src.ts/providers/provider-jsonrpc.ts:563:45
at processTicksAndRejections (node:internal/process/task_queues:95:5)
lib-dev/dev-env/README.md
Outdated
docker compose up | ||
``` | ||
|
||
Enter into the container from VS Code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After connecting to the docker container for the first time I needed to run
make install_solc_linux
Please either install that dependency in the docker build process or add a note to the README that it is a required step
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the readme with make deps_install
task that performs solc and yarn installs.
there's also a failing forge test on this PR:
|
This was a mistake commit. Was experimenting with deserialization. contract FilAddressSerialize is Test {
using FilecoinCBOR for *;
function test_1() external {
CommonTypes.FilAddress memory addr1 = CommonTypes.FilAddress({data: abi.encodePacked([uint8(0), 0x04, 0x22])});
//0x5860000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000022
CommonTypes.FilAddress memory addr2 = CommonTypes.FilAddress({data: abi.encode([0x66])});
//0x584000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000066
assertEq(addr2.serializeAddress(), abi.encodePacked([uint8(0), 0x04, 0x22]));
}
} Assert condition is wrong. Removed the test. |
thanks for these changes! With the latest code I am trying to run and validate the tests so that we can merge the PR. I think that I need to rebuild my docker environment and will try that. If you have other suggestions in the meantime, here is my output in the docker container:
|
Below is the latest result that I get running the calibnet tests. There are still some failures but i see more passing tests than failing tests!
|
@@ -30,6 +30,11 @@ import "../utils/Errors.sol"; | |||
/// @notice It imports the library and create a callable method for each method in the library | |||
/// @author Zondax AG | |||
contract DataCapApiTest { | |||
address _n; | |||
address _n2; | |||
function dummy() public view returns (uint) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this appears unused - please remove
closing in favor of: #63 |
Update: no longer WIP - it is done
Context
Contains hardhat dev. env. setup and initial tests (
market.t.ts
andverifreg.t.ts
).When complete, it will include all ports of all rust integration tests (from
./testing/
) on localnet setup with some tests being able to run on calibnet testnet.Approach
./lib-dev/dev-env
)./hh-test
) with config dependent on the network on which they're runAffected issues: