text: import { Contract } from 'ethers';
  import ContractSettings from '../../contractSettings';
  import abi from '../../../lib/abis/ropsten/Synth';
  
  /** @constructor
   * @param contractSettings {ContractSettings}
   */
  function sBRL(contractSettings) {
    this.contractSettings = contractSettings || new ContractSettings();
  
    this.contract = new Contract(
      this.contractSettings.addressList['ProxysBRL'],
      abi,
      this.contractSettings.signer || this.contractSettings.provider
    );
  
    /**
     * Call (no gas consumed, doesn't require signer)
     * @returns String
     **/
    this.name = async () => {
      return await this.contract.name();
    };
  
    /**
     * Transaction (consumes gas, requires signer)
     * @param spender {String<EthAddress>}
     * @param value {BigNumber}
     * @param txParams {TxParams}
     * @returns boolean
     **/
    this.approve = async (spender, value, txParams) => {
      txParams = txParams || {};
      return await this.contract.approve(spender, value, txParams);
    };
  
    /**
     * Transaction (consumes gas, requires signer)
     * @param _owner {String<EthAddress>}
     * @param txParams {TxParams}
    
     **/
    this.nominateNewOwner = async (_owner, txParams) => {
      txParams = txParams || {};
      return await this.contract.nominateNewOwner(_owner, txParams);
    };
  
    /**
     * Call (no gas consumed, doesn't require signer)
     * @returns BigNumber
     **/
    this.initiationTime = async () => {
      return await this.contract.initiationTime();
    };
  
    /**
     * Call (no gas consumed, doesn't require signer)
     * @returns BigNumber
     **/
    this.totalSupply = async () => {
      return await this.contract.totalSupply();
    };
  
    /**
     * Transaction (consumes gas, requires signer)
     * @param _feePool {String<EthAddress>}
     * @param txParams {TxParams}
    
     **/
    this.setFeePool = async (_feePool, txParams) => {
      txParams = txParams || {};
      return await this.contract.setFeePool(_feePool, txParams);
    };
  
    /**
     * Transaction (consumes gas, requires signer)
     * @param _beneficiary {String<EthAddress>}
     * @param txParams {TxParams}
    
     **/
    this.setSelfDestructBeneficiary = async (_beneficiary, txParams) => {
      txParams = txParams || {};
      return await this.contract.setSelfDestructBeneficiary(_beneficiary, txParams);
    };
  
    /**
     * Override ERC20 transferFrom function in order to subtract the transaction fee and send it to the fee pool for SNX holders to claim.<br>
     * Transaction (consumes gas, requires signer)
     * @param from {String<EthAddress>}
     * @param to {String<EthAddress>}
     * @param value {BigNumber}
     * @param txParams {TxParams}
     * @returns boolean
     **/
    this.transferFrom = async (from, to, value, txParams) => {
      txParams = txParams || {};
      return await this.contract.transferFrom(from, to, value, txParams);
    };
  
    /**
     * Call (no gas consumed, doesn't require signer)
     * @returns Number
     **/
    this.decimals = async () => {
      return await this.contract.decimals();
    };
  
    /**
     * Transaction (consumes gas, requires signer)
     * @param txParams {TxParams}
    
     **/
    this.terminateSelfDestruct = async txParams => {
      txParams = txParams || {};
      return await this.contract.terminateSelfDestruct(txParams);
    };
  
    /**
     * Transaction (consumes gas, requires signer)
     * @param from {String<EthAddress>}
     * @param to {String<EthAddress>}
     * @param value {BigNumber}
     * @param data {bytes}
     * @param txParams {TxParams}
     * @returns boolean
     **/
    this.transferFromSenderPaysFee = async (from, to, value, data, txParams) => {
      txParams = txParams || {};
      return await this.contract.transferFromSenderPaysFee(from, to, value, data, txParams);
    };
  
    /**
     * Call (no gas consumed, doesn't require signer)
     * @returns String<EthAddress>
     **/
    this.nominatedOwner = async () => {
      return await this.contract.nominatedOwner();
    };
  
    /**
     * Call (no gas consumed, doesn't require signer)
     * @param account {String<EthAddress>}
     * @returns BigNumber
     **/
    this.balanceOf = async account => {
      return await this.contract.balanceOf(account);
    };
  
    /**
     * Call (no gas consumed, doesn't require signer)
     * @returns String<EthAddress>
     **/
    this.synthetix = async () => {
      return await this.contract.synthetix();
    };
  
    /**
     * Transaction (consumes gas, requires signer)
     * @param txParams {TxParams}
    
     **/
    this.acceptOwnership = async txParams => {
      txParams = txParams || {};
      return await this.contract.acceptOwnership(txParams);
    };
  
    /**
     * Transaction (consumes gas, requires signer)
     * @param account {String<EthAddress>}
     * @param amount {BigNumber}
     * @param txParams {TxParams}
    
     **/
    this.issue = async (account, amount, txParams) => {
      txParams = txParams || {};
      return await this.contract.issue(account, amount, txParams);
    };
  
    /**
     * Call (no gas consumed, doesn't require signer)
     * @returns String<EthAddress>
     **/
    this.owner = async () => {
      return await this.contract.owner();
    };
  
    /**
     * Call (no gas consumed, doesn't require signer)
     * @returns String
     **/
    this.symbol = async () => {
      return await this.contract.symbol();
    };
  
    /**
     * Transaction (consumes gas, requires signer)
     * @param _proxy {String<EthAddress>}
     * @param txParams {TxParams}
    
     **/
    this.setProxy = async (_proxy, txParams) => {
      txParams = txParams || {};
      return await this.contract.setProxy(_proxy, txParams);
    };
  
    /**
     * Transaction (consumes gas, requires signer)
     * @param txParams {TxParams}
    
     **/
    this.selfDestruct = async txParams => {
      txParams = txParams || {};
      return await this.contract.selfDestruct(txParams);
    };
  
    /**
     * Transaction (consumes gas, requires signer)
     * @param account {String<EthAddress>}
     * @param amount {BigNumber}
     * @param txParams {TxParams}
    
     **/
    this.burn = async (account, amount, txParams) => {
      txParams = txParams || {};
      return await this.contract.burn(account, amount, txParams);
    };
  
    /**
     * Transaction (consumes gas, requires signer)
     * @param _tokenState {String<EthAddress>}
     * @param txParams {TxParams}
    
     **/
    this.setTokenState = async (_tokenState, txParams) => {
      txParams = txParams || {};
      return await this.contract.setTokenState(_tokenState, txParams);
    };
  
    /**
     * Call (no gas consumed, doesn't require signer)
     * @returns BigNumber
     **/
    this.SELFDESTRUCT_DELAY = async () => {
      return await this.contract.SELFDESTRUCT_DELAY();
    };
  
    /**
     * Override ERC20 transfer function in order to subtract the transaction fee and send it to the fee pool for SNX holders to claim.<br>
     * Transaction (consumes gas, requires signer)
     * @param to {String<EthAddress>}
     * @param value {BigNumber}
     * @param txParams {TxParams}
     * @returns boolean
     **/
    this.transfer = async (to, value, txParams) => {
      txParams = txParams || {};
      return await this.contract.transfer(to, value, txParams);
    };
  
    /**
     * Override ERC20 transferFrom function in order to subtract the transaction fee and send it to the fee pool for SNX holders to claim.<br>
     * Transaction (consumes gas, requires signer)
     * @param from {String<EthAddress>}
     * @param to {String<EthAddress>}
     * @param value {BigNumber}
     * @param data {bytes}
     * @param txParams {TxParams}
     * @returns boolean
     **/
    this.transferFrom = async (from, to, value, data, txParams) => {
      txParams = txParams || {};
      return await this.contract.transferFrom(from, to, value, data, txParams);
    };
  
    /**
     * Call (no gas consumed, doesn't require signer)
     * @returns String<EthAddress>
     **/
    this.feePool = async () => {
      return await this.contract.feePool();
    };
  
    /**
     * Transaction (consumes gas, requires signer)
     * @param to {String<EthAddress>}
     * @param value {BigNumber}
     * @param data {bytes}
     * @param txParams {TxParams}
     * @returns boolean
     **/
    this.transferSenderPaysFee = async (to, value, data, txParams) => {
      txParams = txParams || {};
      return await this.contract.transferSenderPaysFee(to, value, data, txParams);
    };
  
    /**
     * Call (no gas consumed, doesn't require signer)
     * @returns boolean
     **/
    this.selfDestructInitiated = async () => {
      return await this.contract.selfDestructInitiated();
    };
  
    /**
     * Transaction (consumes gas, requires signer)
     * @param sender {String<EthAddress>}
     * @param txParams {TxParams}
    
     **/
    this.setMessageSender = async (sender, txParams) => {
      txParams = txParams || {};
      return await this.contract.setMessageSender(sender, txParams);
    };
  
    /**
     * Transaction (consumes gas, requires signer)
     * @param txParams {TxParams}
    
     **/
    this.initiateSelfDestruct = async txParams => {
      txParams = txParams || {};
      return await this.contract.initiateSelfDestruct(txParams);
    };
  
    /**
     * Override ERC20 transfer function in order to subtract the transaction fee and send it to the fee pool for SNX holders to claim.<br>
     * Transaction (consumes gas, requires signer)
     * @param to {String<EthAddress>}
     * @param value {BigNumber}
     * @param data {bytes}
     * @param txParams {TxParams}
     * @returns boolean
     **/
    this.transfer = async (to, value, data, txParams) => {
      txParams = txParams || {};
      return await this.contract.transfer(to, value, data, txParams);
    };
  
    /**
     * Call (no gas consumed, doesn't require signer)
     * @returns String<EthAddress>
     **/
    this.selfDestructBeneficiary = async () => {
      return await this.contract.selfDestructBeneficiary();
    };
  
    /**
     * Transaction (consumes gas, requires signer)
     * @param to {String<EthAddress>}
     * @param value {BigNumber}
     * @param txParams {TxParams}
     * @returns boolean
     **/
    this.transferSenderPaysFee = async (to, value, txParams) => {
      txParams = txParams || {};
      return await this.contract.transferSenderPaysFee(to, value, txParams);
    };
  
    /**
     * Call (no gas consumed, doesn't require signer)
     * @returns bytes4
     **/
    this.currencyKey = async () => {
      return await this.contract.currencyKey();
    };
  
    /**
     * Call (no gas consumed, doesn't require signer)
     * @param owner {String<EthAddress>}
     * @param spender {String<EthAddress>}
     * @returns BigNumber
     **/
    this.allowance = async (owner, spender) => {
      return await this.contract.allowance(owner, spender);
    };
  
    /**
     * Transaction (consumes gas, requires signer)
     * @param from {String<EthAddress>}
     * @param to {String<EthAddress>}
     * @param value {BigNumber}
     * @param txParams {TxParams}
     * @returns boolean
     **/
    this.transferFromSenderPaysFee = async (from, to, value, txParams) => {
      txParams = txParams || {};
      return await this.contract.transferFromSenderPaysFee(from, to, value, txParams);
    };
  
    /**
     * Call (no gas consumed, doesn't require signer)
     * @returns String<EthAddress>
     **/
    this.tokenState = async () => {
      return await this.contract.tokenState();
    };
  
    /**
     * Transaction (consumes gas, requires signer)
     * @param sender {String<EthAddress>}
     * @param recipient {String<EthAddress>}
     * @param amount {BigNumber}
     * @param txParams {TxParams}
    
     **/
    this.triggerTokenFallbackIfNeeded = async (sender, recipient, amount, txParams) => {
      txParams = txParams || {};
      return await this.contract.triggerTokenFallbackIfNeeded(sender, recipient, amount, txParams);
    };
  
    /**
     * Call (no gas consumed, doesn't require signer)
     * @returns String<EthAddress>
     **/
    this.proxy = async () => {
      return await this.contract.proxy();
    };
  
    /**
     * Transaction (consumes gas, requires signer)
     * @param amount {BigNumber}
     * @param txParams {TxParams}
    
     **/
    this.setTotalSupply = async (amount, txParams) => {
      txParams = txParams || {};
      return await this.contract.setTotalSupply(amount, txParams);
    };
  
    /**
     * Transaction (consumes gas, requires signer)
     * @param _synthetix {String<EthAddress>}
     * @param txParams {TxParams}
    
     **/
    this.setSynthetix = async (_synthetix, txParams) => {
      txParams = txParams || {};
      return await this.contract.setSynthetix(_synthetix, txParams);
    };
  }
  
  export default sBRL;
  