Skip to content

Commit

Permalink
(feat) Rebase base support and merge
Browse files Browse the repository at this point in the history
  • Loading branch information
rrw-zilliqa committed Feb 6, 2025
1 parent 0b9b36c commit fb1473b
Show file tree
Hide file tree
Showing 64 changed files with 9,586 additions and 7 deletions.
4 changes: 2 additions & 2 deletions bridge-validators/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ chain_gateway_address = "0xa9A14C90e53EdCD89dFd201A3bF94D867f8098fE"
## Most chains seem to have problems with this, and so this key exists to allow you to
## submit legacy_gas_estimation_percent percent of the estimated gas, so as to ensure that
## relay txns don't run out of gas. A value of 130-150 seems to work for coin transfers.
legacy_gas_estimation_percent = 130
gas_estimation_percent = 130
## If this key is present, we delay scanning a block until N blocks ahead of it have been
## produced, to give some chains time to propagate block data to the nodes from which we are
## attempting to read them.
Expand Down Expand Up @@ -70,7 +70,7 @@ chain_gateway_block_deployed = 6542681
rpc_url = "https://dev-api.zilliqa.com"
chain_gateway_address = "0x7370e69565BB2313C4dA12F9062C282513919230"
block_instant_finality = true
legacy_gas_estimation_percent = 130
gas_estimation_percent = 130

# Zilliqa Mainnet
# [[chain_configs]]
Expand Down
2 changes: 1 addition & 1 deletion bridge-web/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ function App() {
account: account!,
value: transferAmount ?? 0n,
functionName: "transfer",
gas: 6_000_000n,
gas: 8_000_000n,
type: "legacy",
},
});
Expand Down
60 changes: 56 additions & 4 deletions bridge-web/src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import {
polygon,
arbitrum,
mainnet,
baseSepolia,
base
} from "viem/chains";
import { USDTAbi } from "../abi/USDT.ts";
import fps_token from "../assets/fps_token.png";
Expand Down Expand Up @@ -37,10 +39,12 @@ export enum TokenManagerType {
export type Chains =
| "bsc-testnet"
| "zq-testnet"
| "base-testnet"
| "bsc"
| "zq"
| "polygon"
| "arbitrum"
| "base"
| "ethereum";

export const siteConfig: SiteConfig = {
Expand Down Expand Up @@ -92,7 +96,7 @@ export const chainConfigs: Partial<Record<Chains, ChainConfig>> =
logo: hrse_token,
tokenManagerAddress: "0x6D61eFb60C17979816E4cE12CD5D29054E755948",
tokenManagerType: TokenManagerType.LockAndRelease,
bridgesTo: ["bsc"],
bridgesTo: ["bsc", "base"],
},
{
name: "FPS",
Expand Down Expand Up @@ -521,7 +525,31 @@ export const chainConfigs: Partial<Record<Chains, ChainConfig>> =
blockExplorer: "https://bscscan.com/tx/",
nativeTokenSymbol: "BNB",
},
}
"base": {
chain: "base",
name: "Base",
wagmiChain: configureCustomRpcUrl(
base,
`${import.meta.env.VITE_BASE_MAINNET_API}/${import.meta.env.VITE_BASE_MAINNET_KEY}`,
),
chainGatewayAddress: "0x0a190efdC152e0f66d633cE1B20820E4Db1090C3",
tokens: [
{
name: "HRSE",
address: "0xfBfd50DB16B3a72db010641EE008A275ef2456ae",
blockExplorer: "https://basescan.org/token/0xfBfd50DB16B3a72db010641EE008A275ef2456ae",
logo: hrse_token,
tokenManagerAddress: "0x5E734196B1fa96710A9e64ed9224dD4830d2A5EE",
tokenManagerType: TokenManagerType.MintAndBurn,
bridgesTo: ["zq"]
}
],
chainId: 8453,
isZilliqa: false,
blockExplorer: "https://basescan.org/tx/",
nativeTokenSymbol: "ETH",
}
}
: {
"zq-testnet": {
chain: "zq-testnet",
Expand Down Expand Up @@ -557,7 +585,7 @@ export const chainConfigs: Partial<Record<Chains, ChainConfig>> =
logo: test_hrse_token,
tokenManagerAddress: "0x1509988c41f02014aA59d455c6a0D67b5b50f129",
tokenManagerType: TokenManagerType.LockAndRelease,
bridgesTo: ["bsc-testnet"],
bridgesTo: ["bsc-testnet", "base-testnet"],
},
{
name: "TST2",
Expand Down Expand Up @@ -707,7 +735,31 @@ export const chainConfigs: Partial<Record<Chains, ChainConfig>> =
blockExplorer: "https://testnet.bscscan.com/tx/",
nativeTokenSymbol: "BNB",
},
};
"base-testnet": {
chain: "base-testnet",
name: "Base testnet",
wagmiChain: configureCustomRpcUrl(
baseSepolia,
`${import.meta.env.VITE_BASE_TESTNET_API}/${import.meta.env.VITE_BASE_TESTNET_KEY}`,
),
chainGatewayAddress: "0xaa084F6EE63B6f5F4c9F84cDbEC3C690DA00d56D",
tokens: [
{
name: "ZBTST",
address: "0x9DFe189ed442cCfB6c929d1b1a25e4c13354C27e",
blockExplorer: "https://sepolia.basescan.org/token/0x9DFe189ed442cCfB6c929d1b1a25e4c13354C27e",
logo: test_hrse_token,
tokenManagerAddress: "0x236D120c50b9498422842E6D7DF0A9D6040507aa",
tokenManagerType: TokenManagerType.MintAndBurn,
bridgesTo: ["zq-testnet"]
},
],
chainId: 84532,
isZilliqa: false,
blockExplorer: "https://sepolia.basescan.org/tx/",
nativeTokenSymbol: "ETH",
},
};

export type ChainConfig = {
name: string;
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1,004 changes: 1,004 additions & 0 deletions smart-contracts/broadcast/02_deployTokenManagers.s.sol/8453/run-1737632766.json

Large diffs are not rendered by default.

1,004 changes: 1,004 additions & 0 deletions smart-contracts/broadcast/02_deployTokenManagers.s.sol/8453/run-latest.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1,004 changes: 1,004 additions & 0 deletions smart-contracts/broadcast/02_deployTokenManagers.s.sol/84532/run-latest.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"transactions": [
{
"hash": null,
"transactionType": "CALL",
"contractName": null,
"contractAddress": "0x5e734196b1fa96710a9e64ed9224dd4830d2a5ee",
"function": "deployToken(string,string,uint8,address,address,uint256)",
"arguments": [
"The Winners Circle",
"HRSE",
"18",
"0x63B991C17010C21250a0eA58C6697F696a48cdf3",
"0x4fa6148C9DAbC7A737422fb1b3AB9088c878d26C",
"32769"
],
"transaction": {
"from": "0xd89421cd5dd6d6269fbb9307535c386afe11a23e",
"to": "0x5e734196b1fa96710a9e64ed9224dd4830d2a5ee",
"gas": "0xf6584",
"value": "0x0",
"input": "0x1b333e1b00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000001200000000000000000000000063b991c17010c21250a0ea58c6697f696a48cdf30000000000000000000000004fa6148c9dabc7a737422fb1b3ab9088c878d26c000000000000000000000000000000000000000000000000000000000000800100000000000000000000000000000000000000000000000000000000000000125468652057696e6e65727320436972636c65000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044852534500000000000000000000000000000000000000000000000000000000",
"nonce": "0x14",
"chainId": "0x2105"
},
"additionalContracts": [
{
"transactionType": "CREATE",
"address": "0xfbfd50db16b3a72db010641ee008a275ef2456ae",
"initCode": "0x60a060405234620003a15762000e76803803806200001d81620003a6565b9283398101606082820312620003a15781516001600160401b0390818111620003a157826200004e918501620003cc565b9060209283850151828111620003a1576040916200006e918701620003cc565b9401519360ff85168503620003a1578251828111620002a1576003918254916001958684811c9416801562000396575b8885101462000380578190601f948581116200032a575b508890858311600114620002c357600092620002b7575b505060001982861b1c191690861b1783555b8051938411620002a15760049586548681811c9116801562000296575b82821014620002815783811162000236575b5080928511600114620001c85750938394918492600095620001bc575b50501b92600019911b1c19161781555b3315620001a4575060058054336001600160a01b0319821681179092556040519291906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3608052610a3790816200043f82396080518161050c0152f35b602490600060405191631e4fbdf760e01b8352820152fd5b0151935038806200012a565b92919084601f1981168860005285600020956000905b898383106200021b575050501062000200575b50505050811b0181556200013a565b01519060f884600019921b161c1916905538808080620001f1565b858701518955909701969485019488935090810190620001de565b87600052816000208480880160051c82019284891062000277575b0160051c019087905b8281106200026a5750506200010d565b600081550187906200025a565b9250819262000251565b602288634e487b7160e01b6000525260246000fd5b90607f1690620000fb565b634e487b7160e01b600052604160045260246000fd5b015190503880620000cc565b90889350601f19831691876000528a6000209260005b8c828210620003135750508411620002fa575b505050811b018355620000de565b015160001983881b60f8161c19169055388080620002ec565b8385015186558c97909501949384019301620002d9565b90915085600052886000208580850160051c8201928b861062000376575b918a91869594930160051c01915b82811062000366575050620000b5565b600081558594508a910162000356565b9250819262000348565b634e487b7160e01b600052602260045260246000fd5b93607f16936200009e565b600080fd5b6040519190601f01601f191682016001600160401b03811183821017620002a157604052565b919080601f84011215620003a15782516001600160401b038111620002a15760209062000402601f8201601f19168301620003a6565b92818452828287010111620003a15760005b8181106200042a57508260009394955001015290565b85810183015184820184015282016200041456fe6080604081815260048036101561001557600080fd5b600092833560e01c90816306fdde031461061657508063095ea7b31461056d57806318160ddd1461030357806323b872dd14610530578063313ce567146104f257806340c10f191461044357806342966c681461041d57806370a08231146103e6578063715018a61461038957806379cc67901461034b5780638da5cb5b146103225780639358928b1461030357806395d89b41146101e3578063a9059cbb146101b2578063dd62ed3e146101655763f2fde38b146100d357600080fd5b34610161576020366003190112610161576100ec610754565b906100f5610785565b6001600160a01b0391821692831561014b575050600554826bffffffffffffffffffffffff60a01b821617600555167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b51631e4fbdf760e01b8152908101849052602490fd5b8280fd5b5050346101ae57806003193601126101ae5780602092610183610754565b61018b61076f565b6001600160a01b0391821683526001865283832091168252845220549051908152f35b5080fd5b5050346101ae57806003193601126101ae576020906101dc6101d2610754565b60243590336107b1565b5160018152f35b509190346101ae57816003193601126101ae57805190828454600181811c908083169283156102f9575b60209384841081146102e6578388529081156102ca5750600114610275575b505050829003601f01601f191682019267ffffffffffffffff841183851017610262575082918261025e92528261070b565b0390f35b634e487b7160e01b815260418552602490fd5b8787529192508591837f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b8385106102b6575050505083010138808061022c565b8054888601830152930192849082016102a0565b60ff1916878501525050151560051b840101905038808061022c565b634e487b7160e01b895260228a52602489fd5b91607f169161020d565b5050346101ae57816003193601126101ae576020906002549051908152f35b5050346101ae57816003193601126101ae5760055490516001600160a01b039091168152602090f35b5050346101ae5736600319011261038657610383610367610754565b60243590610373610785565b61037e82338361088f565b610962565b80f35b80fd5b83346103865780600319360112610386576103a2610785565b600580546001600160a01b0319811690915581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b5050346101ae5760203660031901126101ae5760209181906001600160a01b0361040e610754565b16815280845220549051908152f35b8382346101ae5760203660031901126101ae576103839061043c610785565b3533610962565b50903461016157806003193601126101615761045d610754565b906024359161046a610785565b6001600160a01b03169283156104dd57600254908382018092116104ca575084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9260209260025585855284835280852082815401905551908152a380f35b634e487b7160e01b865260119052602485fd5b84602492519163ec442f0560e01b8352820152fd5b5050346101ae57816003193601126101ae576020905160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b5050346101ae5760603660031901126101ae576020906101dc610551610754565b61055961076f565b6044359161056883338361088f565b6107b1565b5034610161578160031936011261016157610586610754565b6024359033156105ff576001600160a01b03169182156105e857508083602095338152600187528181208582528752205582519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925843392a35160018152f35b8351634a1406b160e11b8152908101859052602490fd5b835163e602df0560e01b8152808401869052602490fd5b849150833461016157826003193601126101615782600354600181811c90808316928315610701575b60209384841081146102e6578388529081156106e5575060011461068f57505050829003601f01601f191682019267ffffffffffffffff841183851017610262575082918261025e92528261070b565b600387529192508591837fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b8385106106d1575050505083010185808061022c565b8054888601830152930192849082016106bb565b60ff1916878501525050151560051b840101905085808061022c565b91607f169161063f565b6020808252825181830181905290939260005b82811061074057505060409293506000838284010152601f8019910116010190565b81810186015184820160400152850161071e565b600435906001600160a01b038216820361076a57565b600080fd5b602435906001600160a01b038216820361076a57565b6005546001600160a01b0316330361079957565b60405163118cdaa760e01b8152336004820152602490fd5b916001600160a01b03808416928315610876571692831561085d576000908382528160205260408220549083821061082b575091604082827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef958760209652828652038282205586815220818154019055604051908152a3565b60405163391434e360e21b81526001600160a01b03919091166004820152602481019190915260448101839052606490fd5b60405163ec442f0560e01b815260006004820152602490fd5b604051634b637e8f60e11b815260006004820152602490fd5b9160018060a01b0380931691600093838552600160205260409384862091831691828752602052848620549260001984036108ce575b50505050505050565b8484106109325750801561091a578115610902578552600160205283852090855260205203912055388080808080806108c5565b8451634a1406b160e11b815260048101879052602490fd5b845163e602df0560e01b815260048101879052602490fd5b8551637dc7a0d960e11b81526001600160a01b039190911660048201526024810184905260448101859052606490fd5b906001600160a01b03821690811561087657600092828452836020526040842054908282106109cf5750817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef926020928587528684520360408620558060025403600255604051908152a3565b60405163391434e360e21b81526001600160a01b03919091166004820152602481019190915260448101829052606490fdfea2646970667358221220a549c10b73694212048ddf254c15d97c974bde8ce546d31aa73bcde16f1f010b64736f6c63430008140033000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000125468652057696e6e65727320436972636c65000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044852534500000000000000000000000000000000000000000000000000000000"
}
],
"isFixedGasLimit": false
}
],
"receipts": [],
"libraries": [],
"pending": [],
"returns": {},
"timestamp": 1737633661,
"chain": 8453,
"commit": "b05cfaa"
}
Loading

0 comments on commit fb1473b

Please sign in to comment.