|
| 1 | +const { expect } = require('chai'); |
| 2 | +const { deploy } = require('../scripts/deploy.js'); |
| 3 | +const { toBigInt, toDecimal, showReceipt, snd, tableSnd, d1, Vc, Vp, UI } = require('./utils.js'); |
| 4 | + |
| 5 | +describe('update', function() { |
| 6 | + it('First', async function() { |
| 7 | + var [owner, addr1, addr2] = await ethers.getSigners(); |
| 8 | + |
| 9 | + const { nest, usdt, hbtc, cofi, usdc, nestBatchPlatform2 } = await deploy(); |
| 10 | + console.log('ok'); |
| 11 | + |
| 12 | + { |
| 13 | + const config = await nestBatchPlatform2.getConfig(); |
| 14 | + console.log(UI(config)); |
| 15 | + |
| 16 | + const ci = await nestBatchPlatform2.getChannelInfo(0); |
| 17 | + console.log(UI(ci)); |
| 18 | + |
| 19 | + // await nestBatchPlatform2.modifyToken(0, 0, '0x102E6BBb1eBfe2305Ee6B9E9fd5547d0d39CE3B4'); |
| 20 | + // await nestBatchPlatform2.modify(0, { |
| 21 | + // rewardPerBlock: 20000000000000000000n, |
| 22 | + // postFeeUnit: 0, |
| 23 | + // singleFee: 0, |
| 24 | + // reductionRate: 8000 |
| 25 | + // }); |
| 26 | + |
| 27 | + // // Price channel configuration |
| 28 | + // struct ChannelConfig { |
| 29 | + |
| 30 | + // // Reward per block standard |
| 31 | + // uint96 rewardPerBlock; |
| 32 | + |
| 33 | + // // Post fee(0.0001eth, DIMI_ETHER). 1000 |
| 34 | + // uint16 postFeeUnit; |
| 35 | + |
| 36 | + // // Single query fee (0.0001 ether, DIMI_ETHER). 100 |
| 37 | + // uint16 singleFee; |
| 38 | + |
| 39 | + // // Reduction rate(10000 based). 8000 |
| 40 | + // uint16 reductionRate; |
| 41 | + // } |
| 42 | + } |
| 43 | + |
| 44 | + { |
| 45 | + const config = await nestBatchPlatform2.getConfig(); |
| 46 | + console.log(UI(config)); |
| 47 | + |
| 48 | + const ci = await nestBatchPlatform2.getChannelInfo(0); |
| 49 | + console.log(UI(ci)); |
| 50 | + } |
| 51 | + }); |
| 52 | +}); |
0 commit comments