github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/engine/execution/testutil/fixtures_checker_heavy_contract.go (about)

     1  package testutil
     2  
     3  import (
     4  	"strings"
     5  
     6  	"github.com/onflow/flow-go/model/flow"
     7  )
     8  
     9  func DeployLocalReplayLimitedTransaction(authorizer flow.Address, chain flow.Chain) *flow.TransactionBody {
    10  
    11  	var builder strings.Builder
    12  	builder.WriteString("let t = T")
    13  	for i := 0; i < 30; i++ {
    14  		builder.WriteString("<T")
    15  	}
    16  	builder.WriteString(">()")
    17  
    18  	return CreateContractDeploymentTransaction(
    19  		"LocalReplayLimited",
    20  		builder.String(),
    21  		authorizer,
    22  		chain,
    23  	)
    24  }
    25  
    26  func DeployGlobalReplayLimitedTransaction(authorizer flow.Address, chain flow.Chain) *flow.TransactionBody {
    27  
    28  	var builder strings.Builder
    29  	for j := 0; j < 2; j++ {
    30  		builder.WriteString(";let t = T")
    31  		for i := 0; i < 16; i++ {
    32  			builder.WriteString("<T")
    33  		}
    34  	}
    35  
    36  	return CreateContractDeploymentTransaction(
    37  		"GlobalReplayLimited",
    38  		builder.String(),
    39  		authorizer,
    40  		chain,
    41  	)
    42  }