Skip to content

Commit

Permalink
Adds support for the new api changes
Browse files Browse the repository at this point in the history
  • Loading branch information
elias-garcia committed Jan 17, 2024
1 parent 7c84791 commit 8447f4f
Show file tree
Hide file tree
Showing 11 changed files with 2,508 additions and 848 deletions.
239 changes: 223 additions & 16 deletions abis/bridge.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
"name": "EtherTransferFailed",
"type": "error"
},
{
"inputs": [],
"name": "GasTokenNetworkMustBeZeroOnEther",
"type": "error"
},
{
"inputs": [],
"name": "GlobalExitRootInvalid",
Expand All @@ -44,6 +49,16 @@
"name": "MsgValueNotZero",
"type": "error"
},
{
"inputs": [],
"name": "NativeTokenIsEther",
"type": "error"
},
{
"inputs": [],
"name": "NoValueInMessagesOnGasTokenNetworks",
"type": "error"
},
{
"inputs": [],
"name": "NotValidAmount",
Expand Down Expand Up @@ -76,7 +91,7 @@
},
{
"inputs": [],
"name": "OnlyPolygonZkEVM",
"name": "OnlyRollupManager",
"type": "error"
},
{
Expand Down Expand Up @@ -139,9 +154,9 @@
"inputs": [
{
"indexed": false,
"internalType": "uint32",
"name": "index",
"type": "uint32"
"internalType": "uint256",
"name": "globalIndex",
"type": "uint256"
},
{
"indexed": false,
Expand Down Expand Up @@ -227,6 +242,19 @@
"name": "NewWrappedToken",
"type": "event"
},
{
"inputs": [],
"name": "WETHToken",
"outputs": [
{
"internalType": "contract TokenWrapped",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "activateEmergencyState",
Expand Down Expand Up @@ -302,6 +330,44 @@
},
{
"inputs": [
{
"internalType": "uint32",
"name": "destinationNetwork",
"type": "uint32"
},
{
"internalType": "address",
"name": "destinationAddress",
"type": "address"
},
{
"internalType": "uint256",
"name": "amountWETH",
"type": "uint256"
},
{
"internalType": "bool",
"name": "forceUpdateGlobalExitRoot",
"type": "bool"
},
{
"internalType": "bytes",
"name": "metadata",
"type": "bytes"
}
],
"name": "bridgeMessageWETH",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "leafHash",
"type": "bytes32"
},
{
"internalType": "bytes32[32]",
"name": "smtProof",
Expand All @@ -311,6 +377,64 @@
"internalType": "uint32",
"name": "index",
"type": "uint32"
}
],
"name": "calculateRoot",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint32",
"name": "originNetwork",
"type": "uint32"
},
{
"internalType": "address",
"name": "originTokenAddress",
"type": "address"
},
{
"internalType": "address",
"name": "token",
"type": "address"
}
],
"name": "calculateTokenWrapperAddress",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32[32]",
"name": "smtProofLocalExitRoot",
"type": "bytes32[32]"
},
{
"internalType": "bytes32[32]",
"name": "smtProofRollupExitRoot",
"type": "bytes32[32]"
},
{
"internalType": "uint256",
"name": "globalIndex",
"type": "uint256"
},
{
"internalType": "bytes32",
Expand Down Expand Up @@ -362,13 +486,18 @@
"inputs": [
{
"internalType": "bytes32[32]",
"name": "smtProof",
"name": "smtProofLocalExitRoot",
"type": "bytes32[32]"
},
{
"internalType": "uint32",
"name": "index",
"type": "uint32"
"internalType": "bytes32[32]",
"name": "smtProofRollupExitRoot",
"type": "bytes32[32]"
},
{
"internalType": "uint256",
"name": "globalIndex",
"type": "uint256"
},
{
"internalType": "bytes32",
Expand Down Expand Up @@ -457,12 +586,38 @@
},
{
"inputs": [],
"name": "getDepositRoot",
"name": "gasTokenAddress",
"outputs": [
{
"internalType": "bytes32",
"internalType": "address",
"name": "",
"type": "bytes32"
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "gasTokenMetadata",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "gasTokenNetwork",
"outputs": [
{
"internalType": "uint32",
"name": "",
"type": "uint32"
}
],
"stateMutability": "view",
Expand Down Expand Up @@ -517,6 +672,38 @@
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "getRoot",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address"
}
],
"name": "getTokenMetadata",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
Expand Down Expand Up @@ -561,15 +748,30 @@
"name": "_networkID",
"type": "uint32"
},
{
"internalType": "address",
"name": "_gasTokenAddress",
"type": "address"
},
{
"internalType": "uint32",
"name": "_gasTokenNetwork",
"type": "uint32"
},
{
"internalType": "contract IBasePolygonZkEVMGlobalExitRoot",
"name": "_globalExitRootManager",
"type": "address"
},
{
"internalType": "address",
"name": "_polygonZkEVMaddress",
"name": "_polygonRollupManager",
"type": "address"
},
{
"internalType": "bytes",
"name": "_gasTokenMetadata",
"type": "bytes"
}
],
"name": "initialize",
Expand All @@ -580,9 +782,14 @@
{
"inputs": [
{
"internalType": "uint256",
"name": "index",
"type": "uint256"
"internalType": "uint32",
"name": "leafIndex",
"type": "uint32"
},
{
"internalType": "uint32",
"name": "sourceBridgeNetwork",
"type": "uint32"
}
],
"name": "isClaimed",
Expand Down Expand Up @@ -637,7 +844,7 @@
},
{
"inputs": [],
"name": "polygonZkEVMaddress",
"name": "polygonRollupManager",
"outputs": [
{
"internalType": "address",
Expand Down
Loading

0 comments on commit 8447f4f

Please sign in to comment.