@@ -11,15 +11,10 @@ module.exports = transform(async (deployer, network, accounts) => {
1111
1212 const token = await getDeployedContract ( 'CvcToken' ) ;
1313 const web3 = new Web3 ( deployer . provider ) ;
14-
1514 // Provision default IDR:
1615 const idr = '0x8935161928e65081bcaef7358e97dce1c560dc9b' ; // SIP
17- // Credit tokens
18- const cvcAmount = 1000 ;
19- await token . transfer ( idr , cvcAmount * ONE_CVC , { from : admin , gasPrice } ) ;
20- console . log ( `${ idr } has been credited with ${ cvcAmount } CVC` ) ;
21- // Credit ETH
22- const ethAmount = 100 ;
16+ console . log ( 'Crediting ETH...' ) ;
17+ const ethAmount = 10 ;
2318 await web3 . eth . sendTransaction ( {
2419 from : admin ,
2520 to : idr ,
@@ -29,6 +24,20 @@ module.exports = transform(async (deployer, network, accounts) => {
2924 } ) ;
3025 console . log ( `${ idr } has been credited with ${ ethAmount } ETH` ) ;
3126
27+ // Credit tokens
28+ console . log ( 'Crediting tokens...' ) ;
29+ const cvcAmount = 1000 ;
30+ accounts . push ( idr ) ;
31+ accounts . push ( '0xf91a4ddfa76451d00b703311aae273f2f77cd52c' ) ;
32+ accounts . push ( '0x3a8bc151852c3771b5933419e5c74481679789d0' ) ;
33+ accounts . push ( '0xa27d4886302c55345a82f94436019e209c5c7bd6' ) ;
34+ await Promise . all (
35+ accounts . map (
36+ address => token . transfer ( address , cvcAmount * ONE_CVC , { from : admin , gasPrice } ) . then ( ( ) => {
37+ console . log ( `${ address } has been credited with ${ cvcAmount } CVC` ) ;
38+ } )
39+ )
40+ ) ;
3241} ) ;
3342
3443function transform ( callback ) {
0 commit comments