weiValue property

BigInt get weiValue

Implementation

BigInt get weiValue {
  switch (this) {
    case EtherUnit.wei:
      return BigInt.one;
    case EtherUnit.kwei:
      return BigInt.from(1000);
    case EtherUnit.mwei:
      return BigInt.from(1000000);
    case EtherUnit.gwei:
      return BigInt.from(1000000000);
    case EtherUnit.szabo:
      return BigInt.parse('1000000000000');
    case EtherUnit.finney:
      return BigInt.parse('1000000000000000');
    case EtherUnit.ether:
      return BigInt.parse('1000000000000000000');
  }
}