Skip to content

Commit

Permalink
WIP: refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
GrandGarcon committed Jun 24, 2022
1 parent d951e5c commit 257c3c2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion contracts/DBIT.sol
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ contract DBIT is ERC20, IDBIT, GovernanceOwnable {
return _maxAllocationPercentage;
}

function balanceOf(address _of) public override view returns (uint256) {
function getTotalBalance(address _of) public view returns (uint256) {
return (_airdropBalance[_of] +
_allocatedBalance[_of] +
_collateralisedBalance[_of]);
Expand Down
2 changes: 1 addition & 1 deletion contracts/DGOV.sol
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ contract DGOV is ERC20, IDGOV, GovernanceOwnable {
return (_maximumSupply * _maxAllocationPercentage) / 10000;
}

function getTotalBalance(address _of) external view returns (uint256) {
function getTotalBalance(address _of) public view returns (uint256) {
return (_airdropBalance[_of] +
_allocatedBalance[_of] +
_collateralisedBalance[_of]);
Expand Down
15 changes: 7 additions & 8 deletions test/DGOV.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
import { expect } from "chai";
import Web3 from "web3";
import {DGOVInstance,, DBITAirdropInstance} from "../types/truffle-contracts";
import {DGOVInstance,MigrationsInstance} from "../types/truffle-contracts";
const DBIT = artifacts.require("DGOV");
const DBITAirdrop = artifacts.require("DBITAirdrop");
const web3 = require('web3');
contract("DBIT token", async (accounts: any ) => {
let dgovObj : DBITInstance;
let dgovObj : DGOVInstance;
// TODO: just taken as the demo for replicating the ng the other contracts , to be removed
let Bank : BankInstance;
let Governance : GovernanceInstance
let DBITAirdrop : DBITAirdropInstance;
let Exchange : ExchangeInstance;

let Bank : MigrationsInstance;
let Governance : MigrationsInstance
let Exchange : MigrationsInstance;
let airdrop: MigrationsInstance;
let [deployer , User1 , User2, bank , exchange] = accounts;


before('instantiation', async() => {


dgovObj = await DGOV.deployed();
dgovObj = await DGOVInstance.deployed();
// TODO: to change name for the DBITAirdrop to general airdrop.
DBITAirdrop = await DBITAirdrop.deployed();
Governance = await governance.deployed();
Expand Down

0 comments on commit 257c3c2

Please sign in to comment.