Crosschain Streaming
How to set up Crosschain Streaming using Superfluid with Etherspot
Before we continue...
import {
Sdk as EtherspotSdk,
NetworkNames,
randomPrivateKey,
} from 'etherspot';
// ...
// First, define the tokens
const fromToken = '0x0000000000000000000000000000000000000000';
const toToken = '0xA6FA4fB5f76172d178d61B04b0ecd319C5d1C0aa';
// Next, instantiate our SDKs for each network
const etherspotGoerliSdk = new EtherspotSdk({
privateKey: randomPrivateKey(),
}, {
networkName: NetworkNames.Goerli,
});
const etherspotMumbaiSdk = new EtherspotSdk({
privateKey: randomPrivateKey(),
}, {
networkName: NetworkNames.Mumbai,
});
// Finally, compute the contract account addresses ahead of time
// The responses will return the account details.
const goerliAccount = await etherspotGoerliSdk.computeContractAccount();
const mumbaiAccount = await etherspotMumbaiSdk.computeContractAccount();Supported Chains
Supported Tokens
Create Superfluid Token Wrapper
Perform necessary transactions
Start Crosschain Streaming
Last updated
Was this helpful?