Skip to content

ScottyBeam teleports NFT tokens from Ethereum to Binance Smart Chain and vice versa.

License

Notifications You must be signed in to change notification settings

Joseph-Cardwell/NFT-Token-Teleport

Repository files navigation

Aye there, human behind the electronic device!👋

Scotty's on the line. Where you may see a silly hamster, others see a miracle worker, a captain by rank, and an engineer by calling.

I have spent my whole life trying to figure out crazy ways of doing things. Now my duty is to maintain and operate the NFT Transporter, which can beam your precious NFTs from Ethereum to the Binance Smart Chain and other way around. Wee bit tricky, but I can show you how it works.

Ready?

All right, you lovelies, hold together!


Getting started:

1. Deploy NFT token contracts

This teleport works with any NFT token, that conforms to EIP-721 standart. But for the sake of simplicity we provide our own NFT token contracts, that you can deploy into testnets of Ethereum and Binance Smart Chain.

Deploy ./smart-contracts/TestnetNft/ScottyBeam/ScottyBeam.sol to both Ethereum and Binance Smart Chain testnets.

2. Deploy teleport contracts

In both Ethereum and Binance Smart Chain you have to deploy following contracts:

  • ./smart-contracts/ERC721Implementation.sol - implementation of teleported/wrapped NFT tokens
  • ./smart-contracts/NftTeleportAgent.sol - agent for NFT teleportation

Pro tip: If you want to deploy one contract in different networks to the same address, you should know that the address a contract is deployed to is generated deterministically using the address of the deployer and the deployer's total number of transactions (the nonce).

4. Configure web-service

Configure environment variables

Add file with name '.env' and specify following variables there:

Private keys of NftTeleportAgent owner:

ORACLE_BRIDGE_ETH_PK
ORACLE_BRIDGE_BSC_PK

Blockchain provider API keys:

INFURA_PROVIDER_ID_1
INFURA_PROVIDER_ID_2
INFURA_PROVIDER_ID_3
ALCHEMY_PROVIDER_ID_1
ALCHEMY_PROVIDER_ID_2
ETHERSCAN_PROVIDER_ID_1
ETHERSCAN_PROVIDER_ID_2

You can edit PROVIDER_POOL_CFG constant in ./config.ts file in order to change the required pool of blockchain providers.

Specify values of deployed smart contracts in ./config.ts file

Following constants must be set:

ETH_TELEPORT_AGENT_CONTRACT_ADDRESS
BSC_TELEPORT_AGENT_CONTRACT_ADDRESS
ETH_FAUCET_SCOTTY_BEAM_CONTRACT_ADDRESS
BSC_FAUCET_SCOTTY_BEAM_CONTRACT_ADDRESS

5. Start web-service

Development configuration:

npm install
npm run dev:ssr

Production configuration:

npm install
npm run build:ssr
node index.js

About

ScottyBeam teleports NFT tokens from Ethereum to Binance Smart Chain and vice versa.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published