Skip to content

Commit

Permalink
2.4.29
Browse files Browse the repository at this point in the history
  • Loading branch information
ameeshaagrawal committed Mar 21, 2024
1 parent b74d00b commit e770991
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 39 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@socket.tech/dl-core",
"license": "UNLICENSED",
"version": "2.4.28",
"version": "2.4.29",
"description": "Smart contracts for socket data layer.",
"main": "./dist/src/index.js",
"types": "./dist/src/index.d.ts",
Expand Down
69 changes: 31 additions & 38 deletions scripts/deploy/single-click-deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,60 +13,53 @@

Clone project and install dependencies.

```bash=
# clone the repository
git clone https://github.com/SocketDotTech/socket-dl
- Clone the repository
`git clone https://github.com/SocketDotTech/socket-dl`

# move to repository folder
cd socket-dl
- Move to repository folder
`cd socket-dl`

# install forge dependencies
forge install
- Install forge dependencies
`forge install`

# install node modules
yarn install
```
- Install node modules
`yarn install`

### Deploy

Deployments use [Hardhat](https://github.com/NomicFoundation/hardhat)

# Setup config and env:

- Run command: `yarn setup` and select first option `Add chain configs`.
- Add all the required details, you can skip configs which are not required by leaving blank and pressing enter.
- Once done, go to .env and check if owner address, rpc and private key are correctly set!

- Next compile contracts, `npx hardhat compile`
- Run command: `yarn setup` and select first option `Add chain configs`.
- Add all the required details, you can skip configs which are not required by leaving blank and pressing enter.
- Once done, go to .env and check if owner address, rpc and private key are correctly set!
- Next compile contracts, `npx hardhat compile`

# Deploy contracts:

- Ensure you have enough balance in your account to deploy 10-12 contracts.
- Next compile contracts, `npx hardhat compile`
- Run command: `yarn setup` and select second option, this will deploy contracts and store them in `prod_addresses.json`.
- Ensure you have enough balance in your account to deploy 10-12 contracts.
- Next compile contracts, `npx hardhat compile`
- Run command: `yarn setup` and select second option, this will deploy contracts and store them in `prod_addresses.json`.

# Create a PR:

- Once contracts are deployed, push them to the repo and create a PR
- contracts will be used by SOCKET to run the infra and connect them with existing deployments on other chains.
- Once contracts are deployed, push them to the repo and create a PR
- contracts will be used by SOCKET to run the infra and connect them with existing deployments on other chains.

# FAQ:

- max msg value transfer limit: Socket DL supports native asset bridge between 2 chains, the max value which can be bridged is controlled by this value.

- timeout: Socket DL supports Fast and Optimistic Switchboards which has 1/n trust assumption from watchers, find more here https://developer.socket.tech/Learn/Components/Switchboards.
In case no one trips a packet in this timeout period, the switchboard considers the packet valid. Socket DL assumes it to be 2 hrs by default.

# Note:

Transactions are reverting with insufficient balance or other gas problems:
Go to `chainConfig.json` present in the root. You can configure overrides there which are used in all the transactions going through.

For example:
```
"overrides": {
"type": 1,
"gasLimit": 20000000,
"gasPrice": 1000000000000
}
```
- Max msg value transfer limit: Socket DL supports native asset bridge between 2 chains, the max value which can be bridged is controlled by this value.
- Timeout: Socket DL supports Fast and Optimistic Switchboards which has 1/n trust assumption from watchers, find more here https://developer.socket.tech/Learn/Components/Switchboards.
In case no one trips a packet in this timeout period, the switchboard considers the packet valid. Socket DL assumes it to be 2 hrs by default.
- Transactions are reverting with insufficient balance or other gas problems:
Go to `chainConfig.json` present in the root. You can configure overrides there which are used in all the transactions going through.

For example:
```
"overrides": {
"type": 1,
"gasLimit": 20000000,
"gasPrice": 1000000000000
}
```
5 changes: 5 additions & 0 deletions scripts/deploy/single-click-deploy/integrators/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ export const updateSDK = async (
`,\n [HardhatChainName.${chainName.toUpperCase()}]: ChainSlug.${chainName.toUpperCase()},\n};\n`,
",\n};"
);
await updateFile(
"chainSlugToHardhatChainName.ts",
`,\n ChainSlug.${chainName.toUpperCase()} = [HardhatChainName.${chainName.toUpperCase()}],\n}\n`,
",\n}"
);

if (isMainnet) {
await updateFile(
Expand Down

0 comments on commit e770991

Please sign in to comment.