github.com/lmittmann/w3@v0.20.0/module/eth/code_test.go (about)

     1  package eth_test
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/lmittmann/w3"
     7  	"github.com/lmittmann/w3/module/eth"
     8  	"github.com/lmittmann/w3/rpctest"
     9  )
    10  
    11  func TestCode(t *testing.T) {
    12  	rpctest.RunTestCases(t, []rpctest.TestCase[[]byte]{
    13  		{
    14  			Golden:  "get_code",
    15  			Call:    eth.Code(w3.A("0x000000000000000000000000000000000000c0DE"), nil),
    16  			WantRet: w3.B("0xdeadbeef"),
    17  		},
    18  	})
    19  }