Skip to content

Commit eae01b6

Browse files
committed
Merge branch 'main' into develop
2 parents 3318bab + d97d6e9 commit eae01b6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+4820
-161
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Manual NPM Publish (Beta Release)
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
environment: publish
10+
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v3
14+
15+
- name: Use Node.js
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version: "20.x"
19+
registry-url: "https://registry.npmjs.org"
20+
always-auth: true
21+
22+
- name: Setup npm authentication
23+
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
28+
- name: Publish
29+
run: npm publish --tag beta
30+
env:
31+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.prettierrc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"printWidth": 80,
3+
"tabWidth": 2,
4+
"useTabs": false,
5+
"semi": true,
6+
"singleQuote": true,
7+
"trailingComma": "es5",
8+
"bracketSpacing": true,
9+
"jsxBracketSameLine": false,
10+
"arrowParens": "avoid",
11+
"proseWrap": "always"
12+
}
13+

CHANGELOG.md

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,55 @@
33
All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
and this project adheres to
7+
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8+
9+
## [0.2.1] - 5 July 2024
10+
11+
### Dependencies
12+
13+
| Package | Version |
14+
| ------------------------- | ------- |
15+
| @chainlink/contracts-ccip | 1.4.0 |
16+
| @chainlink/contracts | 1.1.1 |
17+
18+
### Services
19+
20+
- [x] Chainlink CCIP
21+
- [x] Chainlink Data Feeds
22+
- [ ] Chainlink VRF 2
23+
- [ ] Chainlink VRF 2.5
24+
25+
### Added
26+
27+
- Support for Chainlink Data Feeds by adding `MockV3Aggregator.sol` and
28+
`MockOffchainAggregator.sol` mock contracts
29+
- Showcase tests for testing in a forking actual networks environment
30+
31+
## [0.2.1-beta] - 26 June 2024
32+
33+
### Dependencies
34+
35+
| Package | Version |
36+
| ------------------------- | ------- |
37+
| @chainlink/contracts-ccip | 1.4.0 |
38+
| @chainlink/contracts | 1.1.1 |
39+
40+
### Services
41+
42+
- [x] Chainlink CCIP
43+
- [x] Chainlink Data Feeds
44+
- [ ] Chainlink VRF 2
45+
- [ ] Chainlink VRF 2.5
46+
47+
### Fixed
48+
49+
- Bug in propose & confirm aggregator flow that could lead to aggregator being
50+
set to `address(0)`
51+
- The `maxAnswer` variable in the `MockOffchainAggregator.sol` contract was set
52+
to an incorrect value
53+
- Bug in the `MockOffchainAggregator.sol` contract where the `minAnswer`
54+
could've been set to the value greater than `maxAnswer`
755

856
## [0.2.0-beta] - 24 June 2024
957

@@ -45,4 +93,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4593
- Initial release of the project
4694

4795
[0.1.0]: https://github.com/smartcontractkit/chainlink-local/releases/tag/v0.1.0
48-
[0.2.0-beta]: https://github.com/smartcontractkit/chainlink-local/releases/tag/v0.2.0-beta
96+
[0.2.0-beta]:
97+
https://github.com/smartcontractkit/chainlink-local/releases/tag/v0.2.0-beta
98+
[0.2.1-beta]:
99+
https://github.com/smartcontractkit/chainlink-local/releases/tag/v0.2.1-beta
100+
[0.2.1]: https://github.com/smartcontractkit/chainlink-local/releases/tag/v0.2.1

api_reference/index.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# API Reference
2+
3+
- [javascript](javascript/index.mdx)
4+
- [solidity](solidity/index.mdx)
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
## Functions
2+
3+
<dl>
4+
<dt>
5+
<a href="#requestLinkFromTheFaucet">
6+
requestLinkFromTheFaucet(linkAddress, to, amount)
7+
</a>{' '}
8+
⇒ <code>Promise.&lt;string&gt;</code>
9+
</dt>
10+
<dd>
11+
<p>Requests LINK tokens from the faucet and returns the transaction hash</p>
12+
</dd>
13+
<dt>
14+
<a href="#getEvm2EvmMessage">getEvm2EvmMessage(receipt)</a> ⇒{' '}
15+
<code>
16+
<a href="#Evm2EvmMessage">Evm2EvmMessage</a>
17+
</code>{' '}
18+
| <code>null</code>
19+
</dt>
20+
<dd>
21+
<p>
22+
Parses a transaction receipt to extract the sent message Scans through
23+
transaction logs to find a <code>CCIPSendRequested</code> event and then
24+
decodes it to an object
25+
</p>
26+
</dd>
27+
<dt>
28+
<a href="#routeMessage">routeMessage(routerAddress, evm2EvmMessage)</a> ⇒{' '}
29+
<code>Promise.&lt;void&gt;</code>
30+
</dt>
31+
<dd>
32+
<p>
33+
Routes the sent message from the source network on the destination
34+
(current) network
35+
</p>
36+
</dd>
37+
</dl>
38+
39+
## Typedefs
40+
41+
<dl>
42+
<dt>
43+
<a href="#Evm2EvmMessage">Evm2EvmMessage</a> : <code>Object</code>
44+
</dt>
45+
<dd></dd>
46+
</dl>
47+
48+
<a name="requestLinkFromTheFaucet"></a>
49+
50+
## requestLinkFromTheFaucet(linkAddress, to, amount) ⇒ <code>Promise.&lt;string&gt;</code>
51+
52+
Requests LINK tokens from the faucet and returns the transaction hash
53+
54+
**Kind**: global function
55+
**Returns**: <code>Promise.&lt;string&gt;</code> - Promise resolving to the
56+
transaction hash of the fund transfer
57+
58+
| Param | Type | Description |
59+
| ----------- | ------------------- | ------------------------------------------------------- |
60+
| linkAddress | <code>string</code> | The address of the LINK contract on the current network |
61+
| to | <code>string</code> | The address to send LINK to |
62+
| amount | <code>bigint</code> | The amount of LINK to request |
63+
64+
<a name="getEvm2EvmMessage"></a>
65+
66+
## getEvm2EvmMessage(receipt) ⇒ [<code>Evm2EvmMessage</code>](#Evm2EvmMessage) \| <code>null</code>
67+
68+
Parses a transaction receipt to extract the sent message Scans through
69+
transaction logs to find a `CCIPSendRequested` event and then decodes it to an
70+
object
71+
72+
**Kind**: global function
73+
**Returns**: [<code>Evm2EvmMessage</code>](#Evm2EvmMessage) \|
74+
<code>null</code> - Returns either the sent message or null if provided receipt
75+
does not contain `CCIPSendRequested` log
76+
77+
| Param | Type | Description |
78+
| ------- | ------------------- | ------------------------------------------------ |
79+
| receipt | <code>object</code> | The transaction receipt from the `ccipSend` call |
80+
81+
<a name="routeMessage"></a>
82+
83+
## routeMessage(routerAddress, evm2EvmMessage) ⇒ <code>Promise.&lt;void&gt;</code>
84+
85+
Routes the sent message from the source network on the destination (current)
86+
network
87+
88+
**Kind**: global function
89+
**Returns**: <code>Promise.&lt;void&gt;</code> - Either resolves with no value
90+
if the message is successfully routed, or reverts
91+
**Throws**:
92+
93+
- <code>Error</code> Fails if no off-ramp matches the message's source chain
94+
selector or if calling `router.getOffRamps()`
95+
96+
| Param | Type | Description |
97+
| -------------- | ---------------------------------------------- | --------------------------------- |
98+
| routerAddress | <code>string</code> | Address of the destination Router |
99+
| evm2EvmMessage | [<code>Evm2EvmMessage</code>](#Evm2EvmMessage) | Sent cross-chain message |
100+
101+
<a name="Evm2EvmMessage"></a>
102+
103+
## Evm2EvmMessage : <code>Object</code>
104+
105+
**Kind**: global typedef
106+
**Properties**
107+
108+
| Name | Type |
109+
| ------------------- | ----------------------------------------------------------- |
110+
| sourceChainSelector | <code>bigint</code> |
111+
| sender | <code>string</code> |
112+
| receiver | <code>string</code> |
113+
| sequenceNumber | <code>bigint</code> |
114+
| gasLimit | <code>bigint</code> |
115+
| strict | <code>boolean</code> |
116+
| nonce | <code>bigint</code> |
117+
| feeToken | <code>string</code> |
118+
| feeTokenAmount | <code>bigint</code> |
119+
| data | <code>string</code> |
120+
| tokenAmounts | <code>Array.&lt;\{token: string, amount: bigint}&gt;</code> |
121+
| sourceTokenData | <code>Array.&lt;string&gt;</code> |
122+
| messageId | <code>string</code> |

api_reference/javascript/index.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Javascript API Reference
2+
3+
- [CCIPLocalSimulatorFork](CCIPLocalSimulatorFork.mdx)
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Solidity API
2+
3+
## BurnMintERC677Helper
4+
5+
This contract extends the functionality of the BurnMintERC677 token contract to
6+
include a `drip` function that mints one full token to a specified address.
7+
8+
_Inherits from the BurnMintERC677 contract and sets the token name, symbol,
9+
decimals, and initial supply in the constructor._
10+
11+
### constructor
12+
13+
```solidity
14+
constructor(string name, string symbol) public
15+
```
16+
17+
Constructor to initialize the BurnMintERC677Helper contract with a name and
18+
symbol.
19+
20+
_Calls the parent constructor of BurnMintERC677 with fixed decimals (18) and
21+
initial supply (0)._
22+
23+
#### Parameters
24+
25+
| Name | Type | Description |
26+
| ------ | ------ | -------------------------- |
27+
| name | string | - The name of the token. |
28+
| symbol | string | - The symbol of the token. |
29+
30+
### drip
31+
32+
```solidity
33+
function drip(address to) external
34+
```
35+
36+
Mints one full token (1e18) to the specified address.
37+
38+
_Calls the internal `_mint` function from the BurnMintERC677 contract._
39+
40+
#### Parameters
41+
42+
| Name | Type | Description |
43+
| ---- | ------- | ------------------------------------------ |
44+
| to | address | - The address to receive the minted token. |

0 commit comments

Comments
 (0)