code: public function encode($value, Field $field, Codec $codec = null)
      {
          if ($value instanceof BigNumber) {
              return $value->getValue();
          }
  
          return '0';
      }
docs: {@inheritdoc}