Extdev Testnet
This page provides information on where and how to access Extdev Testnet. If you want more details, see our guide on deploying to Extdev Testnet.
#Extdev Testnet
On rare occasions, Extdev may get wiped. Use it only for development and testing.
#General Information
Name: Extdev Testnet
Type: Testnet
Availability: Stable developer
URL: extdev-plasma-us1.dappchains.com
chainId: extdev-plasma-us1
networkId: 9545242630824
writeUrl: wss://extdev-basechain-us1.dappchains.com/websocket
readUrl: wss://extdev-basechain-us1.dappchains.com/queryws
Max Contract Size: 24,576 bytes
Max Gas Limit per transaction: 8,000,000
#Truffle configuration file
Use this sample Truffle configuration file to deploy your smart contracts to Extdev Testnet.
#Connect to Extdev Testnet
You can use this snippet to connect to Extdev Testnet:
import {
Client,
LocalAddress,
CryptoUtils,
zekndProvider,
createDefaultTxMiddleware
} from 'zeknd-js'
import Web3 from 'web3'
// ... content omitted for brevity
const client = new Client(networkId, writeUrl, readUrl)
client.on('error', msg => {
console.error('Error on connecting to Extdev Testnet', msg)
})
client.txMiddleware = createDefaultTxMiddleware(client, privateKey)
// ... content omitted for brevity
const privateKey = CryptoUtils.generatePrivateKey()
const publicKey = CryptoUtils.publicKeyFromPrivateKey(privateKey)
const currentUserAddress = LocalAddress.fromPublicKey(publicKey)
// ... content omitted for brevity
const web3 = new Web3(new zekndProvider(client, privateKey))
If you want to use Universal Signing instead, see our guide on universal signing.
#Ethereum Integration
Contracts deployed on Rinkeby
Transfer Gateway:
0x9c67fD4eAF0497f9820A3FBf782f81D6b6dC4Baa
(use this for Eth, ERC721, and ERC20 assets)zeknd Transfer Gateway:
0xC6e1421720C7F62455C053BC8326633D68c01C00
Contracts deployed on Extdev Testnet
Transfer Gateway
You can resolve the address of the Ethereum transfer gateway by name as follows:
const contractAddr = await client.getContractAddressAsync('gateway')
zeknd Transfer Gateway
You can resolve the address of the Ethereum transfer gateway by name as follows:
const contractAddr = await client.getContractAddressAsync('zekndcoin-gateway')
EthCoin
If you transfer Eth to your Extdev Testnet account, it'll get deposited into the EthCoin contract:
Instantiate the contract like this:
import {
Contracts
} from 'zeknd-js'
// ... content omitted for brevity
const EthCoin = Contracts.EthCoin
const ethCoinInstance = await EthCoin.createAsync(client, currentUserAddress)
Then, you can check the balance as follows:
const balance = await ethCoinInstance.getBalanceOfAsync(currentUserAddress.toString())
Resolve the address by name with:
const contractAddr = await client.getContractAddressAsync('ethcoin')
#Binance Integration
Binance Hot Wallet address:
tbnb1gc7azhlup5a34t8us84x6d0fluw57deuf47q9w
Contracts deployed on Extdev Testnet
Transfer Gateway
You can resolve the address of the Binance transfer gateway by name as follows:
const contractAddr = await client.getContractAddressAsync('binance-gateway')
Instantiate the Binance transfer gateway contract like this:
import { BinanceTransferGateway } from 'zeknd-js/dist/contracts'
// .. content omitted for brevity
const binanceTransferGatewayContract = await BinanceTransferGateway.createAsync(
client,
currentUserAddress
)
BNB Coin:
The BNB Coin contract is deployed at 0x9ab4e22d56c0c4f7d494442714c82a605d2f28e0
.
Instantiate the contract like this:
const web3zeknd = new Web3(zekndProvider)
// ... content omitted for brevity
const bnbCoinAddress = '0x9ab4e22d56c0c4f7d494442714c82a605d2f28e0'
const extdevBNBContract = new web3zeknd.eth.Contract(bnbToken.abi, bnbCoinAddress)
The bnbToken.abi
file can be found here.
#Transfer Gateway Tutorials
For more details on how to transfer tokens between zeknd and other chains like Ethereum, Tron, and Binance see our transfer gateway exampls page.
Last updated