Skip to content

Commit 70bee4f

Browse files
committed
Update doc
1 parent 71ba229 commit 70bee4f

File tree

4 files changed

+21
-19
lines changed

4 files changed

+21
-19
lines changed

CHANGELOG.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,38 @@ Please follow <https://changelog.md/> conventions.
44

55

66

7-
## 1.0.1 - 20240429
7+
## 1.0.1 - 20240430
88

9-
In the version 1.0.0, when fees are paid in native tokens, the function ccipSend from the CCIP router was called without the `value`argument.
9+
- In the version 1.0.0, when fees are paid in native tokens, the function `ccipSend` from the CCIP router was called without the `value`argument.
1010

11-
Old version
11+
**Old version**
12+
13+
```solidity
14+
// Send CCIP Message
15+
messageId = router.ccipSend(_destinationChainSelector, message);
16+
```
1217

1318
**new version**
1419

1520
```solidity
1621
if(_paymentMethodId == 0){ // Native token
17-
messageId = router.ccipSend{value: fees}(_destinationChainSelector, message);
22+
messageId = router.ccipSend{value: fees}(_destinationChainSelector, message);
1823
} else{
19-
messageId = router.ccipSend(_destinationChainSelector, message);
24+
messageId = router.ccipSend(_destinationChainSelector, message);
2025
}
2126
```
2227

28+
Tests have been improved to catch this bug.
29+
30+
- Chainlink has released a library ([Chainlink local](https://github.com/smartcontractkit/chainlink-local/tree/main)) to test Chainlink CCIP locally. This version includes a test using this simulator where fees are paid in native tokens.
31+
32+
- This version adds also:
33+
34+
- A public function ` getFee` in order to know the fees from the router
35+
- A function `setMessageData`to set the data inside the message if in the future, there is a change in the CCIP bridge. Current default value is an empty string
36+
- Rename the function `setGasLimit` in `setMessageGasLimit` to clearly indicate that it is the gas limit put in the message for CCIP.
2337

38+
2439

2540
## 1.0.0 - 20240423
2641

doc/technical.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ setAllowlistChain(6433500567565415381, true, true)
2626

2727
### Authorize user to use the contracts
2828

29-
Our function `transferTokens` from our sender contract is protected by an access control. Only authorized user can transfer tokens. Therefore we will authorize our
29+
Our function `transferTokens` from our sender contract is protected by an access control. Only authorized user can transfer tokens. Therefore we have to authorize each users by granting them the role `BRIDGE_USER_ROLE'
3030

3131
```solidity
3232
grantRole(bytes32 role, address account)

src/bridge/modules/security/AuthorizationModule.sol

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ import "openzeppelin-contracts/access/AccessControl.sol";
66

77

88
abstract contract AuthorizationModule is AccessControl{
9-
/**
10-
* @notice Manage the failed message and transfer tokens if necessary.
11-
* @dev used by CCCIP Receiver Defensive
12-
*/
13-
bytes32 public constant BRIDGE_MESSAGE_MANAGER = keccak256("BRIDGE_MESSAGE_MANAGER");
14-
159
/**
1610
* @notice Can manage the different chain allowed by our bridge
1711
*/

test/nativeToken/baseNativeToken.sol

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ contract baseTest is HelperContract {
2020
);
2121
erc20 = new ERC20Mock();
2222
}
23-
24-
2523
/*********** CCIPSender Payment ***********/
2624

2725
function testCanAdminSetTokenNativeAsFee() public{
@@ -76,12 +74,7 @@ contract baseTest is HelperContract {
7674
CCIPSENDER_CONTRACT.withdrawNativeTokens(RECEIVER_ADDRESS, 0 ether);
7775
}
7876

79-
80-
81-
8277
/****Build token amounts */
83-
84-
8578
function testCanBuildCCIPTransferMessageForOneTokenWithNativeTokens() public{
8679
// Arrange
8780
uint256 value = 1000;

0 commit comments

Comments
 (0)