( network: string, messageId: string, encodedData: string, signatures: string[], mnemonic?: string )
| 47 | } |
| 48 | |
| 49 | export async function claimLayer1BridgedTokens( |
| 50 | network: string, |
| 51 | messageId: string, |
| 52 | encodedData: string, |
| 53 | signatures: string[], |
| 54 | mnemonic?: string |
| 55 | ): Promise<void> { |
| 56 | let web3 = await getWeb3(network, mnemonic); |
| 57 | let tokenBridge = await getSDK('TokenBridgeForeignSide', web3); |
| 58 | let blockExplorer = await getConstant('blockExplorer', web3); |
| 59 | |
| 60 | console.log(`Claiming layer 1 bridge tokens for message ID ${messageId}...`); |
| 61 | await tokenBridge.claimBridgedTokens(messageId, encodedData, signatures, (txnHash) => |
| 62 | console.log(`transaction hash: ${blockExplorer}/tx/${txnHash}`) |
| 63 | ); |
| 64 | console.log('Completed'); |
| 65 | } |
| 66 | |
| 67 | export async function bridgeToLayer2( |
| 68 | network: string, |
no test coverage detected