class RepositoryImpl implements Repository {

    @Override
    public synchronized byte[] getCode(UscAddress addr) {
        if (!isExist(addr)) {
            return EMPTY_BYTE_ARRAY;
        }

        AccountState  account = getAccountState(addr);

        if (account.isHibernated()) {
            return EMPTY_BYTE_ARRAY;
        }

        byte[] codeHash = account.getCodeHash();

        if (Arrays.equals(codeHash, EMPTY_DATA_HASH)) {
            return EMPTY_BYTE_ARRAY;
        }

        ContractDetails details = getContractDetails(addr);
        return (details == null) ? null : details.getCode();
    }

    public  RepositoryImpl(TrieStore store, TrieStore.Pool trieStorePool, int memoryStorageLimit);
    public  RepositoryImpl(
            TrieStore store,
            KeyValueDataSource detailsDS,
            TrieStore.Pool trieStorePool,
            int memoryStorageLimit);
    private  RepositoryImpl(
            TrieStore store,
            DetailsDataStore detailsDataStore,
            TrieStore.Pool trieStorePool,
            int memoryStorageLimit);

}