Skip to content

Commit

Permalink
Merge branch 'main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
naneey authored Sep 20, 2024
2 parents dfaa0ec + 84230ff commit 5d7898d
Show file tree
Hide file tree
Showing 10 changed files with 79 additions and 41 deletions.
1 change: 1 addition & 0 deletions Audit Report/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Audited by Veridise
Binary file added Audit Report/VAR_Venture23-Audit1.pdf
Binary file not shown.
Binary file added Audit Report/VAR_Venture23-Audit2.pdf
Binary file not shown.
40 changes: 36 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,36 @@
# Verulink Bridge
Aleo and Ethereum Bridge.
## Attestor Service
### [Attestor Deployment Guide](./scripts/aws/DEPLOYMENT.md)

![verulinkfinal_4](https://github.com/user-attachments/assets/deef25ea-aa59-492a-b2e3-051b213102c2)

# What is Verulink?
Verulink is a trusted bridge platform that is designed to help move assets between Aleo and Ethereum blockchain. This connection allows users to transfer major assets like ETH, USDC, and USDT seamlessly between the two chains, leveraging the strengths of both platforms.

## Architecture Overview
[Architecture Doc](./docs/architecture_overview.md)

## Mainnet Contract Addresses

| Contract | Ethereum | Aleo|
|---|---|---|
| Bridge | [0x7440176A6F367D3Fad1754519bD8033EAF173133](https://etherscan.io/address/0x7440176A6F367D3Fad1754519bD8033EAF173133) | [vlink_token_bridge_v1.aleo](https://aleoscan.io/program?id=vlink_token_bridge_v1.aleo)
| TokenService | [0x28E761500e7Fd17b5B0A21a1eAD29a8E22D73170](https://etherscan.io/address/0x28E761500e7Fd17b5B0A21a1eAD29a8E22D73170) | [vlink_token_service_v1.aleo](https://aleoscan.io/program?id=vlink_token_service_v1.aleo)

## Attestor
[Attestor Architecture Overview](./docs/attestor_architecture_overview.md)

[Attestor Deployment Guide](./scripts/aws/DEPLOYMENT.md)

## Contracts
[Bridge Contract Info](./docs/bridge_contract.md)

[Holding Contract Info](./docs/holding_contract.md)

## Security
[Security Doc](./docs/security.md)

## Socials
For latest updates please check our [Twitter](https://x.com/verulink) and for support join our community on [Discord](https://discord.gg/bDCGxjwcYX)

Interested to learn more? Follow us on [Medium](https://verulinkbridge.medium.com/) for lastest articles related to Verulink.

## Built by [![V23_logo_transparent](https://github.com/user-attachments/assets/e03d86da-670c-4c7a-863e-4d4e8094ec69)](https://venture23.xyz/)

13 changes: 9 additions & 4 deletions aleo/aleo-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@ export default {
mode: "execute",
mainnet: {},
networks: {
testnet: {
endpoint: "http:localhost:3030",
accounts: [process.env.ALEO_DEVNET_PRIVATE_KEY1, process.env.ALEO_DEVNET_PRIVATE_KEY2, process.env.ALEO_DEVNET_PRIVATE_KEY3, process.env.ALEO_DEVNET_PRIVATE_KEY4],
// testnet: {
// endpoint: "http:localhost:3030",
// accounts: [process.env.ALEO_DEVNET_PRIVATE_KEY1, process.env.ALEO_DEVNET_PRIVATE_KEY2, process.env.ALEO_DEVNET_PRIVATE_KEY3, process.env.ALEO_DEVNET_PRIVATE_KEY4],
// priorityFee: 0.01,
// },
mainnet: {
endpoint: "<aleo_rpc_url>",
accounts: [process.env.ALEO_DEVNET_PRIVATE_KEY1],
priorityFee: 0.01,
},
// testnet: {
Expand All @@ -16,5 +21,5 @@ export default {
// priorityFee: 0.01,
// },
},
defaultNetwork: "testnet",
defaultNetwork: "mainnet",
};
6 changes: 3 additions & 3 deletions aleo/scripts/deployment/mainPrograms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export const deployMainPrograms = async (initialAttestors: string[], initialCoun
const holding = new Vlink_holding_v1Contract({ mode, priorityFee: 10_000 });

//Deploy mtsp for local devnet only
const mtspDeployTx = await mtsp.deploy();
await mtsp.wait(mtspDeployTx);
//const mtspDeployTx = await mtsp.deploy();
//await mtsp.wait(mtspDeployTx);

// Deploy holding
const wusdcHoldingDeployTx = await holding.deploy(); // 5_039_000
Expand Down Expand Up @@ -63,4 +63,4 @@ export const deployMainPrograms = async (initialAttestors: string[], initialCoun
const [initializeHoldingTx] = await holding.initialize_holding(tokenService.address());
await tokenServiceCouncil.wait(initializeHoldingTx);

};
};
14 changes: 7 additions & 7 deletions aleo/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@ export const ALEO_ZERO_ADDRESS = "aleo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
export const OWNER_INDEX = true;

// USDC Contract Address on Ethereum
export const usdcContractAddr = "0xD99e898842c566be038bf898b3e406f028a031E0"
export const usdtContractAddr = "0xCdF691Ab58a388AAed7EB231f5517418cf48F121"
export const usdcContractAddr = "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
export const usdtContractAddr = "0xdAC17F958D2ee523a2206206994597C13D831ec7"
export const ethContractAddr = "0x0000000000000000000000000000000000000001"

// Token Service Contract Address on Ethereum
export const ethTsContractAddr = "0xEDc97cE21AcDC99Ef4DcC4ea0E55F01eDc646a09"
export const ethTsContractAddr = ""

// Token Service Contract Address on Ethereum
export const ethTsContractAddr2 = "0xD342C031453c66A6D6c2a23D6dA86c30adA08C79"
// export const ethTsContractAddr2 = "0xD342C031453c66A6D6c2a23D6dA86c30adA08C79"

export const ethTsContractAddr3 = "0x258A773B19fcC8958E0cE1B1b13c830a50bA7c11"
// export const ethTsContractAddr3 = "0x258A773B19fcC8958E0cE1B1b13c830a50bA7c11"

const mainnetChainId = 1
export const ethChainId = encodeNetworkChainId("eth", mainnetChainId);
export const aleoChainId = encodeNetworkChainId("aleo", 1);
export const ethChainId = 27234042785;
export const aleoChainId = 6694886634401;

// max_supply for Tokens, it is the highest u128 value
export const max_supply = BigInt("340282366920938463463374607431768211455");
22 changes: 11 additions & 11 deletions aleo/utils/mainnet.data.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// User address on Aleo
export const attestor1 = "aleo1eslxvrgwtev68t9y6l0nxtts86exewrucgj33aw309k20tch45ps6pex24";
export const attestor2 = "aleo1s9jt6t6esqg4caw0lzhr393f80jd5mw2w4mn0hudze60fvnrlq9s9ryctf"
export const attestor3 = "aleo1j4zawcfr63f7h0r97vck9xd2y2dycvgagh6n6w9f8tf9n47muggq6kgeza"
export const attestor4 = "aleo1jelsappz5y0cy54cdqukc6xyvz45f35t99mgmlmu3uu7pndvayyqmnx5za"
export const attestor5 = "aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px" // Devnet Wallet
export const attestor1 = "aleo1nzn3ma4q4xzmrvnkfs675slta87pdnyn5ctr9lc7ueuzhrvdlgrq38cj7u";
export const attestor2 = "aleo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq3ljyzc"
export const attestor3 = "aleo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq3ljyzc"
export const attestor4 = "aleo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq3ljyzc"
export const attestor5 = "aleo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq3ljyzc" // Devnet Wallet

// User address on Aleo
export const council1 = "aleo1eslxvrgwtev68t9y6l0nxtts86exewrucgj33aw309k20tch45ps6pex24";
export const council2 = "aleo1s9jt6t6esqg4caw0lzhr393f80jd5mw2w4mn0hudze60fvnrlq9s9ryctf"
export const council3 = "aleo1j4zawcfr63f7h0r97vck9xd2y2dycvgagh6n6w9f8tf9n47muggq6kgeza"
export const council4 = "aleo1fcg4k0sacadavag292p7x9ggm6889aay6wn9m8ftnmynh67cg5xsx8ycu8"
export const council5 = "aleo1rhgdu77hgyqd3xjj8ucu3jj9r2krwz6mnzyd80gncr5fxcwlh5rsvzp9px" // Devnet Wallet
export const council1 = "aleo1a0rugumrjvf86gw3aqkzqvun4m73xxxhgfpra3gtkmw2p2uw2y9q0dwz3f";
export const council2 = "aleo1tr9t0ac0h5g6mr8n7xkmmn5264deenjqdxctyce42m9u40hspvxqc27dsu"
export const council3 = "aleo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq3ljyzc"
export const council4 = "aleo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq3ljyzc"
export const council5 = "aleo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq3ljyzc" // Devnet Wallet

export const councilThreshold = 1;

Expand Down Expand Up @@ -49,7 +49,7 @@ export const wethMinTransfer = BigInt(500_000_000_000_000); //0.0005 = 5*10^14
export const wethMaxTransfer = BigInt("3402823669209384634633746074317682114");
export const wethOutgoingPercentage = 10_00 // 10%
export const wethTimeframe = 28_800; // per block
export const wethMaxNoCap = BigInt(40_000_000_000_000_000_000); // 40 eth
export const wethMaxNoCap = BigInt("40000000000000000000"); // 40 eth
export const wethName = BigInt('1447384136');
export const wethSymbol = BigInt('1984255048');
export const wethDecimals = 18;
Expand Down
6 changes: 3 additions & 3 deletions attestor/chainService/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ chains:
- name: ethereum
chain_id: 27234042785
wallet_address: <your_ethereum_wallet_address>
bridge_contract:
node_url:
start_height:
bridge_contract: 0x7440176A6F367D3Fad1754519bD8033EAF173133
node_url: https://eth.llamarpc.com
start_height: 20740576
finality_height: 7050
filter_topic: 0x23b9e965d90a00cd3ad31e46b58592d41203f5789805c086b955e34ecd462eb9
feed_pkt_wait_dur: 15m
Expand Down
18 changes: 9 additions & 9 deletions solidity/scripts/execute.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@

# Mainnet:
# Deployment, Setup and transferOwnerShip to Multisig using single owner:
# npx hardhat run scripts/deployLib/deployLib.js --network mainnet
# npx hardhat run scripts/deployLib/deployAleoAddressLib.js --network mainnet
# npx hardhat run scripts/deploy/deployBridge.js --network mainnet
# npx hardhat run scripts/deploy/deployBlackListService.js --network mainnet
# npx hardhat run scripts/deploy/deployTokenService.js --network mainnet
# npx hardhat run scripts/deploy/deployHolding.js --network mainnet
npx hardhat run scripts/deployLib/deployLib.js --network mainnet
npx hardhat run scripts/deployLib/deployAleoAddressLib.js --network mainnet
npx hardhat run scripts/deploy/deployBridge.js --network mainnet
npx hardhat run scripts/deploy/deployBlackListService.js --network mainnet
npx hardhat run scripts/deploy/deployTokenService.js --network mainnet
npx hardhat run scripts/deploy/deployHolding.js --network mainnet
# npx hardhat run scripts/deploy/deployERC20VaultServiceUSDC.js --network mainnet
# npx hardhat run scripts/deploy/deployERC20VaultServiceUSDT.js --network mainnet
# npx hardhat run scripts/deploy/deployETHVaultService.js --network mainnet
# npx hardhat run scripts/deploy/addTokenService.js --network mainnet
# npx hardhat run scripts/deploy/setHolding.js --network mainnet
npx hardhat run scripts/deploy/addTokenService.js --network mainnet
npx hardhat run scripts/deploy/setHolding.js --network mainnet
# npx hardhat run scripts/deploy/addTokenUSDC.js --network mainnet
# npx hardhat run scripts/deploy/addTokenUSDT.js --network mainnet
# npx hardhat run scripts/deploy/addTokenETH.js --network mainnet
# npx hardhat run scripts/deploy/addAttestor.js --network mainnet
npx hardhat run scripts/deploy/addAttestor.js --network mainnet
# npx hardhat run scripts/deploy/transferOwnerShipBridge.js --network mainnet
# npx hardhat run scripts/deploy/transferOwnerShipBlackListService.js --network mainnet
# npx hardhat run scripts/deploy/transferOwnershipTokenservice.js --network mainnet
Expand Down

0 comments on commit 5d7898d

Please sign in to comment.