creation_sourcecode: // SPDX-License-Identifier: GPL-3.0
  pragma solidity ^0.8.18 <0.8.20;
  
  // ungravel.eth, GroupWalletFactory, GroupWalletMaster, GroupWallet, ProxyWallet, TokenMaster, ProxyToken, PrePaidContract, AuctionMaster, BiddingProxy, intDeedMaster, extDeedMaster, IntDeedProxy by pepihasenfuss.eth 2017-2024, Copyright (c) 2024
  
  // GroupWallet and ungravel is entirely based on Ethereum Name Service, "ENS", the domain name registry.
  // inspired by parity sampleContract, Consensys-ERC20 and openzeppelin smart contracts
  
  //   ENS, ENSRegistryWithFallback, PublicResolver, Resolver, FIFS-Registrar, Registrar, AuctionRegistrar, BaseRegistrar, ReverseRegistrar, DefaultReverseResolver, ETHRegistrarController,
  //   PriceOracle, SimplePriceOracle, StablePriceOracle, ENSMigrationSubdomainRegistrar, CustomRegistrar, Root, RegistrarMigration are contracts of "ENS", by Nick Johnson and team.
  //
  //   Copyright (c) 2018, True Names Limited / ENS Labs Limited
  //
  //   Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
  //   The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
  //   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  
  
  abstract contract AbstractTM {
    address internal masterCopy;
  
    bytes32 internal name32;
    uint256 private ownerPrices;                                                  // buyPrice, sellPrice, owner address
  
    mapping(address => uint256)                     private balances;
    mapping(address => mapping(address => uint256)) private allowed;
  
    function getMemberBalances(bytes32 hash,address gwfc) external view virtual returns (uint[] memory);
    function balanceOf(address tokenOwner) external view virtual returns (uint thebalance);
    function sellPrice() external view virtual returns (uint256 sp);
    function buyPrice() external view virtual returns (uint256 bp);
    function name() external view virtual returns (string memory);
    function owner() external view virtual returns (address ow);
    function getMasterCopy() external view virtual returns (address);
  }
  
  abstract contract AbstractTPC {
    address public masterCopy;
    function upgrade(address master) external virtual payable;
    function version() public pure virtual returns(uint256 v);
  }
  
  //---------------------------------------------------------------------------------------------
  pragma solidity ^0.8.18 <0.8.20;
  contract PrePaidContract {
      address private pp_account;
      address private pp_owner;
  
      event PrePaidCreated(address indexed);
      event DepositPrePayment(address from, uint256 value);
      
      constructor(address _account) payable {
        pp_account = _account;
        pp_owner   = AbstractTM(AbstractTPC(msg.sender).masterCopy()).getMasterCopy();
        emit PrePaidCreated(address(this));
      }
      
      receive() external payable {
        if (msg.value==0) return;                                                 // no payment at all
        
        uint256 gasPrice;
        assembly { gasPrice := gasprice() }
    
        require(payable(pp_account).send(msg.value-uint(gasPrice*400296))&&payable(pp_owner).send(address(this).balance),"pp"); // forwarding funding - cost of transaction
       
        emit DepositPrePayment(msg.sender, msg.value);
      }
  }