Skip to content

Commit f75a27b

Browse files
committed
Add and run prettier
1 parent 7077c9d commit f75a27b

Some content is hidden

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

50 files changed

+35510
-944
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ name: Node.js CI
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main]
88
workflow_dispatch:
99

1010
jobs:
1111
build:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v2
15-
- name: Get node.js
16-
uses: actions/setup-node@v1
17-
with:
18-
node-version: '14.x'
19-
- run: npm install
20-
- run: npx hardhat compile --show-stack-traces
14+
- uses: actions/checkout@v2
15+
- name: Get node.js
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: "14.x"
19+
- run: npm install
20+
- run: npx hardhat compile --show-stack-traces

.prettierrc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"overrides": [
3+
{
4+
"files": "*.sol",
5+
"options": {
6+
"printWidth": 120,
7+
"tabWidth": 4,
8+
"useTabs": false,
9+
"singleQuote": false,
10+
"bracketSpacing": false,
11+
"explicitTypes": "always"
12+
}
13+
}
14+
]
15+
}

README.md

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
FxPortal for Polygon(prev Matic)Chain. No mapping. Seamless communication with Ethereum Network.
44

5-
Audit - [Fx-Portal Contracts Audit by Halborn](https://github.com/fx-portal/contracts/blob/main/Polygon_FX_Portal_Smart_Contract_Security_Audit_Halborn_v1_0%20(1).pdf)
5+
Audit - [Fx-Portal Contracts Audit by Halborn](<https://github.com/fx-portal/contracts/blob/main/Polygon_FX_Portal_Smart_Contract_Security_Audit_Halborn_v1_0%20(1).pdf>)
66

77
### What is Fx bridge (fx-portal)?
88

@@ -12,45 +12,43 @@ In short, it's Meta bridge. This bridge allows any state-syncs without mapping.
1212

1313
#### Some use-cases of Fx-portal
1414

15-
* [ERC20 token tranfer from Ethereum to Matic-Chain without mapping request](https://github.com/jdkanani/fx-portal/tree/main/contracts/examples/erc20-transfer)
16-
* [Lazy minting of ERC20 tokens on MaticChain](https://github.com/jdkanani/fx-portal/tree/main/contracts/examples/mintable-erc20-transfer)
17-
* [State Transfer between Ethereum-Matic](https://github.com/jdkanani/fx-portal/tree/main/contracts/examples/state-transfer)
15+
- [ERC20 token tranfer from Ethereum to Matic-Chain without mapping request](https://github.com/jdkanani/fx-portal/tree/main/contracts/examples/erc20-transfer)
16+
- [Lazy minting of ERC20 tokens on MaticChain](https://github.com/jdkanani/fx-portal/tree/main/contracts/examples/mintable-erc20-transfer)
17+
- [State Transfer between Ethereum-Matic](https://github.com/jdkanani/fx-portal/tree/main/contracts/examples/state-transfer)
1818

1919
**What about [PoS portal](https://docs.matic.network/docs/develop/ethereum-matic/pos/getting-started)?**
2020

21-
PoS Portal is another bridge, but it works only for few ERC standards and requires mappings. It is more developer-friendly, allows customization without much headache.
21+
PoS Portal is another bridge, but it works only for few ERC standards and requires mappings. It is more developer-friendly, allows customization without much headache.
2222

2323
While Fx-portal focuses on permissionless-ness and flexibility, a developer might have to write more code but more customizable than PoS Portal. It requires no mapping.
2424

2525
**Can I build my bridge?**
2626

2727
Yes. You can check docs here: https://docs.matic.network/docs/develop/l1-l2-communication/ethereum-to-matic
28-
https://docs.matic.network/docs/develop/l1-l2-communication/matic-to-ethereum
28+
https://docs.matic.network/docs/develop/l1-l2-communication/matic-to-ethereum
2929

3030
### What are FxChild and FxRoot?
3131

32-
`FxChild` (FxChild.sol) and `FxRoot` (FxRoot.sol) are main contracts on which mapping-less bridge works. It calls and passes data to user-defined methods on another chain without mapping.
32+
`FxChild` (FxChild.sol) and `FxRoot` (FxRoot.sol) are main contracts on which mapping-less bridge works. It calls and passes data to user-defined methods on another chain without mapping.
3333

3434
**Mumbai**
3535

36-
| Contract | Deployed address |
37-
| :----- | :- |
38-
| [FxRoot (Goerli)](https://goerli.etherscan.io/address/0x3d1d3E34f7fB6D26245E6640E1c50710eFFf15bA#code) | `0x3d1d3E34f7fB6D26245E6640E1c50710eFFf15bA` |
39-
| [FxChild (Mumbai)](https://explorer-mumbai.maticvigil.com/address/0xCf73231F28B7331BBe3124B907840A94851f9f11/contracts) | `0xCf73231F28B7331BBe3124B907840A94851f9f11`|
36+
| Contract | Deployed address |
37+
| :---------------------------------------------------------------------------------------------------------------------- | :------------------------------------------- |
38+
| [FxRoot (Goerli)](https://goerli.etherscan.io/address/0x3d1d3E34f7fB6D26245E6640E1c50710eFFf15bA#code) | `0x3d1d3E34f7fB6D26245E6640E1c50710eFFf15bA` |
39+
| [FxChild (Mumbai)](https://explorer-mumbai.maticvigil.com/address/0xCf73231F28B7331BBe3124B907840A94851f9f11/contracts) | `0xCf73231F28B7331BBe3124B907840A94851f9f11` |
4040

4141
**Mainnet**
4242

43-
44-
| Contract | Deployed address |
45-
| :----- | :- |
46-
| [FxRoot (Ethereum Mainnet)](https://etherscan.io/address/0xfe5e5d361b2ad62c541bab87c45a0b9b018389a2#code) | `0xfe5e5D361b2ad62c541bAb87C45a0B9B018389a2` |
47-
| [FxChild (Matic Mainnnet)](https://explorer-mainnet.maticvigil.com/address/0x8397259c983751DAf40400790063935a11afa28a/contracts) | `0x8397259c983751DAf40400790063935a11afa28a`|
48-
43+
| Contract | Deployed address |
44+
| :------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------- |
45+
| [FxRoot (Ethereum Mainnet)](https://etherscan.io/address/0xfe5e5d361b2ad62c541bab87c45a0b9b018389a2#code) | `0xfe5e5D361b2ad62c541bAb87C45a0B9B018389a2` |
46+
| [FxChild (Matic Mainnnet)](https://explorer-mainnet.maticvigil.com/address/0x8397259c983751DAf40400790063935a11afa28a/contracts) | `0x8397259c983751DAf40400790063935a11afa28a` |
4947

5048
You can deploy your own `FxChild` and `FxRoot`, but no need. Except you want to have some fun and have extra ETH to throw away.
5149

5250
### What can I build with it?
5351

54-
* Arbitrary state bridge (examples/state-transfer)
55-
* Normal ERC20 bridge (examples/erc2-transfer)
56-
* ERC20 token generator bridge (example/mintable-erc20-transfer)
52+
- Arbitrary state bridge (examples/state-transfer)
53+
- Normal ERC20 bridge (examples/erc2-transfer)
54+
- ERC20 token generator bridge (example/mintable-erc20-transfer)

config/config.json

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
11
{
2-
"mainnet":{
3-
"fxRoot":{
4-
"address":"0xfe5e5D361b2ad62c541bAb87C45a0B9B018389a2"
5-
},
6-
"fxChild":{
7-
"address":"0x8397259c983751DAf40400790063935a11afa28a"
8-
},
9-
"checkpointManager":{
10-
"address":"0x86E4Dc95c7FBdBf52e33D563BbDB00823894C287"
11-
},
12-
"fxERC20":{
13-
"address":"0xAd87e3b217c66B0D45dEaFBC540330d300811b94"
14-
},
15-
"fxERC721":{
16-
"address":"0x467c9BA5DAB81C8975F7d8237ECe61918AA6e8fF"
17-
},
18-
"fxERC1155":{
19-
"address":"0x4443c9877aB1767e1080fa70Ac038758e526c609"
20-
}
21-
},
22-
"testnet":{
23-
"fxRoot":{
24-
"address":"0x3d1d3E34f7fB6D26245E6640E1c50710eFFf15bA"
25-
},
26-
"fxChild":{
27-
"address":"0xCf73231F28B7331BBe3124B907840A94851f9f11"
28-
},
29-
"checkpointManager":{
30-
"address":"0x2890bA17EfE978480615e330ecB65333b880928e"
31-
},
32-
"fxERC20":{
33-
"address":"0xDDE69724AeFBdb084413719fE745aB66e3b055C7"
34-
},
35-
"fxERC721":{
36-
"address":"0xf2720927E048726267C0221ffA41A88528048726"
37-
},
38-
"fxERC1155":{
39-
"address":"0x80be8Cf927047A40d3f5791BF7436D8c95b3Ae5C"
40-
}
2+
"mainnet": {
3+
"fxRoot": {
4+
"address": "0xfe5e5D361b2ad62c541bAb87C45a0B9B018389a2"
5+
},
6+
"fxChild": {
7+
"address": "0x8397259c983751DAf40400790063935a11afa28a"
8+
},
9+
"checkpointManager": {
10+
"address": "0x86E4Dc95c7FBdBf52e33D563BbDB00823894C287"
11+
},
12+
"fxERC20": {
13+
"address": "0xAd87e3b217c66B0D45dEaFBC540330d300811b94"
14+
},
15+
"fxERC721": {
16+
"address": "0x467c9BA5DAB81C8975F7d8237ECe61918AA6e8fF"
17+
},
18+
"fxERC1155": {
19+
"address": "0x4443c9877aB1767e1080fa70Ac038758e526c609"
20+
}
21+
},
22+
"testnet": {
23+
"fxRoot": {
24+
"address": "0x3d1d3E34f7fB6D26245E6640E1c50710eFFf15bA"
25+
},
26+
"fxChild": {
27+
"address": "0xCf73231F28B7331BBe3124B907840A94851f9f11"
28+
},
29+
"checkpointManager": {
30+
"address": "0x2890bA17EfE978480615e330ecB65333b880928e"
31+
},
32+
"fxERC20": {
33+
"address": "0xDDE69724AeFBdb084413719fE745aB66e3b055C7"
34+
},
35+
"fxERC721": {
36+
"address": "0xf2720927E048726267C0221ffA41A88528048726"
37+
},
38+
"fxERC1155": {
39+
"address": "0x80be8Cf927047A40d3f5791BF7436D8c95b3Ae5C"
4140
}
41+
}
4242
}

contracts/FxChild.sol

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ interface IStateReceiver {
88

99
// IFxMessageProcessor represents interface to process message
1010
interface IFxMessageProcessor {
11-
function processMessageFromRoot(uint256 stateId, address rootMessageSender, bytes calldata data) external;
11+
function processMessageFromRoot(
12+
uint256 stateId,
13+
address rootMessageSender,
14+
bytes calldata data
15+
) external;
1216
}
1317

1418
/**

contracts/FxRoot.sol

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity ^0.8.0;
33

4-
54
interface IStateSender {
65
function syncState(address receiver, bytes calldata data) external;
76
}
@@ -10,7 +9,7 @@ interface IFxStateSender {
109
function sendMessageToChild(address _receiver, bytes calldata _data) external;
1110
}
1211

13-
/**
12+
/**
1413
* @title FxRoot root contract for fx-portal
1514
*/
1615
contract FxRoot is IFxStateSender {

0 commit comments

Comments
 (0)