-
Notifications
You must be signed in to change notification settings - Fork 0
/
celo_deploy.js
26 lines (20 loc) · 894 Bytes
/
celo_deploy.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
const Web3 = require('web3')
const ContractKit = require('@celo/contractkit')
const web3 = new Web3('https://alfajores-forno.celo-testnet.org')
const kit = ContractKit.newKitFromWeb3(web3)
const getAccount = require('./getAccount').getAccount
// const HelloWorld = require('./build/contracts/HelloWorld.json')
async function awaitWrapper(){
let account = await getAccount()
// This account must have a CELO balance to pay tx fees
// get some testnet funds at https://celo.org/build/faucet
console.log(account.address)
// kit.connection.addAccount(account.privateKey) // this account must have a CELO balance to pay transaction fees
// let tx = await kit.connection.sendTransaction({
// from: account.address,
// data: HelloWorld.bytecode
// })
// const receipt = await tx.waitReceipt()
// console.log(receipt)
}
awaitWrapper()