Commit f629ad49 authored by protolambda's avatar protolambda

mipsevm: test sol trace util with MIPS.sol, remove Hello.sol

parent 6f974dac
pragma solidity ^0.7.6;
// Hello-world contract to test source maps and instrumentation
contract Hello {
function helloWorld(uint32 x) public returns (uint32) {
require(x > 3, "test");
return x + 100;
}
}
...@@ -8,9 +8,9 @@ import ( ...@@ -8,9 +8,9 @@ import (
) )
func TestSourcemap(t *testing.T) { func TestSourcemap(t *testing.T) {
contract, err := LoadContract("Hello") contract, err := LoadContract("MIPS")
require.NoError(t, err) require.NoError(t, err)
srcMap, err := contract.SourceMap([]string{"../contracts/src/Hello.sol"}) srcMap, err := contract.SourceMap([]string{"../contracts/src/MIPS.sol"})
require.NoError(t, err) require.NoError(t, err)
for i := 0; i < len(contract.DeployedBytecode.Object); i++ { for i := 0; i < len(contract.DeployedBytecode.Object); i++ {
fmt.Println(srcMap.FormattedInfo(uint64(i)) + ": test") fmt.Println(srcMap.FormattedInfo(uint64(i)) + ": test")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment