Closed yinhaibo closed 5 years ago
You can get UT Federation address by call USC contract like follow:
const Web3 = require('web3');
var web3 = new Web3("http://rpc.testnet.usc.ulord.one:58858");
var contractAddress = "0x0000000000000000000000000000000001000006";
var contractABI=[{"constant":true,"inputs":[],"name":"getFederationAddress","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"}];
var fedContract = new web3.eth.Contract(contractABI, contractAddress);
fedContract.methods.getFederationAddress().call(function(error, result){
console.log("getFederationAddress:" + result);
});
If you want to get usc mainnet, you need to change web provider to you rpc node.
If some one want to transfer some UT to USC main network, you need send some UT to federation address, and you can get USC token from UWallet. But how to get the federation address?