2022-06-30 13:17:47 +08:00

11 lines
469 B
JavaScript

require('js/jsb-adapter/web3.min.js');
console.log('hi tiny cocos')
var web3 = new Web3('https://rpc-testnet.kcc.network')
let key = '0xa6c4354fb93a55fb67117969a12465209395ec31089fea9e6e061f873b87a473'
web3.eth.accounts.wallet.add(key);
web3.eth.accounts.wallet.save('111111')
window.wallet = web3.eth.accounts.wallet.load('111111')
console.log(web3.eth.accounts.wallet[0].address);
console.log(web3.eth.accounts.wallet[0].privateKey);
console.log('end of main.js')