func (s *SimulatedBackend) SendTransaction(ctx context.Context, tx *types.Transaction) error {
	if err := s.SimulatedBackend.SendTransaction(ctx, tx); err != nil {
		return errors.WithStack(err)
	}
	s.Commit()
	return nil
}
SendTransaction executes a transaction.
package test
import (
	"context"
	"crypto/ecdsa"
	"math/big"
	"github.com/ethereum/go-ethereum/accounts/abi/bind"
	"github.com/ethereum/go-ethereum/accounts/abi/bind/backends"
	"github.com/ethereum/go-ethereum/common"
	"github.com/ethereum/go-ethereum/core"
	"github.com/ethereum/go-ethereum/core/types"
	"github.com/ethereum/go-ethereum/crypto"
	"github.com/pkg/errors"
	"perun.network/go-perun/channel"
	"perun.network/go-perun/channel/test"
	"perun.network/go-perun/pkg/sync"
)
const GasLimit = 500000
type SimulatedBackend struct {
	backends.SimulatedBackend
	faucetKey  *ecdsa.PrivateKey
	faucetAddr common.Address
	clockMu    sync.Mutex  
}
func NewSimulatedBackend() *SimulatedBackend {
	sk, err := crypto.GenerateKey()
	if err != nil {
		panic(err)
	}
	faucetAddr := crypto.PubkeyToAddress(sk.PublicKey)
	addr := map[common.Address]core.GenesisAccount{
		common.BytesToAddress([]byte{1}): {Balance: big.NewInt(1)},  
		common.BytesToAddress([]byte{2}): {Balance: big.NewInt(1)},  
		common.BytesToAddress([]byte{3}): {Balance: big.NewInt(1)},  
		common.BytesToAddress([]byte{4}): {Balance: big.NewInt(1)},  
		common.BytesToAddress([]byte{5}): {Balance: big.NewInt(1)},  
		common.BytesToAddress([]byte{6}): {Balance: big.NewInt(1)},  
		common.BytesToAddress([]byte{7}): {Balance: big.NewInt(1)},  
		common.BytesToAddress([]byte{8}): {Balance: big.NewInt(1)},  
		faucetAddr:                       {Balance: new(big.Int).Sub(channel.MaxBalance, big.NewInt(9))},
	}
	alloc := core.GenesisAlloc(addr)
	return &SimulatedBackend{
		SimulatedBackend: *backends.NewSimulatedBackend(alloc, 8000000),
		faucetKey:        sk,
		faucetAddr:       faucetAddr,
	}
}