-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: cherry pick multisig vote reset improvement (#87)
* feat: full test coverage (#85) * feat: unit test coverage * fix: slither --------- Co-authored-by: Dean Amiel <[email protected]> * feat(AxelarServiceGovernance): reset votes when approving multisig proposal * docs(AxelarServiceGovernance): documenting reset votes on new proposal. (#86) --------- Co-authored-by: Dean <[email protected]> Co-authored-by: Dean Amiel <[email protected]> Co-authored-by: Kiryl Yermakou <[email protected]>
- Loading branch information
1 parent
c20941b
commit 73d60a0
Showing
26 changed files
with
1,161 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity ^0.8.0; | ||
|
||
import { AxelarExecutable } from '../../executable/AxelarExecutable.sol'; | ||
|
||
contract DestinationChainReceiver is AxelarExecutable { | ||
event Received(uint256 num); | ||
|
||
constructor(address gatewayAddress) AxelarExecutable(gatewayAddress) {} | ||
|
||
function _execute( | ||
string calldata, /*sourceChain*/ | ||
string calldata, /*sourceAddress*/ | ||
bytes calldata payload | ||
) internal override { | ||
uint256 num = abi.decode(payload, (uint256)); | ||
emit Received(num); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity ^0.8.0; | ||
|
||
import { IAxelarGateway } from '../../interfaces/IAxelarGateway.sol'; | ||
|
||
contract SourceChainSender { | ||
IAxelarGateway public gateway; | ||
string public destinationChain; | ||
string public executableAddress; | ||
|
||
event Sent(uint256 num); | ||
|
||
constructor( | ||
address gateway_, | ||
string memory destinationChain_, | ||
string memory executableAddress_ | ||
) { | ||
gateway = IAxelarGateway(gateway_); | ||
destinationChain = destinationChain_; | ||
executableAddress = executableAddress_; | ||
} | ||
|
||
function send(uint256 num) external { | ||
bytes memory payload = abi.encode(num); | ||
gateway.callContract(destinationChain, executableAddress, payload); | ||
emit Sent(num); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity ^0.8.0; | ||
|
||
contract NoFallback { | ||
// No fallback function | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity ^0.8.0; | ||
|
||
import { InitProxy } from '../../upgradable/InitProxy.sol'; | ||
|
||
contract CallInitProxy is InitProxy { | ||
function getContractId() external pure returns (bytes32) { | ||
return contractId(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity ^0.8.0; | ||
|
||
import { Upgradable } from '../../upgradable/Upgradable.sol'; | ||
|
||
contract InvalidUpgradableTest is Upgradable { | ||
function contractId() external pure override returns (bytes32) { | ||
return keccak256('invalid'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity ^0.8.0; | ||
|
||
import { FixedProxy } from '../../upgradable/FixedProxy.sol'; | ||
|
||
contract TestFixedProxy is FixedProxy { | ||
constructor(address implementationAddress) FixedProxy(implementationAddress) {} | ||
|
||
function contractId() internal pure override returns (bytes32) { | ||
return keccak256('proxy-implementation'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity ^0.8.0; | ||
|
||
import { InitProxy } from '../../upgradable/InitProxy.sol'; | ||
|
||
contract TestInitProxy is InitProxy { | ||
function contractId() internal pure override returns (bytes32) { | ||
return keccak256('proxy-implementation'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.