Hello, I hope you're well. We've already developed these packages to help you get better. Yes, because I've developed with a lot of blockchain networks and I've done the same things in many, many different ways and that's why MultipleChain was born.
What is it?
Shortly: A project to standardize the general characteristics of blockchain networks both across blockchain networks and across languages.
As you know, there are hundreds of different blockchain networks. Although they all have different infrastructures (although some of them are the same, namely EVM), they all basically have the same features. For example: native coins, contracts, tokens, transactions, and signature processes.
But in each of them, you need to do these basic operations or get data. You need to write different code, use different libraries, and read a lot of documentation. You don't need any of this if you don't want to go deep into a single network! Because now you have MultipleChain.
MultipleChain is a collection of packages that aims to standardize the most basic elements across disparate blockchain networks. And not just between blockchains. It also aims to do this between programming languages. The first packages have been developed for the Bitcoin, Ethereum (EVM), Solana, and Tron blockchains, and the JavaScript and PHP programming languages!
Examples
Now let's make transfers on the Ethereum and Solana blockchain networks with Ethers and Solana Web3.js packages
Ethereum (Ethers)
You need to write a code roughly like the one below, but I haven't tested it and it might be missing!
The examples above are just examples of native coin and token transfers on two networks. There is a lot of code and complexity in both, isn't there? Especially when you get into the "everything is account" aspect in Solana, you will get even more confused.
There is still the matter of getting the data of the transactions in a readable format. So actually, when you expand the scope, things get more complicated for each blockchain network.
So, would you like to see how you can easily do the same thing in MultipleChain for both Solana and Ethereum?
MultipleChain
Yes, the same transfer operations in the examples given above for Ethereum and Solana are as follows in MultipleChain. This is exactly what we are aiming for. If developers don't need to go deep into a network and just want to perform basic operations, they should be able to do it in the simplest way.
import*as EVM from'@multiplechain/evm-chains'import*as Solana from'@multiplechain/solana'// EthereumconstethereumProcess=async () => {// Provider have to be initializednewEVM.Provider(EVM.networks.ethereum)constamount=0.1constsender='0x'constreceiver='0x'constprivateKey='0x'consttokenContract='0x'constcoin=newEVM.assets.Coin();consttoken=newEVM.assets.Token(tokenContract);constcoinTx=awaitcoin.transfer(sender, receiver, amount)consttokenTx=awaittoken.transfer(sender, receiver, amount)return { coinTxId:await (awaitcoinTx.sign(privateKey)).send(), tokenTxId:await (awaittokenTx.sign(privateKey)).send() }}// SolanaconstsolanaProcess=async () => {// Provider have to be initializednewSolana.Provider({ testnet:true })constamount=0.1constsender='...'constreceiver='...'constprivateKey='...'constcoin=newSolana.assets.Coin();consttoken=newSolana.assets.Token('...');constcoinTx=awaitcoin.transfer(sender, receiver, amount)consttokenTx=awaittoken.transfer(sender, receiver, amount)return { coinTxId:await (awaitcoinTx.sign(privateKey)).send(), tokenTxId:await (awaittokenTx.sign(privateKey)).send() }}