|
|
|
@ -157,7 +157,7 @@ loadLibraries :: (MonadIO m, MonadThrow m, MonadReader x m, Has SolConf x) |
|
|
|
|
=> [SolcContract] -> Addr -> Addr -> VM -> m VM |
|
|
|
|
loadLibraries [] _ _ vm = return vm |
|
|
|
|
loadLibraries (l:ls) la d vm = loadLibraries ls (la + 1) d =<< loadRest |
|
|
|
|
where loadRest = execStateT (execTx $ createTx (l ^. creationCode) d la unlimitedGasPerBlock) vm |
|
|
|
|
where loadRest = execStateT (execTx $ createTx (l ^. creationCode) d la (fromInteger unlimitedGasPerBlock)) vm |
|
|
|
|
|
|
|
|
|
-- | Generate a string to use as argument in solc to link libraries starting from addrLibrary |
|
|
|
|
linkLibraries :: [String] -> String |
|
|
|
@ -214,7 +214,7 @@ loadSpecified name cs = do |
|
|
|
|
|
|
|
|
|
-- Set up initial VM, either with chosen contract or Etheno initialization file |
|
|
|
|
-- need to use snd to add to ABI dict |
|
|
|
|
blank' <- maybe (pure (initialVM & block . maxCodeSize .~ w256 (fromInteger mcs))) |
|
|
|
|
blank' <- maybe (pure (initialVM & block . gaslimit .~ fromInteger unlimitedGasPerBlock & block . maxCodeSize .~ w256 (fromInteger mcs))) |
|
|
|
|
(loadEthenoBatch $ fst <$> tests) |
|
|
|
|
fp |
|
|
|
|
let blank = populateAddresses (NE.toList ads |> d) bala blank' |
|
|
|
@ -231,7 +231,7 @@ loadSpecified name cs = do |
|
|
|
|
Just (t,_) -> throwM $ TestArgsFound t -- Test args check |
|
|
|
|
Nothing -> do |
|
|
|
|
vm <- loadLibraries ls addrLibrary d blank |
|
|
|
|
let transaction = unless (isJust fp) $ void . execTx $ createTxWithValue bc d ca unlimitedGasPerBlock (w256 $ fromInteger balc) |
|
|
|
|
let transaction = unless (isJust fp) $ void . execTx $ createTxWithValue bc d ca (fromInteger unlimitedGasPerBlock) (w256 $ fromInteger balc) |
|
|
|
|
vm' <- execStateT transaction vm |
|
|
|
|
case currentContract vm' of |
|
|
|
|
Just _ -> return (vm', c ^. eventMap, neFuns, fst <$> tests, abiMapping) |
|
|
|
|