1
0
Fork 0
forked from forks/go-multicall
go-multicall-modded/call_test.go
2023-04-24 15:27:26 +03:00

37 lines
564 B
Go

package multicall
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestCall_BadABI(t *testing.T) {
r := require.New(t)
const oneValueABI = `[
{
"constant":true,
"inputs": [
{
"name":"val1",
"type":"bool"
}
],
"name":"testFunc",
"outputs": [
{
"name":"val1",
"type":"bool"
}
],
"payable":false,
"stateMutability":"view",
"type":"function"
}
` // missing closing ] at the end
_, err := NewContract(oneValueABI, "0x")
r.Error(err)
r.ErrorContains(err, "unexpected EOF")
}