Skip to content

Commit

Permalink
feat: simplify governance tests and support live network testing (#90)
Browse files Browse the repository at this point in the history
* simplify tests

* add back test contract
  • Loading branch information
milapsheth authored Sep 21, 2023
1 parent 9a7a82c commit f4bafcc
Show file tree
Hide file tree
Showing 17 changed files with 1,103 additions and 911 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.0;

import { BaseMultisig } from '../../governance/BaseMultisig.sol';

contract TestBaseMultiSig is BaseMultisig {
contract TestBaseMultisig is BaseMultisig {
constructor(address[] memory accounts, uint256 threshold) BaseMultisig(accounts, threshold) {}

function resetVotes(bytes32 topic) external {
Expand Down
3 changes: 3 additions & 0 deletions contracts/test/governance/TestInterchainGovernance.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ pragma solidity ^0.8.0;

import { InterchainGovernance } from '../../governance/InterchainGovernance.sol';

/**
* @dev This exists so Slither knows InterchainGovernance methods are being used.
*/
contract TestInterchainGovernance is InterchainGovernance {
constructor(
address gatewayAddress,
Expand Down
24 changes: 0 additions & 24 deletions contracts/test/governance/TestServiceGovernance.sol

This file was deleted.

25 changes: 25 additions & 0 deletions contracts/test/mocks/MockGatewayValidation.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

contract MockGatewayValidation {
function validateContractCall(
bytes32,
string calldata,
string calldata,
bytes32
) external pure returns (bool) {
return true;
}

function validateContractCallAndMint(
bytes32,
string calldata,
string calldata,
bytes32,
string calldata,
uint256
) external pure returns (bool) {
return true;
}
}
2 changes: 1 addition & 1 deletion hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module.exports = {
sources: './contracts',
},
mocha: {
timeout: 100000,
timeout: 4 * 60 * 60 * 1000, // 4 hrs
},
gasReporter: {
enabled: process.env.REPORT_GAS ? true : false,
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@axelar-network/axelar-gmp-sdk-solidity",
"version": "5.3.1",
"version": "5.3.3",
"description": "Solidity GMP SDK and utilities provided by Axelar for cross-chain development",
"main": "index.js",
"scripts": {
Expand Down
Loading

0 comments on commit f4bafcc

Please sign in to comment.