github.com/diadata-org/diadata@v1.4.593/pkg/dia/scraper/exchange-scrapers/orca/whirlpool/testing_utils.go (about)

     1  // Code generated by https://github.com/gagliardetto/anchor-go. DO NOT EDIT.
     2  
     3  package whirlpool
     4  
     5  import (
     6  	"bytes"
     7  	"fmt"
     8  	ag_binary "github.com/gagliardetto/binary"
     9  )
    10  
    11  func encodeT(data interface{}, buf *bytes.Buffer) error {
    12  	if err := ag_binary.NewBorshEncoder(buf).Encode(data); err != nil {
    13  		return fmt.Errorf("unable to encode instruction: %w", err)
    14  	}
    15  	return nil
    16  }
    17  
    18  func decodeT(dst interface{}, data []byte) error {
    19  	return ag_binary.NewBorshDecoder(data).Decode(dst)
    20  }