1.1.7 • Published 2 years ago
ysfinance-bridge v1.1.7
Yellow Submarine bridge-npm-pkg
Introduction
This bridge can call cross-chain contracts, and confirm the call result。
Usage
import * as ysBridge from "ysfinance-bridge";
let bridge = new ysBridge.Bridge(
"https://ropsten.infura.io/v3/f2ff8becef8e40df950e0e827992c5e0",
"bridge contract address",
"private key",
21000
)
let res = await bridge.CallRemote(
"0x3565375400000000000000000000000000000000000000000000000000000000",
1,
"0x1a2fc48e9c7712ca0edffaca1506ef974c8e8ca6",
"0x3565375400000000000000000000000000000000000000000000000000000000"
)
console.log(res)
let res = await bridge.Execute(
"0x3565375400000000000000000000000000000000000000000000000000000000",
2,
43,
"0x935bc4eaf717fa0a760002fbb076a78effce545822e28333e2836c23c387a547",
1,
"0xca98cd464a9cc69409de5bfec896a45985f670a3",
"0x3565375400000000000000000000000000000000000000000000000000000000",
["0xe3aa967fea9c4f7731b30b23e35ac09d930d541535bbf739de3037596ba0f8ba5a9bcfd6ce68fd19a7d4e64919ef9a7a96dc1764ae4f45e16034e6d7084df9481b",
"0x78ed6f68c56019178781ef044352db8e8f762e1c7179c48c739e330bb70e2e2b34015be6c29996c23eb970e8a16d8296636aaabec274c381d3b1d13825c77fc21c"]
)
console.log(res)
Other examples omitted ......